feat(start-menu): add context menu with pin/unpin for apps#64
Open
PrayagCodes wants to merge 1 commit intocodepath:mainfrom
Open
feat(start-menu): add context menu with pin/unpin for apps#64PrayagCodes wants to merge 1 commit intocodepath:mainfrom
PrayagCodes wants to merge 1 commit intocodepath:mainfrom
Conversation
Add right-click context menu to start menu apps with 'Open' and pin/unpin options. Users can now pin/unpin apps to taskbar directly from start menu without launching them first. - Add contextmenu handler for .start-app elements - Implement pinAppToTaskbar() and unpinAppFromTaskbar() functions - Fix window.user.taskbar_items state synchronization - Fix backend persistence (JSON.stringify taskbar_items) - Close existing menus before opening new ones
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.
Summary
Adds right-click context menu support for apps in the start menu, allowing users to launch apps and pin/unpin them to the taskbar directly from the start menu without needing to launch the app first.
Problem
Previously, users could only pin apps to the taskbar by:
This created unnecessary friction for users who wanted to organize their taskbar without launching apps.
Solution
This PR adds a context menu to start menu apps that provides:
Changes
Frontend (
src/gui/src/UI/UIDesktop.js).start-appelements (right-click/taphold)isAppPinned()helper function to check pinned statepinAppToTaskbar()function to add apps to taskbarunpinAppFromTaskbar()function to remove apps from taskbarupdate_taskbar()to keep in-memory state in sync with DOMUITaskbarItemimportBackend (
src/backend/src/routers/update-taskbar-items.js)Technical Details
UIContextMenucomponent for consistencywindow.user.taskbar_itemswith DOM stateTesting
Manual Testing Checklist
Test Scenarios
Pin from start menu
Unpin from start menu (no windows)
Unpin with windows open
Multiple menus prevention