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.
This commit is contained in:
Matiss Janis Aboltins
2025-08-21 22:17:17 +01:00
committed by GitHub
parent 21105fc25b
commit 102c6eaff6
2 changed files with 20 additions and 3 deletions

View File

@@ -557,7 +557,13 @@ function ActionEditor({
</>
) : op === 'set-split-amount' ? (
<>
<View style={{ padding: '5px 10px', lineHeight: '1em' }}>
<View
style={{
padding: '5px 10px',
lineHeight: '1em',
flexShrink: 0,
}}
>
{t('allocate')}
</View>
@@ -567,7 +573,12 @@ function ActionEditor({
onChange={onChange}
/>
<View style={{ flex: 1 }}>
<View
style={{
flex: 1,
minWidth: options.method === 'fixed-percent' ? 45 : 70,
}}
>
{options.method !== 'remainder' && (
// @ts-expect-error fix this
<GenericInput
@@ -618,7 +629,7 @@ function ActionEditor({
</>
) : null}
<Stack direction="row">
<Stack direction="row" style={{ flexShrink: 0 }}>
<EditorButtons
onAdd={onAdd}
onDelete={