-
Notifications
You must be signed in to change notification settings - Fork 43
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
✨ integrate column management feature into apps table #1767
Conversation
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.
Some comments below (based on experience gathered from kubev2v/forklift-console-plugin#64 and follow-ups)
client/src/app/pages/applications/applications-table/applications-table.tsx
Outdated
Show resolved
Hide resolved
client/src/app/pages/applications/applications-table/applications-table.tsx
Outdated
Show resolved
Hide resolved
316bb70
to
076f9a2
Compare
Screen.Recording.2024-03-21.at.10.43.45.AM.mov |
076f9a2
to
d10dbac
Compare
5ee0e04
to
139b48b
Compare
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.
Overall the change LGTM. A few comments, and only 1 console.log that should be taken out.
<Th {...getThProps({ columnKey: "tags" })} width={10} /> | ||
<Th {...getThProps({ columnKey: "effort" })} width={10} /> | ||
{/* {columnState.columns. isVisible then render this column} */} | ||
{getColumnVisibility("name") && ( |
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 don't mind this approach.
The visibility
prop exists and is used in the PF docs to use the css breakpoints to show/hide columns. Fun fact is that prop is not in any of the generated docs and it needs to be tracked down in sources. I tried that and got lost pretty quick. Probably isn't worth trying to use visibility
for the user based show/hide column support.
const [columns, setColumns] = useState<ColumnState<TColumnKey>[]>( | ||
args.initialColumns | ||
); | ||
return { columns, setColumns }; |
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 this is where you'd have to add column visibility persistence past the component state level that is used now. I predict there will be a QE ticket filed in less than 10 minutes of app testing say that the column visibility doesn't persist page page refreshes.
A chat before testing would help. Maybe even loop docs in to level set expectations as to how long the column management state lives.
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.
Added local storage support for the column names.
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.
Now that I'm running it to play around, I have 2 comments, one of which needs to be resolved for sure:
- The column name in the list is not center aligned (needs to be fixed)
- I highly suggest that the Name column is setup to be required. It can show up on the list, and the checkbox checked, but the checkbox being disabled.
client/src/app/pages/applications/applications-table/components/manage-columns-toolbar.tsx
Outdated
Show resolved
Hide resolved
client/src/app/pages/applications/applications-table/components/manage-columns-modal.tsx
Outdated
Show resolved
Hide resolved
client/src/app/pages/applications/applications-table/components/manage-columns-toolbar.tsx
Outdated
Show resolved
Hide resolved
Signed-off-by: Ian Bolton <[email protected]>
fee201f
to
e2a0503
Compare
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.
Looks really good. The only highly recommended change would be for the i18next strings in the ManageColumnsToolbar
.
client/src/app/pages/applications/applications-table/components/manage-columns-modal.tsx
Show resolved
Hide resolved
client/src/app/pages/applications/applications-table/components/manage-columns-toolbar.tsx
Outdated
Show resolved
Hide resolved
Signed-off-by: Ian Bolton <[email protected]>
Signed-off-by: Ian Bolton <[email protected]>
463ee9a
to
7d245ed
Compare
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.
Looks OK to me. Any open points can be addressed in follow-ups.
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.
LGTM
Resolves #1765