-
Notifications
You must be signed in to change notification settings - Fork 3
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
Table: onClick header and sort stories #233
Table: onClick header and sort stories #233
Conversation
e83e159
to
42ad223
Compare
…o chore/simplify-table-styling
59031fd
to
d5d90b1
Compare
d5d90b1
to
d530319
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.
Personally, I can see UI and UX improvements, but I won't ask to do it in this PR.
Because, at some point, the design team will ask to change it based on a design (hopefully).
So I focused my review only on the technical level
We now have design for the headers 🎊 |
99672a8
to
346cca4
Compare
I implemented the design, seems to work easily enough 👌 I just renamed Also CI complains about a missing |
346cca4
to
f6f956b
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 good !
Just a comment about aria label for the sort button
Also, what your opinion about the answer I gave you for this discussion #233 (comment) ?
Summary
The goal for this PR is to add a sort system, by making the header clickable and adding a sort direction indicator
(Internal for Opendatasoft only) Associated Shortcut ticket: sc-48046.
Changes
I simply added a
on:click
and an icon in the header. Same as for pagination, we way want to deal with api calls so it doesn't really make sense to implement sort function. The UI is then just a controlled/stateless interface.Sorties kinda exemplify what the result could be (sort function of the "api" is stupid on only really works on numbers).
Changelog
Table now have a sort mechanism.
Open discussion
The current implementation lacks definitive icons. But maybe we could accept any icon as prop? This opens a lot of questions however (security with SVG, format compitibility etc.), but might not be that hard.
Review checklist