Offer hiding columns from the Performance Analysis table#129
Offer hiding columns from the Performance Analysis table#129JosephMarinier merged 7 commits intodevfrom
Conversation
2f5819d to
6f02a43
Compare
There was a problem hiding this comment.
I know it's a shame that this ends up here, but that's the best I can come up with after an hour of trying different solutions.
There was a problem hiding this comment.
A general question to @JosephMarinier on the PR description. Can you explain a bit about hiding sort options? Do you mean the default sort of datagrid is disabled for all the columns in the performance analysis?
This is hiding the sort options from the column menu (visible on the first screenshot). I have not changed the options themselves.
There was a problem hiding this comment.
Is it really important to hide this option? Like is it bad that we can sort from two places?
There was a problem hiding this comment.
It's not "really" important, but I thought the extra 3 buttons were making the menu overly complex, given they were not adding functionality. Also, they are not affected by the sortingOrder we define, so the null sorting option is there even if it is useless.
There was a problem hiding this comment.
It's probably fine but it seems brittle... what if MUI adds a new option to the menu?
There was a problem hiding this comment.
So few letter were saved by this abbreviation. I added 5 pixels and the whole thing fits.
There was a problem hiding this comment.
What about Utterance Count?
There was a problem hiding this comment.
I'm fine with that too! I'm not sure why it was "Number of utterances" though. Maybe @christyler3030 can confirm?
|
A general question to @JosephMarinier on the PR description. Can you explain a bit about hiding sort options? Do you mean the default sort of datagrid is disabled for all the columns in the performance analysis? |
- Hide filter options (with handy boolean attribute) - Hide sort options since they are already available via the sorting button (in global CSS, as `sx` doesn't work since the popover menu is not a child of the `DataGrid`)
to accommodate hiding columns. Also taking this opportunity to adjust the widths to new outcome names.
in headers to avoid ambiguity with which column the menu button belongs to.
- Show the initial sort - Disable `sortingOrder=null` as it is redundant with sorting by `utteranceCount` `desc`
6f02a43 to
40237b9
Compare
| field: outcome, | ||
| headerName: OUTCOME_PRETTY_NAMES[outcome], | ||
| flex: 1, | ||
| minWidth: 160, |
There was a problem hiding this comment.
Would it be worth having maxWidth on the columns as well for uses where there are very few columns?
There was a problem hiding this comment.
Ho interesting idea! 👍 Let me play with that...
There was a problem hiding this comment.
Yup, pretty cool! I just Set maxWidth so that columns stop getting wider going under 6 columns.
| { | ||
| width: 206, | ||
| field: "filterValue", | ||
| headerName: OPTION_PRETTY_NAME[selectedMetricPerFilterOption], |
There was a problem hiding this comment.
The headerName is not shown in the header since we have a renderHeader, but it is used in the show/hide columns menu. See second screenshot in PR description.
so that columns stop getting wider going under 6 columns.
christyler3030
left a comment
There was a problem hiding this comment.
Approved with some hesitancy about the table theme override
to remove sort menu items
Resolve #126
Description:
sxdoesn't work since the popover menu is not a child of theDataGrid)sortingOrder=nullas it is redundant with sorting byutteranceCountdescChecklist:
You should check all boxes before the PR is ready. If a box does not apply, check it to acknowledge
it.
ran
pre-commit run --all-filesat the end.Run
cd webapp && yarn typeswhile the back-end is running.our users.
READMEfiles and our wiki for any big design decisions, if relevant.