Conversation
- Moved sorting dropdown to the right of the top bar - Changed pin icon behaviour to be a quick action button to unpin, and leaving the ellipsis menu always visible
|
Haven't done a full code review but some visual stuff I noticed (cc @sanne-san):
|
|
- Change "Most visitors" to "Visitors, high to low" and "Fewest visitors" to "Visitors, low to high" in the sort dropdown. - Add dedicated styles to Prima dropdown, rather than using button styles directly, as they diverge from button styles in a few ways. - Add data-sort-trigger attribute to sort dropdown so that loading state only applies to sorting, not to pinning/unpinning. - Add padding to search form to ensure consistent height with other form elements. - Ensure dropdown menu is always at least as wide as the trigger button. - Changed site card hover effect to shadow-md instead of shadow-lg.
16f0692 to
7fc9f85
Compare
|
@ukutaht thanks for noticing these – I had a bit of a rushed look yesterday, my bad. Fixed all the issues. On #3, I changed it to "Most visitors" and "Fewest visitors" for now, as we also agreed upon in the card. It's less ambiguous than arrows, but if we'll add more options (pageviews, conversion, etc.) we might have to switch to arrows anyway. Wdyt? I also switched from using the button css to using dedicated css for the dropdown. It's largely the same but diverges in a few ways (e.g. if the dropdown has a width that is wider than its content, it was now centering all content rather than content on the left and chevron on the right). I'm not sure but I think decoupling these styles altogether makes sense? I also ensured that the dropdown menu min-width equals the width of the trigger. It works, but not sure it's the right pattern. |
- These changes weren't supposed to go into this PR
|
From my point of view it's ready, pinning (+CRM), migration and persistence of choice included. Review(s) appreciated @plausible/developers |
|
@sanne-san looks good!
makes sense to me
The implementation itself is sound but the way it's patching Prima is quite hacky and error-prone IMO. Matching the trigger size is a common pattern for dropdowns so I'm thinking it would be best to add it as an option to Prima itself. Not a blocker for this PR |
|
@sanne-san I've added this to Prima now. Upgrade to 0.2.6 to get access to it. See example "Match Trigger Width" here. |
|
@ukutaht added a series of commits addressing your remarks, including a new migration for storing sort preferences. Upon approval I'll extract to separate PR. I've also simplified LV/index interactions and state maintenance. Let me know if that looks any better please. |
- Upgrade prima to 0.2.6 and replace the custom Dropdown hook that manually set min-width with the built-in match_trigger_width={true}.
Co-authored-by: Adrian Gruntkowski <adrian.gruntkowski@gmail.com>
Changes
This PR switches
/siteslisting to useSites.Indexfrom #6124Scrivener dependency gets removed, defaults to traffic sort descending.
@sanne-san whenever you have time, please have a look at the commits I mentioned you on.
I'll add another PR on top of it, where per user/team sort criteria preferences will be remembered on each setting.
Tests
Changelog
Documentation
Dark mode