I understand it's a necessity when it comes to viewing data in a table or a list that numeric values should be righ aligned. but when it comes to editing the values in a text field, should it be same? right aligned?
For editing values in a text field, it depends where you edit them, and what other fields are in its context:
- if the layout stays data-table-like, and the cell simply becomes editable, then I agree with @Erisu's answer, to conform to excel-like solution.
- if the text field is in a form, it is better to be consistent across fields, to prevent user having to jump from left to right, rather than judge per field (see examples)
Looking at Excel as an example, when a cell becomes a numeric value, the numbers are right aligned. When double clicking into the cell to edit, they maintain the content right aligned.
As people are accustom to Excel, it might be sound to follow the same flow?
As you rightly pointed out, the alignment rule works best when the data is in a list/tabular format. Basically when the user will have to scan related vertically.
It is the context around the data that defines the alignment.
If the context remains the same then do retain the same alignment.
If it is a mixed data, like a form, then a probably left aligned content seems more apt.
Yes its a good idea to right align them. The reasons being:-
- Its an established accounting practice that all numeric values should be right aligned, for simple reasons as better readability and less room for human error - so its best to follow them
- If there are decimals then its more easy to read if they are right aligned
- My right aligning them it will follow the basic mathematical rule of showing units, tens, hundreds and thousands... from left to right
No, for two main reasons
1) Difficult to update - It becomes extremely painful to update the field on a mobile device (it is not a piece of cake on desktops either, though more manageable ) since then your fingers will have to tap towards the end of the textbox right-border, which is certainly painful thing to do every time.
2) Misaligned form - If your form has a mixture of numeric and non-numeric fields, then text-field data may appear out of alignment, since some fields will be left-aligned and some will be right aligned.
Hope this helps.
If I understood you correctly , This is so called Data Justification. You need to justify the data according to its content. There two types of content numeric data and textual data. For Textual Data it is a good UX that you do left justification , For Numeric Data , it is a good UX that you do right justification. In this case data comparisons will be easier to perform and errors will be easier to detect.
It is good UX for the values to be aligned in the way that works best, and you need to take into consideration a number of factors (some of which I have listed here):
- Basic of numerical value (integers or decimals)
- Data type of numerical value and conventions (e.g. $, date, time)
- Alignment with the rest of the fields
- Length of the numerical value
- Behaviour of the text field/UI component (editable, live/updated)
- Type of application and expected behaviour by the user
I think when it look at all the different variables and factors, and balance that out with your requirements for the design, you should be able to come up with a decision that will best suit your purpose.