feat(Table): favoritable sortable header cell and example#10823
feat(Table): favoritable sortable header cell and example#10823tlabaj merged 3 commits intopatternfly:mainfrom
Conversation
|
Preview: https://patternfly-react-pr-10823.surge.sh A11y report: https://patternfly-react-pr-10823-a11y.surge.sh |
There was a problem hiding this comment.
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?
63d5cbc to
f2d7c67
Compare
f2d7c67 to
3109b56
Compare
99aeee1 to
dbf8ea3
Compare
|
@thatblindgeye I believe the former is correct. If it does functions like a checkbox clicking on the favorite icon in the |
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__favoriteclass (styles.tableFavorite) is applied tothinstead ofpf-m-favorite(styles.modifiers.favorite), it messes up the deprecated example. (I assume it is OK, given that it already was deprecated in V5)