Repository navigation
feat(web): search, pin and reorder projects in the new-thread menus - #1042
Merged
Merged
Conversation
The project menus that start a new thread ("What's next in …?" and the
home screen's "New thread in…") were one long list sorted by activity,
so with many projects users scrolled to find one (#1040).
Both menus now share one ProjectPickerMenu:
- A search line (from 9 projects, not on touch) matches names and every
checkout folder.
- A pin on each row (or Alt+P) keeps a project in a Pinned group on top.
Pins are kept by folder in the UI state store, on this device.
- Rows drag to reorder within their group: anywhere on the row with a
mouse or pen, by a grip with a finger, Alt+Up/Down from the keyboard,
with auto-scroll. The shown rows trade places in their own slots, so
rows a search hid and a project's other checkouts keep theirs.
- The first drag switches sidebarProjectSortOrder to manual; "Reset to
automatic order" switches it back.
useOrderedProjects puts pinned projects first, so the default project
for New thread follows the pins too.
The saved order also survives computers connecting in a different
sequence: a project that arrives after the order exists goes back to
its saved place, and saving keeps the places of projects not loaded yet.
The app guide's threads topic describes the menu.
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1040.
With many projects, picking one from "What's next in …?" on the new-thread screen (or "New thread in…" on the home screen) meant scrolling one long list sorted by activity. There was no search, no way to keep favorites on top, and no custom order.
What changed
Both menus now share one
ProjectPickerMenu:sidebarProjectSortOrderto manual. "Reset to automatic order" switches it back.useOrderedProjectsputs pinned projects first, so the default project for New thread follows the pins.The saved order also survives computers connecting in a different sequence. A project that loads after the order exists goes back to its saved place, and saving keeps the places of projects that aren't loaded yet. Before this, the order was rebuilt in whatever sequence computers connected.
The app guide's threads topic describes the menu.
Not in this PR
Testing
ProjectPickerMenu.browser.tsxcovers pinning, folder search, Enter on a match, drag order and reset.projectPickerOrder.test.ts) and a project from a computer that connects later (uiStateStore.test.ts).vp fmt,vp lint,vp run typecheckand the guide tests pass.