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

Number fields look awkward when right-aligned on the record page #2057

Open
seancolsen opened this issue Dec 8, 2022 · 1 comment · May be fixed by #4077
Open

Number fields look awkward when right-aligned on the record page #2057

seancolsen opened this issue Dec 8, 2022 · 1 comment · May be fixed by #4077
Assignees
Labels
beta: approved Temporary label to mark issues that are approved ready Ready for implementation restricted: maintainers Only maintainers can resolve this issue type: enhancement New feature or request work: frontend Related to frontend code in the mathesar_ui directory

Comments

@seancolsen
Copy link
Contributor

seancolsen commented Dec 8, 2022

Design problem

  • The NumberInput component right-aligns its contents for the following reasons:

    • It's consistent with numbers being right-aligned within cells.
    • It allows the user's cursor to remain in a consistent position while entering numbers, whereas left-aligning the contents causes the cursor to jump around as grouping separators are automatically added/removed from the number while the user types. @pavish Has expressed a strong opinion to keep numbers right-aligned for this reason.
  • On the Record Page, the right-aligned numbers can look a bit weird because they are so far from their corresponding labels, and they're out of alignment with the other fields on the page.

    image

Possible solutions

  • Left-align numbers on the Record Page. Pavish argues against this, to avoid the cursor moving as grouping separators are automatically added to the number. If we do choose to left-align numbers on the Record Page, the we should also consider how to best align numbers for other usages of the NumberInput component (e.g. Record Selector search, default value entry, filter condition).
  • Reduce width of the field
  • Keep it as-is
  • Something else?
@seancolsen seancolsen added ready Ready for implementation type: enhancement New feature or request work: design restricted: maintainers Only maintainers can resolve this issue labels Dec 8, 2022
@seancolsen seancolsen added this to the Post-Release Improvements milestone Dec 8, 2022
@github-actions github-actions bot added the stale label Jun 26, 2023
@rajatvijay rajatvijay removed the stale label Jul 5, 2023
@seancolsen seancolsen added needs: ux design work: frontend Related to frontend code in the mathesar_ui directory and removed ready Ready for implementation work: design labels Dec 5, 2023
@seancolsen seancolsen self-assigned this Dec 6, 2024
@kgodey kgodey added the beta: approved Temporary label to mark issues that are approved label Dec 11, 2024
@mathesar-foundation mathesar-foundation deleted a comment from github-actions bot Dec 13, 2024
@seancolsen
Copy link
Contributor Author

Kriti and I discussed this on a call and agreed to left-align the number input text.

@seancolsen seancolsen linked a pull request Dec 13, 2024 that will close this issue
7 tasks
@zackkrida zackkrida added the ready Ready for implementation label Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beta: approved Temporary label to mark issues that are approved ready Ready for implementation restricted: maintainers Only maintainers can resolve this issue type: enhancement New feature or request work: frontend Related to frontend code in the mathesar_ui directory
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

4 participants