refactor: Extract duplicated perspective selector into Svelte 5 snippet#56
Merged
Merged
Conversation
…ippet Co-authored-by: rodrigogs <2362425+rodrigogs@users.noreply.github.com>
Contributor
Author
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Copilot
AI
changed the title
[WIP] Add responsive chat header options menu for small screens
refactor: Extract duplicated perspective selector into Svelte 5 snippet
Jan 5, 2026
rodrigogs
added a commit
that referenced
this pull request
Jan 5, 2026
* feat: add responsive chat header options menu for small screens - Add options menu button (3-dot vertical) for screens < md breakpoint - Group perspective, media gallery, bookmarks, and stats into dropdown menu - Keep locale switcher and theme toggle always visible - Maintain individual buttons on large screens (>= md breakpoint) - Improve mobile UX by reducing header button clutter * fix: perspective dropdown now works properly on small screens - Switch dropdown content instead of opening second dropdown - Keep options menu open while showing perspective selector - Reset perspective search on menu close - Smoother UX without menu reopening required * refactor: Extract duplicated perspective selector into Svelte 5 snippet (#56) * Initial plan * refactor: extract duplicated perspective selector UI into reusable snippet Co-authored-by: rodrigogs <2362425+rodrigogs@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: rodrigogs <2362425+rodrigogs@users.noreply.github.com> * refactor: extract perspective selector to snippet and fix menu behavior - Extract duplicate perspective selector UI into reusable snippet - Close chat options menu after selecting a perspective - Reduce code duplication from 2 instances to 1 snippet - Improve consistency and maintainability Addresses Copilot PR review comments * fix: remove duplicate snippet declaration - Remove duplicate perspectiveSelectorContent snippet - Keep only the top-level snippet declaration - Fix build error: Identifier already declared --------- Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: rodrigogs <2362425+rodrigogs@users.noreply.github.com>
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.
The perspective selector UI was duplicated between the small screen options menu and large screen standalone dropdown, requiring changes in two places.
Changes
perspectiveSelectorContent()containing the shared DropdownHeader, DropdownSearch, and participant list UI{#snippet perspectiveSelectorContent()} <DropdownHeader title={m.perspective_view_as()} /> <DropdownSearch bind:value={perspectiveSearchQuery} ... /> <DropdownList> <!-- participant list items --> </DropdownList> {/snippet} <!-- Used in both small and large screen layouts --> {@render perspectiveSelectorContent()}This ensures both menus stay in sync and changes only need to be made once.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.