Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GUI: NumberInput small improvements #3840

Draft
wants to merge 4 commits into
base: dev
Choose a base branch
from

Merge branch 'dev' into number-input-empty-default

16b8a9c
Select commit
Loading
Failed to load commit list.
Draft

GUI: NumberInput small improvements #3840

Merge branch 'dev' into number-input-empty-default
16b8a9c
Select commit
Loading
Failed to load commit list.
Task list completed / task-list-completed Started 2024-09-05 17:27:45 ago

0 / 3 tasks completed

3 tasks still to be completed

Details

Required Tasks

Task Status
I really liked the idea of a number input and already had a use for it, but found a detail that did not fit my use case:
When showing NumberInput, there is always a number there
You can set current number to 0, but then if you want to have a minimum value, current number is changed to minimum value, so user gets default text of the minimum value and they need to erase this then input their number
My use case would work better where you can start typing, and the save button is enabled when the number is within bounds Incomplete
This PR allows passing 0 as current number, which will mean the input is empty by default Incomplete
Also, manually pressing 0 when input is empty shows the number 0 instead of doing nothing, to avoid confusion Incomplete
Also aligned the input bar to keyboard bar, it was probably misaligned due to taking the skeleton of ByteInput, which has arrows on sides of input bar Incomplete
Set number to zero Incomplete
Click change again, input is empty due to current number being 0 Incomplete
Click 0 when input is empty, 0 is displayed Incomplete
Check that input bar is vertically aligned to keyboard buttons Incomplete
PR has description of feature/bug or link to Confluence/Jira task Incomplete
Description contains actions to verify feature/bugfix Incomplete
I've built this code, uploaded it to the device and verified feature/bugfix Incomplete