[WEB-5088] feat: Power K v2 (#7905)

* feat: add project shortcut in command palette

* feat: global project switcher shortcut

* refactor: generalize command palette entity handling

* feat: extend command palette navigation

* feat: add issue shortcut to command palette

* feat: add modular project selection for cycle navigation

* chore: add reusable command palette utilities

* fix: update key sequence handling to use window methods for timeout management

* fix: build errors

* chore: minor ux copy improvements

* feat: implement a new command registry and renderer for enhanced command palette functionality

* feat: introduce new command palette components and enhance search functionality

* feat: enhance command palette components with improved initialization and loading indicators

* feat: Implement new command palette architecture with multi-step commands, context-aware filtering, and reusable components. Add comprehensive documentation and integration guides. Enhance command execution with a dedicated executor and context provider. Introduce new command types and improve existing command definitions for better usability and maintainability.

* refactor: hook arguments

* refactor: folder structure

* refactor: update import paths

* fix: context prop drilling

* refactor: update search components

* refactor: create actions

* chore: add type to pages

* chore: init contextual actions

* refactor: context based actions code split

* chore: module context-based actions

* refactor: streamline command execution flow and enhance multi-step handling in command palette

* refactor: remove placeholder management from command execution and implement centralized placeholder mapping

* chore: cycle context based actions

* refactor: simplify command execution by consolidating selection steps and adding page change handling

* chore: added more options to work item contextual actions

* chore: page context actions

* refactor: update step type definitions and enhance page mapping for command execution

* feat: implement Command Palette V2 with global shortcuts and enhanced context handling

* refactor: power k v2

* refactor: creation commands

* feat: add navigation utility for Power K context handling

* feat: implement comprehensive navigation commands for Power K

* refactor: work item contextual actions

* fix: build errors

* refactor: remaining contextual actions

* refactor: remove old code

* chore: update placeholder

* refactor: enhance command registry with observable properties and context-aware shortcut handling

* refactor: improve command filtering logic in CommandPaletteModal

* chore: context indicator

* chore: misc actions

* style: shortcut badge

* feat: add open entity actions and enhance navigation commands for Power K

* refactor: rename and reorganize Power K components for improved clarity and structure

* refactor: update CommandPalette components and streamline global shortcuts handling

* refactor: adjust debounce timing in CommandPaletteModal for improved responsiveness

* feat: implement shortcuts modal and enhance command registry for better shortcut management

* fix: search implemented

* refactor: search results code split

* refactor: search results code split

* feat: introduce creation and navigation command modules for Power K, enhancing command organization and functionality

* chore: update menu logos

* refactor: remove unused PowerKOpenEntityActionsExtended component from command palette

* refactor: search menu

* fix: clear context on backspace and manual clear

* refactor: rename creation command keys for consistency and clarity in Power K

* chore: added intake in global search

* chore: preferences menu

* chore: removed the empty serach params

* revert: command palette changes

* cleanup

* refactor: update command IDs to use underscores for consistency across Power K components

* refactor: extended context based actions

* chore: modal command item status props

* refactor: replace CommandPalette with CommandPaletteProvider in settings and profile layouts

* refactor: update settings menu to use translated labels instead of i18n labels

* refactor: update command titles to use translation keys for creation actions

* refactor: update navigation command titles to use translation keys for consistency

* chore: minor cleanup

* chore: misc commands added

* chore: code split for no search results command

* chore: state menu items for work item context based commands

* chore: add more props to no search results command

* chore: add more props to no search results command

* refactor: remove shortcut key for create workspace command

* Refactor command palette to use PowerK store

- Replaced instances of `useCommandPalette` with `usePowerK` across various components, including `AppSearch`, `CommandModal`, and `CommandPalette`.
- Introduced `PowerKStore` to manage modal states and commands, enhancing the command palette functionality.
- Updated modal handling to toggle `PowerKModal` and `ShortcutsListModal` instead of the previous command palette modals.
- Refactored related components to ensure compatibility with the new store structure and maintain functionality.

* Refactor PowerK command handling to remove context dependency

- Updated `usePowerKCommands` and `usePowerKCreationCommands` to eliminate the need for a context parameter, simplifying their usage.
- Adjusted related command records to utilize the new structure, ensuring consistent access to command configurations.
- Enhanced permission checks in creation commands to utilize user project roles for better access control.

* chore: add context indicator

* chore: update type import

* chore: migrate toast implementation from @plane/ui to @plane/propel/toast across multiple command files

* refactor: power k modal wrapper and provider

* fix: type imports

* chore: update creation command shortcuts

* fix: page context commands

* chore: update navigation and open command shortcuts

* fix: work item standalone page modals

* fix: context indicator visibility

* fix: potential error points

* fix: build errors

* fix: lint errors

* fix: import order

---------

Co-authored-by: Vihar Kurama <vihar.kurama@gmail.com>
Co-authored-by: Prateek Shourya <prateekshourya29@gmail.com>
Co-authored-by: NarayanBavisetti <narayan3119@gmail.com>
This commit is contained in:
Aaryan Khandelwal 2025-10-29 15:38:30 +05:30 committed by GitHub
parent 73e0e8d529
commit 350107d6c1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
126 changed files with 5944 additions and 1784 deletions

View file

@ -2476,4 +2476,185 @@ export default {
joining_date: "Joining date",
role: "Role",
},
power_k: {
contextual_actions: {
work_item: {
title: "Work item actions",
indicator: "Work item",
change_state: "Change state",
change_priority: "Change priority",
change_assignees: "Assign to",
assign_to_me: "Assign to me",
unassign_from_me: "Un-assign from me",
change_estimate: "Change estimate",
add_to_cycle: "Add to cycle",
add_to_modules: "Add to modules",
add_labels: "Add labels",
subscribe: "Subscribe to notifications",
unsubscribe: "Unsubscribe from notifications",
delete: "Delete",
copy_id: "Copy ID",
copy_id_toast_success: "Work item ID copied to clipboard.",
copy_id_toast_error: "Some error occurred while copying the work item ID to clipboard.",
copy_title: "Copy title",
copy_title_toast_success: "Work item title copied to clipboard.",
copy_title_toast_error: "Some error occurred while copying the work item title to clipboard.",
copy_url: "Copy URL",
copy_url_toast_success: "Work item URL copied to clipboard.",
copy_url_toast_error: "Some error occurred while copying the work item URL to clipboard.",
},
cycle: {
title: "Cycle actions",
indicator: "Cycle",
add_to_favorites: "Add to favorites",
remove_from_favorites: "Remove from favorites",
copy_url: "Copy URL",
copy_url_toast_success: "Cycle URL copied to clipboard.",
copy_url_toast_error: "Some error occurred while copying the cycle URL to clipboard.",
},
module: {
title: "Module actions",
indicator: "Module",
add_remove_members: "Add/remove members",
change_status: "Change status",
add_to_favorites: "Add to favorites",
remove_from_favorites: "Remove from favorites",
copy_url: "Copy URL",
copy_url_toast_success: "Module URL copied to clipboard.",
copy_url_toast_error: "Some error occurred while copying the module URL to clipboard.",
},
page: {
title: "Page actions",
indicator: "Page",
lock: "Lock",
unlock: "Unlock",
make_private: "Make private",
make_public: "Make public",
archive: "Archive",
restore: "Restore",
add_to_favorites: "Add to favorites",
remove_from_favorites: "Remove from favorites",
copy_url: "Copy URL",
copy_url_toast_success: "Page URL copied to clipboard.",
copy_url_toast_error: "Some error occurred while copying the page URL to clipboard.",
},
},
creation_actions: {
create_work_item: "New work item",
create_page: "New page",
create_view: "New view",
create_cycle: "New cycle",
create_module: "New module",
create_project: "New project",
create_workspace: "New workspace",
},
navigation_actions: {
open_workspace: "Open a workspace",
nav_home: "Go to home",
nav_inbox: "Go to inbox",
nav_your_work: "Go to your work",
nav_account_settings: "Go to account settings",
open_project: "Open a project",
nav_projects_list: "Go to projects list",
nav_all_workspace_work_items: "Go to all work items",
nav_assigned_workspace_work_items: "Go to assigned work items",
nav_created_workspace_work_items: "Go to created work items",
nav_subscribed_workspace_work_items: "Go to subscribed work items",
nav_workspace_analytics: "Go to workspace analytics",
nav_workspace_drafts: "Go to workspace drafts",
nav_workspace_archives: "Go to workspace archives",
open_workspace_setting: "Open a workspace setting",
nav_workspace_settings: "Go to workspace settings",
nav_project_work_items: "Go to work items",
open_project_cycle: "Open a cycle",
nav_project_cycles: "Go to cycles",
open_project_module: "Open a module",
nav_project_modules: "Go to modules",
open_project_view: "Open a project view",
nav_project_views: "Go to project views",
nav_project_pages: "Go to pages",
nav_project_intake: "Go to intake",
nav_project_archives: "Go to project archives",
open_project_setting: "Open a project setting",
nav_project_settings: "Go to project settings",
},
account_actions: {
sign_out: "Sign out",
workspace_invites: "Workspace invites",
},
miscellaneous_actions: {
toggle_app_sidebar: "Toggle app sidebar",
copy_current_page_url: "Copy current page URL",
copy_current_page_url_toast_success: "Current page URL copied to clipboard.",
copy_current_page_url_toast_error: "Some error occurred while copying the current page URL to clipboard.",
},
preferences_actions: {
update_theme: "Change interface theme",
update_timezone: "Change timezone",
update_start_of_week: "Change first day of week",
update_language: "Change interface language",
toast: {
theme: {
success: "Theme updated successfully.",
error: "Failed to update theme. Please try again.",
},
timezone: {
success: "Timezone updated successfully.",
error: "Failed to update timezone. Please try again.",
},
generic: {
success: "Preferences updated successfully.",
error: "Failed to update preferences. Please try again.",
},
},
},
help_actions: {
open_keyboard_shortcuts: "Open keyboard shortcuts",
open_plane_documentation: "Open Plane documentation",
join_discord: "Join our Discord",
report_bug: "Report a bug",
chat_with_us: "Chat with us",
},
page_placeholders: {
default: "Type a command or search",
open_workspace: "Open a workspace",
open_project: "Open a project",
open_workspace_setting: "Open a workspace setting",
open_project_cycle: "Open a cycle",
open_project_module: "Open a module",
open_project_view: "Open a project view",
open_project_setting: "Open a project setting",
update_work_item_state: "Change state",
update_work_item_priority: "Change priority",
update_work_item_assignee: "Assign to",
update_work_item_estimate: "Change estimate",
update_work_item_cycle: "Add to cycle",
update_work_item_module: "Add to modules",
update_work_item_labels: "Add labels",
update_module_member: "Change members",
update_module_status: "Change status",
update_theme: "Change theme",
update_timezone: "Change timezone",
update_start_of_week: "Change first day of week",
update_language: "Change language",
},
search_menu: {
no_results: "No results found",
clear_search: "Clear search",
},
footer: {
workspace_level: "Workspace level",
},
group_titles: {
contextual: "Contextual",
navigation: "Navigate",
create: "Create",
general: "General",
settings: "Settings",
account: "Account",
miscellaneous: "Miscellaneous",
preferences: "Preferences",
help: "Help",
},
},
} as const;