-
-
Notifications
You must be signed in to change notification settings - Fork 821
Add Pinned Management Section and UI Polish #1247
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
base: master
Are you sure you want to change the base?
Conversation
|
@pokocat Nice feature and idea to manually sort the pins. I do have a couple of enhancement ideas that I'd like you to consider:
Thanks for this cool feature! PS: I've updated the PR with a (hopefully) better implementation of the sorting logic |
|
@pokocat This is really cool, thank you for sharing this PR and working on it. I would like to see if we can push it even further and implement a drag-and-drop operation on the history items. This way, we won't even need to implement a separate "Manage" mode because users can click on the item, drag it to the position they want, and this would update the order. |
To add my 2 cents: an option to move the items via keyboard, say via Control / Option key. That would be awesome! |
good advise! but I noticed that there're already hover event on each item, I have to find a way to do so. But I’ve got my hands full at the moment, I'll continue working on it later.. |
|
@pokocat Please take a look at #1263 and #1265 (needs fixing, but you might want to check whether you could re-use some code / logic from this PR). The issue with #1265 is that there's a conflict between automatic and manual sorting that I haven't managed to fix yet, but hopefully, you have a head start here. |
Shows a "Pinned" header with a "Manage"/"Done" toggle.
In manage mode, each pinned item exposes "Unpin" and "Move Up"/"Move Down" controls.
Adds a divider between pinned and unpinned lists when there’s no search query and both sections are present.
Defaults.pinnedOrder stores the user-defined pin order.
Sorter.sort now respects Defaults.pinnedOrder when assembling the list, honoring the user's pins position preference.
History.togglePin updates Defaults.pinnedOrder on pin/unpin actions; History.movePinnedUp/Down adjusts the order and persists it.
Increased the trailing padding of pinned item management controls to prevent them from overlapping with the right-side shortcut badges.
Added a hover-only quick "Pin" button on the right side of unpinned items.
When numeric shortcut badges are present, a thin separator is inserted to visually distinguish them from the new "Pin" action.