-
Notifications
You must be signed in to change notification settings - Fork 73
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
fix(weave): align tables column header cell text based on panel type #2486
Conversation
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
4b98cf5
to
13b3646
Compare
Preview this PR with FeatureBee: https://beta.wandb.ai/?betaVersion=9715752c3bbd08ee13480702a3192e36cb899a71 |
I have read the CLA Document and I hereby sign the CLA |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even though this PR doesn't introduce the problem with the ellipsis it does seem like it would be encountered a lot more frequently with this change. This is part of a larger problem with indicators in the header e.g pinned columns.
I don't know how hard it would be to fix the underlying issue, but you might want to take a crack at it before merging this one in.
103c656
to
77a492b
Compare
77a492b
to
79a29b3
Compare
2022f09
to
05f94db
Compare
Description
Internal JIRA: WB-17238
The JIRA reports a difficulty in difficulty in reading Tables because column header cells are left justified while numerical value cells are right justified.
This PR fixes that by using the same text alignment for the column header cell as the value cell. This solution differs from the proposed solution on the JIRA (center all header cells and cells) because typically numerical columns are right justified for visual clarity. It's easier to interpret the magnitude of cells when numerical values have the same level of precision. Non-numerical column header cells are defaulted to
center
text alignment.Previous PR that introduced the issue: #875
Implementation Details
I leveraged the new
WeaveFormatContext
from the PR mentioned above to add acolumnFormat
field to specifies the column headers'textAlign
value.Screenshots
Before:
After:
One thing to note, on hover-over, the
EllipsisIcon
to trigger the Popup will overlap the column name text due to its negative margin.I thought this behavior is acceptable because it currently happens when the column widths are resized smaller than the column header text.
edit(10/02): See update below
Testing
How was this PR tested?
Visually with my pytorch-intro project.
Update to handle overlapping indicators
I took a display approach that material-ui data grid uses to place the indicators on the opposite side in reverse for numerical columns. This mitigates the ellipses stacking on the right justified column name.
Here's the column header on hoverover:
When pinned on hoverover:
Pinned, sorted on hoverover:
Without hoverover: