8000 feat(Table): favoritable sortable header cell and example by adamviktora · Pull Request #10823 · patternfly/patternfly-react · GitHub
[go: up one dir, main page]

Skip to content

feat(Table): favoritable sortable header cell and example#10823

Merged
tlabaj merged 3 commits intopatternfly:mainfrom
adamviktora:table-favorite-sortable
Sep 20, 2024
Merged

feat(Table): favoritable sortable header cell and example#10823
tlabaj merged 3 commits intopatternfly:mainfrom
adamviktora:table-favorite-sortable

Conversation

@adamviktora
Copy link
Contributor
@adamviktora adamviktora commented Jul 31, 2024

What: Closes #10415

Additional issues:
I am not sure what styling should be applied to the star icon in the header when it is clicked. Previously it had the blue color applied (same as the sort arrow indicator). But now it is a separate button. I don't think we have a suitable class for that case. For now I just applied pf-m-favorited (the same as for the individual rows with stars), it can be seen on the example bellow:

Screen.Recording.2024-07-30.at.16.38.21.mov

Now that the pf-v6-c-table__favorite class (styles.tableFavorite) is applied to th instead of pf-m-favorite (styles.modifiers.favorite), it messes up the deprecated example. (I assume it is OK, given that it already was deprecated in V5)
Screenshot 2024-08-21 at 13 45 09

@adamviktora adamviktora linked an issue Jul 31, 2024 that may be closed by this pull request
4 tasks
@patternfly-build
Copy link
Collaborator
patternfly-build commented Jul 31, 2024

Copy link
Contributor
@thatblindgeye thatblindgeye left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have an initial comment below, but also after seeing it in React I do have a question as to the intent of the functionality of this implementation in general.

cc @andrew-ronaldson @lboehling @kaylachumley Is the intent for this implementation of a favoritable + sortable table that it acts how the PR currently is? That is, clicking a row's favorite button simple marks it as a favorite which can then be sorted, essentially the same thing as a "checkbox table" except with star icons instead of checkbox inputs?

Or is the intent for a favoritable table that it would act similar to our favoritable menu example, where favoriting a menu item basically creates a copy of the item at the top of the menu (in a "favorites" section) while retaining the original item in its normal flow?

@adamviktora adamviktora force-pushed the table-favorite-sortable branch 2 times, most recently from 63d5cbc to f2d7c67 Compare August 20, 2024 10:25
@adamviktora adamviktora force-pushed the table-favorite-sortable branch from f2d7c67 to 3109b56 Compare August 20, 2024 11:09
@adamviktora adamviktora force-pushed the table-favorite-sortable branch from 99aeee1 to dbf8ea3 Compare August 21, 2024 11:35
@tlabaj tlabaj requested review from a team, kmcfaul and tlabaj and removed request for a team and tlabaj August 28, 2024 14:06
@andrew-ronaldson
Copy link
Collaborator

@thatblindgeye I believe the former is correct. If it does functions like a checkbox clicking on the favorite icon in the th would be a Favourite All action and potentially annoying if done by mistake. Almost need an undo button so a user doesn't have to sift through to get back to their original favourites list

Copy link
Contributor
@mcoker mcoker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@tlabaj tlabaj merged commit 7eb9dfa into patternfly:main Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Table favorite sortable followup #6461

7 participants

0