-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
DataView: support different alignment for text and numbers #66623
Comments
Are there any other styles we might consider, for instance |
For the record, I've grouped together issues related to "theming" in the dataviews component issue, so they are visible #55083
DataViews may want to provide default styles tied to field types. For example, a field type "number" could provide the styling defaults for them. However, there's two important details to consider:
|
There are certain conventions that should probably be respected by default, not opt out. Aligning number fields right in table layout feels like one of those standards to me.
Could/should the API be expanded to include these details? Probably something to work out later, but aligning all number fields right seems like a reasonable place to start. |
Fair. I believe postal codes shouldn't be considered as numbers and wonder if there's any we could exclude them?
Yes I agree this is the way to start.
Interesting question. Would you mind expanding on that? I guess I don't really understand what styles the users can provide? Is this bold, italic etc?
I agree with @jameskoster. |
Yeah, exactly (I wondered if that should be a separate issue request, but...) for anything that is numbers only we should display it in tabular/monospace style. |
Currently, the DataView component only supports left alignment for all content, whether it's numbers or text. As we explore using tables for analytics and financial reports, where there will be more numbers, we need to improve accessibility by supporting different alignments.
The basic alignment requirements:
This change will make the data easier for users to read and interpret.
The text was updated successfully, but these errors were encountered: