-
Notifications
You must be signed in to change notification settings - Fork 40
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
Issue 5311 - Add/remove columns in tickets table #5402
base: staging
Are you sure you want to change the base?
Conversation
<FormattedMessage id="ticketTable.column.header.title" defaultMessage="title" /> | ||
</SortingTableHeader> | ||
<SortingTableHeader name="modelName"> | ||
<FormattedMessage id="ticketTable.column.header.federationContainer" defaultMessage="federation / container" /> |
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.
Would there be any drawbacks to using the new COLUMN_NAME_TO_SETTINGS_LABEL from ticketsTable helpers in place of these formatted messages?
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.
I did this originally, but I found it harder to read honestly. I will proceed to refactor it and push it, so you can take a look. Lmk then now if you want to keep it as is
...eContent/ticketsTableGroup/columnsVisibilitySettings/columnsVisibilitySettings.component.tsx
Outdated
Show resolved
Hide resolved
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.
If you are looking at a template with few columns and then change to a template with many columns the columns will overflow and create a scrollbar. On refresh the columns are resized to fit the screen. Is this how it should be?
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.
I have not received direct instructions about this tbh, but I think the idea is to keep track of the columns width and maintain across the templates, which would not be the case. If you were to resize the table every time you change the template. But let's see what @carmenfan thinks about this
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.
My instinct would be it doesn't matter too much either way, by changing the template we're changing context so whether we keep the previous settings or reset everything it's a bit here nor there.
But let me spin up a deployment and have a play
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.
yea i don't think I care, whatever is easiest.
Unrelated note, also I'm not sure if @sanmont3drepo wanted it as a separated issue, but the list of possible columns should include all possibile properties and module properties. Atm I'm only seeing the default properties
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.
and group by should contain all the proeprties currently shown
Again not sure if Santiago wanted them as separate issues so ignore me if that's the case
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.
He didn't tell me anything about new columns/groups, but knowing him, that will probably be for another issue
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.
…mplate and data is lost when template changes
/azp run |
Azure Pipelines successfully started running 2 pipeline(s). |
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.
This fixes #5311
Description
I created the component that allows to select/deselect visible columns. Note that it updates the table on close (this is to prevent a UI oddity where the list moves right and left as you update it). The settings component will disable the last selected (visible) column, so that at least one column is always visible
I also enhanced the resizable table so that, instead of just receiving the "hiddenColumns" as a prop, it allows the children to update it.
Test cases
Add/Remove columns, change template, change selected models, group by different stuff: