Skip to content

Commit 102c6ea

Browse files
authored
Enhance responsiveness of GenericInput in RuleEditor component for mobile devices (#5601)
* Enhance responsiveness of GenericInput in RuleEditor component for mobile devices * Refactor ActionEditor layout in RuleEditor component for improved responsiveness - Adjusted styles for the View components to enhance layout flexibility. - Ensured the GenericInput component maintains appropriate minimum width based on method type. - Updated Stack component to prevent shrinking, improving overall UI consistency.
1 parent 21105fc commit 102c6ea

File tree

2 files changed

+20
-3
lines changed

2 files changed

+20
-3
lines changed

packages/desktop-client/src/components/rules/RuleEditor.tsx

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,13 @@ function ActionEditor({
557557
</>
558558
) : op === 'set-split-amount' ? (
559559
<>
560-
<View style={{ padding: '5px 10px', lineHeight: '1em' }}>
560+
<View
561+
style={{
562+
padding: '5px 10px',
563+
lineHeight: '1em',
564+
flexShrink: 0,
565+
}}
566+
>
561567
{t('allocate')}
562568
</View>
563569

@@ -567,7 +573,12 @@ function ActionEditor({
567573
onChange={onChange}
568574
/>
569575

570-
<View style={{ flex: 1 }}>
576+
<View
577+
style={{
578+
flex: 1,
579+
minWidth: options.method === 'fixed-percent' ? 45 : 70,
580+
}}
581+
>
571582
{options.method !== 'remainder' && (
572583
// @ts-expect-error fix this
573584
<GenericInput
@@ -618,7 +629,7 @@ function ActionEditor({
618629
</>
619630
) : null}
620631

621-
<Stack direction="row">
632+
<Stack direction="row" style={{ flexShrink: 0 }}>
622633
<EditorButtons
623634
onAdd={onAdd}
624635
onDelete={

upcoming-release-notes/5601.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
category: Bugfix
3+
authors: [MatissJanis]
4+
---
5+
6+
Improve responsiveness of set-split-amount field on mobile

0 commit comments

Comments
 (0)