-
Notifications
You must be signed in to change notification settings - Fork 30
feat: Add new Column Management Modal component #129
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
Conversation
packages/module/src/ColumnManagementModal/ColumnManagementModal.test.tsx
Show resolved
Hide resolved
packages/module/src/ColumnManagementModal/ColumnManagementModal.tsx
Outdated
Show resolved
Hide resolved
packages/module/src/ColumnManagementModal/ColumnManagementModal.tsx
Outdated
Show resolved
Hide resolved
packages/module/src/ColumnManagementModal/ColumnManagementModal.tsx
Outdated
Show resolved
Hide resolved
packages/module/src/ColumnManagementModal/ColumnManagementModal.tsx
Outdated
Show resolved
Hide resolved
packages/module/src/ColumnManagementModal/ColumnManagementModal.tsx
Outdated
Show resolved
Hide resolved
packages/module/src/ColumnManagementModal/ColumnManagementModal.tsx
Outdated
Show resolved
Hide resolved
packages/module/src/ColumnManagementModal/ColumnManagementModal.tsx
Outdated
Show resolved
Hide resolved
packages/module/src/ColumnManagementModal/ColumnManagementModal.tsx
Outdated
Show resolved
Hide resolved
.../extensions/component-groups/examples/ColumnManagementModal/ColumnManagementModalExample.tsx
Outdated
Show resolved
Hide resolved
.../extensions/component-groups/examples/ColumnManagementModal/ColumnManagementModalExample.tsx
Outdated
Show resolved
Hide resolved
packages/module/src/ColumnManagementModal/ColumnManagementModal.tsx
Outdated
Show resolved
Hide resolved
packages/module/src/ColumnManagementModal/ColumnManagementModal.tsx
Outdated
Show resolved
Hide resolved
packages/module/src/ColumnManagementModal/ColumnManagementModal.tsx
Outdated
Show resolved
Hide resolved
packages/module/src/ColumnManagementModal/ColumnManagementModal.tsx
Outdated
Show resolved
Hide resolved
packages/module/src/ColumnManagementModal/ColumnManagementModal.tsx
Outdated
Show resolved
Hide resolved
.../content/extensions/component-groups/examples/ColumnManagementModal/ColumnManagementModal.md
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.
@leSamo thank you for your contribution. It looks really good! I've added some comments. Some of them may be worth discussion. Please let me know what do you think or if you need any help 🙂
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.
The only thing I am noticing is the modal buttons. There was a decision on PF to make the Cancel button be a plain text button rather than the secondary button styling. I found that our Managed columns react demo was not updated so I created an issue to make that change on our PatternFly site.
Screenshot is a v6 example but the Cancel button is shown accurately.

03d14ef to
556fa4b
Compare
|
Thank you @fhlavac for the comprehensive review, I have (hopefully) addressed all of your and @ andrew-ronaldson's comments. |
.../content/extensions/component-groups/examples/ColumnManagementModal/ColumnManagementModal.md
Outdated
Show resolved
Hide resolved
…roups/examples/ColumnManagementModal/ColumnManagementModal.md Co-authored-by: Filip Hlavac <[email protected]>
.../content/extensions/component-groups/examples/ColumnManagementModal/ColumnManagementModal.md
Outdated
Show resolved
Hide resolved
…roups/examples/ColumnManagementModal/ColumnManagementModal.md
|
@andrew-ronaldson can you please take a look? So this one can be merged |
|
Looks good! I think the only comment I have leans more into the design guidelines. The example given includes a primary button as the trigger for this modal. That's fine on its own but if the table has a toolbar with other actions we should only have one primary button on the page. In OCP we had these buttons to trigger the manage column modal. If I want to use this code in my product, can I easily change that primary button to a secondary or icon button? If that's the case I think we just need a bit of text pointing to design guidelines for buttons. |
|
@andrew-ronaldson The primary button is just part of the example, not the component itself, so the user can use any trigger he wants. There is probably no need for this trigger to be part of the component. But perhaps we could update our examples to show the proposed trigger compliant with the guidelines? @leSamo what do you think? |
|
@andrew-ronaldson I changed the example button variant to secondary and added an icon to the example. The button is not part of the component, since there are various ways to implement it, I think the majority of the time the button will be inside of a kebab menu. Is this okay? |
andrew-ronaldson
left a comment
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, thanks!
|
🎉 This PR is included in version 5.2.0-prerelease.3 🎉 The release is available on: Your semantic-release bot 📦🚀 |


Column Management Modal
Associated ticket: RHINENG-3003
What
Implement a modal that a user can use to configure the visibility of individual table columns. The modal supports columns that are hidden by default and also those that should be unhideable.
Screencastfrom2024-04-1216-04-18-ezgif.com-video-to-gif-converter.webm
Why
Since there is a request (see the associated ticket above) to implement column management in tables in all apps across Insights it would make sense to abstract a component that could be reused. Currently, the only implementation of column management is in Insights Vulnerability (hidden inside kebab menu in table toolbar). This PR is based on the Vulnerability's implementation inspired by the PF column management demo.
Example usage in practice with Redux