Skip to content

Conversation

@pokocat
Copy link

@pokocat pokocat commented Nov 4, 2025

image **Motivation** Pinned items are a user's curated shortlist. Giving them a dedicated area and an easy way to reorder or unpin them makes day-to-day use faster and more intuitive. Persisting the pinned order removes the frustration of reordering after every app relaunch. The UI tweaks keep the numeric shortcut badges readable and add a convenient Pin action to normal history items without cluttering the interface. **Changes**
  • New PinnedSectionView at the top of the popup:

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.

  • Stable pinned order persistence:

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.

  • UI Refinements:

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.

@pokocat pokocat marked this pull request as draft November 5, 2025 06:23
@mithunsridharan
Copy link

mithunsridharan commented Nov 6, 2025

@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:

  • Include a shortcut to move the pinned items up / down, e.g., using the arrow keys / drag and drop via mouse in managed mode. I find clicking the up / down arrows using the mouse to be somewhat cumbersome, especially if one has a lot of pinned items as I do
  • I've attempted to allow sorting via Pin Keys (check PR Pins sorting logic for popup and panels #1263 ). Could you integrate the automatic and manual sorting logic, please?

Thanks for this cool feature!

PS: I've updated the PR with a (hopefully) better implementation of the sorting logic

@p0deje
Copy link
Owner

p0deje commented Nov 22, 2025

@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.

@mithunsridharan
Copy link

mithunsridharan commented Nov 23, 2025

@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!

@pokocat
Copy link
Author

pokocat commented Nov 24, 2025

@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.

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..

@mithunsridharan
Copy link

@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.

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.

3 participants