feat: app dir migration (#4743)
* feat: creating new app dir structure for web app
* fix: moving few pages to app dir
* fix: adding profile settings layout
* fix: errors on app dir.
* chore: remove pages routes.
* chore: add sign-in/ sign-up, invitations, onboarding pages.
* [WEB-1374] fix: clear changes made on modal close (#4555)
* [WEB-1480] fix: preserve page access when making a copy (#4568)
* [WEB-1465] fix: theme fluctuation on initial load. (#4638)
* [WEB-1445] fix: issue creation on sub groups when cycle/ module grouping is applied. (#4636)
* [WEB-1244] fix: add better image insertion and replacement logic in the editor (#4508)
* fix: add better image insertion and replacement logic
* refactor: image handling in editor
* chore: remove passing uploadKey around
* refactor: remove unused code
* fix: redundant files removed
* fix: add is editor ready to discard api to control behvaiours from our app
* fix: focus issues and image insertion position when not using slash command
* fix: import order fixed
* fix: notification mark all as read (#4643)
* chore: remove enter key extension (#4648)
* [WEB-1467] chore: run the API's required to bootstrap the application in parallel. (#4642)
* [WEB - 1482] fix: uploads when using block storages other than s3 and minio (#4647)
* fix: minio storage and redirection
* dev: disconnect web url and app base url configuration.
* fix: negate check while trying to discard (#4653)
* fix: email notification preferences (#4656)
* [WEB-1493] chore: product tour asset and app sidebar quick action hover (#4655)
* chore: product tour asset updated
* fix: app sidebar quick action hover
* fix: project state setting state name remove camel case logic (#4652)
* [WEB-1419] chore: enable module creation with dates older than today. (#4659)
* [WEB-1216] chore: increase module empty state for consistency. (#4658)
* fix: build errors
* [WEB-1235] chore: module and cycle sidebar graph improvement (#4650)
* chore: module and cycle sidebar graph improvement
* chore: code refactor
* [WEB-1424] chore: page and view logo implementation, and emoji/icon (#4662)
* [WEB-1424] chore: page and view logo implementation, and emoji/icon picker improvement (#4583)
* chore: added logo_props
* chore: logo props in cycles, views and modules
* chore: emoji icon picker types updated
* chore: info icon added to plane ui package
* chore: icon color adjust helper function added
* style: icon picker ui improvement and default color options updated
* chore: update page logo action added in store
* chore: emoji code to unicode helper function added
* chore: common logo renderer component added
* chore: app header project logo updated
* chore: project logo updated across platform
* chore: page logo picker added
* chore: control link component improvement
* chore: list item improvement
* chore: emoji picker component updated
* chore: space app and package logo prop type updated
* chore: migration
* chore: logo added to project view
* chore: page logo picker added in create modal and breadcrumbs
* chore: view logo picker added in create modal and updated breadcrumbs
* fix: build error
* chore: AIO docker images for preview deployments (#4605)
* fix: adding single docker base file
* action added
* fix action
* dockerfile.base modified
* action fix
* dockerfile
* fix: base aio dockerfile
* fix: dockerfile.base
* fix: dockerfile base
* fix: modified folder structure
* fix: action
* fix: dockerfile
* fix: dockerfile.base
* fix: supervisor file name changed
* fix: base dockerfile updated
* fix dockerfile base
* fix: base dockerfile
* fix: docker files
* fix: base dockerfile
* update base image
* modified docker aio base
* aio base modified to debian-12-slim
* fixes
* finalize the dockerfiles with volume exposure
* modified the aio build and dockerfile
* fix: codacy suggestions implemented
* fix: codacy fix
* update aio build action
---------
Co-authored-by: sriram veeraghanta <veeraghanta.sriram@gmail.com>
* fix: merge conflict
* chore: lucide react added to planu ui package
* chore: new emoji picker component added with lucid icon and code refactor
* chore: logo component updated
* chore: emoji picker updated for pages and views
---------
Co-authored-by: NarayanBavisetti <narayan3119@gmail.com>
Co-authored-by: Manish Gupta <59428681+mguptahub@users.noreply.github.com>
Co-authored-by: sriram veeraghanta <veeraghanta.sriram@gmail.com>
* fix: build error
---------
Co-authored-by: Anmol Singh Bhatia <121005188+anmolsinghbhatia@users.noreply.github.com>
Co-authored-by: NarayanBavisetti <narayan3119@gmail.com>
Co-authored-by: Manish Gupta <59428681+mguptahub@users.noreply.github.com>
Co-authored-by: Anmol Singh Bhatia <anmolsinghbhatia@plane.so>
* refactor: drag handle component (#4663)
* refactor: checkbox ui component (#4665)
* [WEB-1325] chore: refactor inbox issue store to avoid data loss. (#4640)
* [WEB-1325] chore: refactor inbox issue store to avoid data loss.
* chore: inbox store improvement.
* chore: priority dropdown accepts undefined (#4666)
* chore: added buttonClassName prop to label dropdown (#4671)
* chore: created new constants for marketing website page links (#4670)
* chore: added a prop to render default state conditionally (#4669)
* [WEB-1501] dev: multiple select core components (#4667)
* dev: multiple select core components
* chore: added export statement
* chore: created a new constant for archivable state groups (#4668)
* chore: added primary variant to the alert modal (#4664)
* [WEB-1436] chore: pages improvement. (#4657)
* add empty state if no pages are available.
* set access to private in create page modal when the modal is open form private tab.
* [WEB-1440] chore: update cycle empty state to use project level access. (#4672)
* fix: checkbox ui component (#4675)
* fix: ai buttons overlapping issue (#4621)
* [WEB - 1500] chore: add extra fields on instance and create changelog table to store release change logs (#4673)
* chore: add extra fields on instance and create changelog table to store release change logs
* dev: rename new_version to latest_version
* [WEB - 1505] chore: alter instance id field (#4676)
* chore: instance id
* dev: update to max length
* feat: creating new app dir structure for web app
* fix: moving few pages to app dir
* feat: creating new app dir structure for web app
* fix: moving few pages to app dir
* fix: errors on app dir.
* chore: remove pages routes.
* chore: add sign-in/ sign-up, invitations, onboarding pages.
* fix: instance serializer
* fix: instance register script (#4681)
* fix: instance register script
* dev: remove api key and add latest version and current version in types
* [WEB-1492] fix: resolved issue creation error in layouts while group_by and sub_group_by filters applied in quick add (#4682)
* fix: resolved issue creation error in layouts while group_by and sub_group_by filters applied in quick add
* fix: updated braces in conditions
* fix: inbox issue store update logic. (#4683)
* chore: update package version
* [WEB-1184] feat: issue bulk operations (#4674)
* feat: issue bulk operations
* style: bulk operations action bar
* chore: remove edition separation
* style: fix overlapping of response container in AI popover. (#4684)
* [WEB-1498] style: fix comments reaction alignment. (#4686)
* [WEB-1503] chore: add `autofocus` to name field in inline create/ update state component. (#4685)
* [WEB-1312] fix: trim file name before uploading (#4661)
* fix: trim file name before uploading
* fix: check the cursor position before inserting image
* dev: add trimming for file assets
* dev: add filename validation above if
* dev: make the validation to 50 to support user uploads
---------
Co-authored-by: pablohashescobar <nikhilschacko@gmail.com>
* [WEB-1481] fix: multiple API calls in inbox issues on closed issues tab. (#4691)
* fix: multiple API calls on scroll and closed issues tab.
* fix: pagination loader on initial load.
* feat: Add components required for estimates (#4690)
* Add sortable, radio and typography components
* Remove stray css classes
* Prevent drag of items from other draggable
* Minor cleanup
* Update yarn.lock
* Remove radio input component as it was build on
headless ui v2.0.0 and now we are using v1.7.0
* Fix build errors
* Update dependencies in use memo.
* [WEB-1521] chore: add configuration to enable/disable sign-ups. (#4697)
* fix: regenerating lock file
* fix: docker image build errors
* fix: remove `setupInterceptors` to avoid circular dependency.
* chore: migrate all `accounts` related routes.
* chore: migrate all `profiles` related routes.
* chore: workspace invitation and onboarding migration / fixes.
* chore: installation provider migrations.
* regression: focus changing issue with the peek overview editor (#4700)
* [WEB-1459] chore: save users all / favorite project list collapse state into localstorage. (#4701)
* [WEB-1501] chore: update selected entity details on entities list change (#4702)
* chore: update selected entity detials on entities list change
* chore: addd selectionHelpers as a prop
* [WEB-1517] chore: remove drag handle from list drag block (#4698)
* remove drag handle from list drag block
* align list group header with list item
* rearrange chevron for list subissues and rearrange spaces
* adding default draggable property to control link
* remove unnecessary dependencies for useEffect
* fix: email validation (#4707)
* fix: email validation on complete login or sign up functionality
* dev: add try catch block
* dev: split up code
* dev: empty return
* fix: cache invalidation on new members invite (#4699)
* fix: build test pull request running on non draft PRs (#4708)
* fix: cache invalidation on new members invite (#4699)
* fix: add version max length (#4713)
* chore: migrations for `routing` hooks.
* [WEB-1533] chore: fix alignment issues in List and Spreadsheet view (#4714)
* fix alignment issues in List and Spreadsheet view
* fix spreadsheet indentation
* chore: migration for workspace dashboard/ views/ analytics/ settings and active-cycles.
* chore: handle undefined identifier case
* fix: Overflowing loader in issue edit modal (#4720)
* [WEB-1529] chore: workspace sidebar updates. (#4710)
* fix: temporary fix exiting lines with slashes (#4725)
* [WEB-1537] fix: inline code block size fixed for headers, etc (#4709)
* fix: inline code block size fixed for headers, etc
* feat: persisting focus accurately post converting the code block into text
* fix: typo in error handling
* [WEB-1526] feat: add auto merge behaviour to task lists and fix infinite backspace case (#4703)
* feat: add auto merge behaviour to task lists
* fix: unhandled cases for taskItem and taskList
* fix: css task list such that toggling task list doesn't shift things
* fix: task list jumps around while trying create/delete things in between two task lists
* fix: remove filtering for generic transactions i.e. transactions with some meta data while tying to join things
* chore: migration for profile activity along with headers refactor.
* [WEB-1201] dev: dropdowns (#4721)
* chore: lodash package added
* chore: dropdown key down hook added
* dev: dropdown component
* chore: build error and code refactor
* chore: readme file updated
* chore: added disabled prop to multiple select components (#4724)
* chore: added disabled prop to mutliple select group hoc
* style: fix empty space
* fix: don't add as a sub-issue if parent has been removed (#4731)
* fix: member list item custom menu placement (#4729)
* [WEB-1535] chore: project logo picker improvement (#4718)
* chore: emoji icon picker improvement
* chore: emoji icon picker improvement
* fix: resolved border flicker on issue title (#4727)
* chore: profile activity empty state added (#4732)
* [WEB-1481] fix: inbox issue list update after changing issue status. (#4715)
* style: fix ux copy style on project feature preview page. (#4734)
* chore: remove clear seleciton logic on escape key press (#4735)
* chore: migrations for projects and project issues.
* chore: issue and properties filter dropdown improvement (#4733)
* save all filters and properties for views (#4728)
* chore: migrations for issue details route.
* chore: migration for cycle routes.
* chore: migration for module routes.
* chore: migrations for project views routes.
* chore: migrations for project pages routes.
* chore: migration for project inbox routes.
* chore: migration for project settings routes.
* chore: migrations for draft issues routes.
* chore: migrations for project archives routes.
* chore: remove unused headers.
* temp: comment out auth constant and use-reload-confirmation code to avoid errors.
---------
Co-authored-by: Prateek Shourya <prateekshourya29@gmail.com>
Co-authored-by: rahulramesha <71900764+rahulramesha@users.noreply.github.com>
Co-authored-by: Aaryan Khandelwal <65252264+aaryan610@users.noreply.github.com>
Co-authored-by: M. Palanikannan <73993394+Palanikannan1437@users.noreply.github.com>
Co-authored-by: Anmol Singh Bhatia <121005188+anmolsinghbhatia@users.noreply.github.com>
Co-authored-by: Nikhil <118773738+pablohashescobar@users.noreply.github.com>
Co-authored-by: NarayanBavisetti <narayan3119@gmail.com>
Co-authored-by: Manish Gupta <59428681+mguptahub@users.noreply.github.com>
Co-authored-by: Anmol Singh Bhatia <anmolsinghbhatia@plane.so>
Co-authored-by: guru_sainath <gurusainath007@gmail.com>
Co-authored-by: pablohashescobar <nikhilschacko@gmail.com>
Co-authored-by: Satish Gandham <satish.iitg@gmail.com>
Co-authored-by: Henit Chobisa <chobisa.henit@gmail.com>
Co-authored-by: Aaryan Khandelwal <aaryankhandu123@gmail.com>
2024-06-10 12:37:38 +05:30
|
|
|
"use client";
|
|
|
|
|
|
2023-11-21 15:46:41 +05:30
|
|
|
import React, { useEffect, useState } from "react";
|
2024-03-06 18:39:14 +05:30
|
|
|
import { Command } from "cmdk";
|
2024-05-08 23:01:20 +05:30
|
|
|
import { observer } from "mobx-react";
|
2024-06-18 11:35:20 +05:30
|
|
|
import { useParams } from "next/navigation";
|
2023-11-21 15:46:41 +05:30
|
|
|
import useSWR from "swr";
|
2025-02-14 19:04:08 +05:30
|
|
|
import { CommandIcon, FolderPlus, Search, Settings, X } from "lucide-react";
|
2023-07-26 15:12:00 +05:30
|
|
|
import { Dialog, Transition } from "@headlessui/react";
|
2025-02-06 20:41:31 +05:30
|
|
|
// plane imports
|
|
|
|
|
import { EUserPermissions, EUserPermissionsLevel } from "@plane/constants";
|
|
|
|
|
import { useTranslation } from "@plane/i18n";
|
2024-03-19 20:08:35 +05:30
|
|
|
import { IWorkspaceSearchResults } from "@plane/types";
|
2025-02-11 17:40:31 +05:30
|
|
|
import { LayersIcon, Loader, ToggleSwitch } from "@plane/ui";
|
2025-02-14 19:04:08 +05:30
|
|
|
import { cn } from "@plane/utils";
|
2024-08-19 13:40:19 +05:30
|
|
|
// components
|
2023-07-26 15:12:00 +05:30
|
|
|
import {
|
|
|
|
|
ChangeIssueAssignee,
|
|
|
|
|
ChangeIssuePriority,
|
|
|
|
|
ChangeIssueState,
|
2023-11-21 15:46:41 +05:30
|
|
|
CommandPaletteHelpActions,
|
|
|
|
|
CommandPaletteIssueActions,
|
|
|
|
|
CommandPaletteProjectActions,
|
|
|
|
|
CommandPaletteSearchResults,
|
2024-07-15 14:18:57 +05:30
|
|
|
CommandPaletteThemeActions,
|
|
|
|
|
CommandPaletteWorkspaceSettingsActions,
|
2024-03-19 20:08:35 +05:30
|
|
|
} from "@/components/command-palette";
|
2025-02-06 20:41:31 +05:30
|
|
|
import { SimpleEmptyState } from "@/components/empty-state";
|
2024-09-06 16:21:14 +05:30
|
|
|
// helpers
|
|
|
|
|
import { getTabIndex } from "@/helpers/tab-indices.helper";
|
2024-08-19 13:40:19 +05:30
|
|
|
// hooks
|
2025-02-17 13:39:58 +05:30
|
|
|
import {
|
|
|
|
|
useCommandPalette,
|
|
|
|
|
useEventTracker,
|
|
|
|
|
useIssueDetail,
|
|
|
|
|
useProject,
|
|
|
|
|
useUser,
|
|
|
|
|
useUserPermissions,
|
|
|
|
|
} from "@/hooks/store";
|
2024-06-18 11:35:20 +05:30
|
|
|
import { useAppRouter } from "@/hooks/use-app-router";
|
2024-03-19 20:08:35 +05:30
|
|
|
import useDebounce from "@/hooks/use-debounce";
|
|
|
|
|
import { usePlatformOS } from "@/hooks/use-platform-os";
|
2024-08-19 13:40:19 +05:30
|
|
|
// plane web components
|
2025-02-06 20:41:31 +05:30
|
|
|
import { useResolvedAssetPath } from "@/hooks/use-resolved-asset-path";
|
2024-08-19 13:40:19 +05:30
|
|
|
import { IssueIdentifier } from "@/plane-web/components/issues";
|
|
|
|
|
// plane web services
|
2024-06-27 14:40:14 +05:30
|
|
|
import { WorkspaceService } from "@/plane-web/services";
|
|
|
|
|
|
fix: Implementing mobx, refactoring service layer and rewriting components (#2441)
* chore: kanban refactoring
* chore: Implemented new kanaban board UX and implemented draggable using react beautiful dnd
* chore: updated yarn lock
* chore: updated the store for issues and issue filters
* chore: resolved build error
* chore: created filters and updated the issue filters, display_filter and display_properties in mobx and components
* chore: implemented filters for issues
* chore: UI theming updates
* chore: handled single and multi select in filter cards
* chore: implemented filters and views in kanaban
* chore: updating filters, display_filter and display properties
* chore: filter, layout, display filters, extra filters and display properties render validation
* chore: clean up and resolved import warnings
* chore: type check
* chore: renamed gantt key to gantt_chart
* chore: filter render UI and Functionality implementation
* chore: filter empty state handling in issue filter selection
* Implementing list view
* chore: kanban drag drop logic
* filtering
* chore: store setup
* chore: handled build issues
* chore: store setup
* user filter
* chore: store setup
* chore: store fixes and static data setup
* chore: store setup for build fixes
* fix: merge conflicts (#2231)
* chore: dynamic position dropdown (#2138)
* chore: dynamic position state dropdown for issue view
* style: state select dropdown styling
* fix: state icon attribute names
* chore: state select dynamic dropdown
* chore: member select dynamic dropdown
* chore: label select dynamic dropdown
* chore: priority select dynamic dropdown
* chore: label select dropdown improvement
* refactor: state dropdown location
* chore: dropdown improvement and code refactor
* chore: dynamic dropdown hook type added
---------
Co-authored-by: Aaryan Khandelwal <aaryankhandu123@gmail.com>
* fix: fields not getting selected in the create issue form (#2212)
* fix: hydration error and draft issue workflow
* fix: build error
* fix: properties getting de-selected after create, module & cycle not getting auto-select on the form
* fix: display layout, props being updated directly
* chore: sub issues count in individual issue (#2221)
* fix: service imports
* chore: rename csv service file
---------
Co-authored-by: Anmol Singh Bhatia <121005188+anmolsinghbhatia@users.noreply.github.com>
Co-authored-by: Dakshesh Jain <65905942+dakshesh14@users.noreply.github.com>
Co-authored-by: Bavisetti Narayan <72156168+NarayanBavisetti@users.noreply.github.com>
* chore: store fixes
* chore: update issue detail store to handle peek overview (#2237)
* chore: dynamic position dropdown (#2138)
* chore: dynamic position state dropdown for issue view
* style: state select dropdown styling
* fix: state icon attribute names
* chore: state select dynamic dropdown
* chore: member select dynamic dropdown
* chore: label select dynamic dropdown
* chore: priority select dynamic dropdown
* chore: label select dropdown improvement
* refactor: state dropdown location
* chore: dropdown improvement and code refactor
* chore: dynamic dropdown hook type added
---------
Co-authored-by: Aaryan Khandelwal <aaryankhandu123@gmail.com>
* fix: fields not getting selected in the create issue form (#2212)
* fix: hydration error and draft issue workflow
* fix: build error
* fix: properties getting de-selected after create, module & cycle not getting auto-select on the form
* fix: display layout, props being updated directly
* chore: sub issues count in individual issue (#2221)
* Implemented nested issues in the sub issues section in issue detail page (#2233)
* feat: subissues infinte level
* feat: updated UI for sub issues
* feat: subissues new ui and nested sub issues in issue detail
* chore: removed repeated code
* refactor: product updates modal layout (#2225)
* fix: handle no issues in custom analytics (#2226)
* fix: activity label color (#2227)
* fix: profile issues layout switch (#2228)
* chore: update service imports
* chore: update issue detail store to handle peek overview
---------
Co-authored-by: Anmol Singh Bhatia <121005188+anmolsinghbhatia@users.noreply.github.com>
Co-authored-by: Dakshesh Jain <65905942+dakshesh14@users.noreply.github.com>
Co-authored-by: Bavisetti Narayan <72156168+NarayanBavisetti@users.noreply.github.com>
Co-authored-by: guru_sainath <gurusainath007@gmail.com>
* chore: minor fixes
* workspace project fixes
* feat: project issues topbar (#2256)
* chore: project issues topbar
* style: theming and minor UI fixes
* refactor: file structure
* chore: layout wise authorization added
* style: filter dropdowns
* chore: add fetch keys
* chore: minor fixes
* chore: filters dropdown (#2260)
* chore: project issues topbar
* style: theming and minor UI fixes
* refactor: file structure
* chore: layout wise authorization added
* style: filter dropdowns
* chore: add fetch keys
* feat: search option for filters
* fix: sticky headers
* chore: sub_group_by section added
* fix: leave project fixes
* refactor: project card component refactor
* Implemented swimlanes and kanban view (#2262)
* chore: issue store for kanban and calendar
* chore: updated ui for kanba and swimlanes
* chore: yarn.lock updated
* fix: computed filters logic
* chore: added sub_group_by in params and handled sub-group-by render error in display filter's
* fix: ui package setup and project update form refactor
* fix: ui package setup
* fix: minor ui fixes
* dev: calendar view layout revamp (#2293)
* dev: calendar view init
* chore: new render logic
* chore: implement calendar view
* chore: calendar view
* refactor: calendar payload
* chore: remove active month logic from backend
* chore: setup new store for calendar
* refactor: issues fetching structure
* chore: months dropdown
* chore: modify request query params for calendar layout
* refactor: remove console logs and add comments
* chore: removed demo m-store routes
* cycles changes
* chore: issues grouped kanban and swimlanes UI and functionality (#2294)
* chore: updated the all the group_by and sub_group_by UI and functionality render in kanban
* chore: kanban sorting in mobx and ui updates
* chore: ui changes and drag and drop functionality changes in kanban
* chore: issues count render in kanban default and swimlanes
* chore: Added icons to the group_by and sub_group_by in kanban and swimlanes
* refactor: filter components, constants and helper functions (#2297)
* refactor: filters and display filters to accept handlers as props
* refactor: filters and display filters folder structure
* refactor: change issue layout options constant structure
* chore: display filters validations
* chore: view less filters functionality
* fix: display filters validation
* refactor: wrap functions around useCallback
* chore: start and target date filter options added
* refactor: query params generator function
* fix: query params generator function
* dev: gantt chart implementation using MobX (#2302)
* dev: fetch project gantt issues using mobx
* chore: handle group by options in the kanban layout
* dev: spreadsheet layout implementation using MobX (#2306)
* dev: implement spreadsheet view using mobx
* refactor: remove console logs and props
* chore: refactoring cycles list
* feat: adding additional ui components
* dev: applied filters list implementation using MobX (#2325)
* dev: applied filters list UI
* fix: filter item height
* chore: remove unnecessary classes
* fix: params generator
* fix: cycles views list and board
* fix: cycles list rendering fixes
* fix: layout fixes
* refactor: filter components (#2359)
* fix: calendar layout dividers
* refactor: filter selection components
* fix: dropdown closing after selection
* refactor: filters components
* chore: issue properties for list and kanban layouts and implemented estimates in project store (#2363)
* chore: issue properties for state, priorit, labels and members
* feat: implemented assignee, labels properties
* fix: implemented estimates in project store and issue properties
* chore: staer_date and due_date and validation properties in kanban
* chore: filters import conflict
* dev: setup module and module filter store (#2364)
* dev: implement module issues using mobx store
* dev: module filter store setup
* chore: module store crud operations
* chore: issue list layout (#2367)
* chore: merge develop (#2388)
* fix: build erros
* chore: cycles, modules store integration, list and kanban layouts and updated kanban logic (#2399)
* chore: cycle, cycle-issue, cycle-filters, cycle-kanban, cycle layout setup
* chore: cycles kanban and list view store
* chore: cycles, modules kanban and list, kanban view store
* refactor: change naming convention (#2383)
* fix:auth layer revamp
* chore: Implemented list and kanban views in project modules (#2402)
* chore: updated kanban logic in project cycles and modules
* chore: updated list and kanban in module
* dev: implement global views using MobX (#2404)
* fix: selfhosted fixes (#2154)
* fix: selfhosted fixes
* fix: updated env example
* chore: dynamic position dropdown (#2138)
* chore: dynamic position state dropdown for issue view
* style: state select dropdown styling
* fix: state icon attribute names
* chore: state select dynamic dropdown
* chore: member select dynamic dropdown
* chore: label select dynamic dropdown
* chore: priority select dynamic dropdown
* chore: label select dropdown improvement
* refactor: state dropdown location
* chore: dropdown improvement and code refactor
* chore: dynamic dropdown hook type added
---------
Co-authored-by: Aaryan Khandelwal <aaryankhandu123@gmail.com>
* fix: fields not getting selected in the create issue form (#2212)
* fix: hydration error and draft issue workflow
* fix: build error
* fix: properties getting de-selected after create, module & cycle not getting auto-select on the form
* fix: display layout, props being updated directly
* chore: sub issues count in individual issue (#2221)
* Implemented nested issues in the sub issues section in issue detail page (#2233)
* feat: subissues infinte level
* feat: updated UI for sub issues
* feat: subissues new ui and nested sub issues in issue detail
* chore: removed repeated code
* refactor: product updates modal layout (#2225)
* fix: handle no issues in custom analytics (#2226)
* fix: activity label color (#2227)
* fix: profile issues layout switch (#2228)
* fix: issues resolved in sub issues (#2238)
* fix: aws region name (#2234)
* chore: updated docker naming conventions (#2239)
* naming convention changes
* dev: update docker-compose-hub in consistent with docker-compose
* dev: updated docker container name
---------
Co-authored-by: sriram veeraghanta <veeraghanta.sriram@gmail.com>
* chore: added state and priority order in workspace user profile (#2241)
* fix: changed priority from None to none (#2229)
* fix: cycle and module stats when issues are archived (#2185)
* fix: cycle and module stats when issues are archived
* fix: added draft filter
---------
Co-authored-by: NarayanBavisetti <narayan3119@gmail.com>
* feat: quick add (#2240)
* feat: quick add
* style: made text color muted
* chore: added epoch in draft (#2244)
* chore: added epoch in draft
* chore: removed extra spaces
* fix: resolved pending issue graph in analytics, user wishes in dashboard, and typo in projects list (#2247)
* style: settings page improvement (#2211)
* style: settings page improvement
* style: toggle switch styling
---------
Co-authored-by: Anmol Singh Bhatia <asb@Anmols-MacBook-Pro.local>
* chore: changed priority props in workspace and project (#2253)
* fix: bug fix related to fetching dropdown options for the profile issue (#2246)
* fix: sub issue state and member select build error (#2254)
* rename view to layout (#2255)
Co-authored-by: Your Name <you@example.com>
* fix: bug fixes and ui improvement (#2250)
* dev: remove auto filter endpoint
* feat: quick-add placement in spreadsheet and gantt (#2259)
* feat: sticking quick-add at the bottom of the screen
fix: opening create issue modal instead of quick-add in draft-issues, my-issue and profile page
* fix: build error due to dynamic import
* fix: draft issue delete not working (#2249)
* fix: draft issue not deleting, project can't be changed in draft issue modal
* fix: removed mutation for view where draft issues are not shown
* fix: inline create issue for draft issue
* fix: clearing data from localstorage on discard click
* feat: Add peek overview in sub issues and updated UI for empty states. (#2263)
* chore: add tooltip to show full time on activity logs (#2235)
* fix: issue automation iterable error (#2208)
* fix: n+1 queries for cycle list and project member endpoints (#2257)
* [fix] nginx continuously rewriting and reloading on index page of spaces app (#2236)
* chore: shifted index page to /home route
* chore: added rewrite logic, to rewrite index to /home
* chore: routed home to login route as login page
* chore: updated nginx config to route to login
* chore: updated path for home
* dev: migration for 0.13 (#2266)
* dev: updated migrations
* dev: migration for 0.13
* dev: re-split migrations into two different files (#2268)
* dev: split issue activity migration separate files
* dev: resplit migrations into two different files
* dev: changed the batch size
* chore: udpate date filters to support dynamic options
* fix: bugs in quick-add and draft issues (#2269)
* fix: 'Last Drafted Issue' making sidebar look weird on collapsed
* feat: scroll to the bottom when issue is created
* fix: 'Add Issue' button overlapping issue card in spreadsheet view
* fix: wrong placement of quick-add in calender layout
* fix: spacing for issue card in spreadsheet view
* chore: add instructions to contributing guide (#2270)
* chore: add instructions to contributing guide
* dev: update contributing.md to use the new configuration
---------
Co-authored-by: Nikhil <118773738+pablohashescobar@users.noreply.github.com>
* fix: user dashboard greeting timezone (#2267)
* chore: user greeting timezone
* fix: group by labels not working on workspace level
* feat: workspace global view, style: spreadsheet view revamp (#2273)
* chore: workspace view types, services and hooks added
* style: spreadsheet view revamp and code refactor
* feat: workspace view
* fix: build fix
* chore: sidebar workspace issues redirection updated
* style: gantt layout quick-add padding (#2272)
* fix: 'Last Drafted Issue' making sidebar look weird on collapsed
* feat: scroll to the bottom when issue is created
* fix: 'Add Issue' button overlapping issue card in spreadsheet view
* fix: wrong placement of quick-add in calender layout
* fix: spacing for issue card in spreadsheet view
* style: gantt layout quick-add padding
style: removed 'State group' from draft issue
* style: decrese shadow, quick-add position on calender layout, and 'add issue' sticky
* style: button color
* fix: block click happening while moving (#2275)
* dev: refactor date filters to a single function
* chore: handle calendar date range in frontend (#2277)
* chore: gantt chart empty state (#2279)
* chore: gantt empty state
* chore: Add heading to the gantt sidebar
* style: calender quick-add same width as single date (#2280)
* style: calender quick-add same width as single date
* style: margin bottom in quick-add in spreadsheet view
* fix: quick add opening in list-layout
* style: reduced margin left
* chore: updated created at in draft issue (#2278)
* chore: make target dates inclusive when filtering (#2276)
* chore: sort order and issue props for global views (#2283)
* chore: removed project filter (#2284)
* fix: inbox issue deletes (#2290)
* chore: views (#2288)
* chore: global views order by
* chore: update permissions for global views
---------
Co-authored-by: NarayanBavisetti <narayan3119@gmail.com>
* chore: fetch issues from previous and next month in the calendar view (#2282)
* fix: issue activity estimate value bug fix (#2281)
* fix: issue activity estimate value bug fix
* fix: activity typo fix
* fix: ui and bugs (#2289)
* fix: 24 character limit on first & last name in onboarding page
* fix: no option: 'Add Issue' in archive issue page
* fix: in archive issue directly sending to issue detail page
* fix: issue type showing in archive issue
* fix: custom menu overflowing
* fix: changing subscriber in filters has no effect
* style: border in quick-add
* fix: on onboarding member role overflowing
* fix: inconsistent icons in issue detail
* style: spacing, borders and shadows in quick-add
* fix: custom menu truncate
* fix: notifications for created by me and assigned to me (#2292)
* chore: workspace view display filters and properties , code refactor (#2295)
* chore: spreadsheet view context
* chore: spreadsheet context provider
* chore: spreadsheet view context
* chore: display filters and properties added in workspace view and code refactor
* fix: build error fix
* chore: set sub-issue display option to false for global views
---------
Co-authored-by: gurusainath <gurusainath007@gmail.com>
* chore: label create error (#2299)
* chore: global issues ui improvement and bug fixes (#2300)
* chore: workspace view mutation fix ,bug fixes and code refactor (#2301)
* chore: workspace view mutation fix ,bug fixes and code refactor
* chore: update workspace view toast alert added
* chore: workspace view order by removed (#2303)
* dev: updated migrations for 0.13-dev (#2305)
* chore: epoch migration batch size changed
* chore: reoredered the migration files
* dev: updated migrations for 0.13-dev
* chore: added epoch field
* dev: merged the migration files
* fix: workspace view filters count fix (#2307)
* fix: unsplash api fix (#2310)
* fix: workspace view redirection fix, style: spreadsheet view shadow scroll fix (#2314)
* fix: workspace view redirection fix
* style: spreadsheet view scroll shadow fix
* fix: update build workflow for the deploy app (#2315)
* fix: workspace view add issue mutation fix (#2317)
* dev: create action to sync PR changes to the repo (#2333)
* fix: ui package readme added (#2334)
* fix: variable name for token (#2336)
* dev: update add permissions to the action (#2337)
* dev: rename token variables (#2338)
* fix: updated readme fixes (#2339)
* dev: update sync workflow to run only when the source repo is configured (#2346)
* dev: update sync workflow to run only when the source repo is configured
* fix: naming convention changes
---------
Co-authored-by: sriramveeraghanta <veeraghanta.sriram@gmail.com>
* fix: issue relation mutation and draft issue (#2340)
* fix: issue relation mutation and draft issue
* fix: 'New Issue' in gantt view
fix: emoji select going under
* fix: profile page typo
* fix: sync workflow fixes (#2365)
* fix: sync job pr description escaped values fix (#2366)
* Update index.tsx (#2343)
Fixes #2342
* dev: update apiserver configuration files (#2348)
* dev: update apiserver configuration files
* dev: add email and minio redirection urls
* fix: themening validation in store init. (#2350)
* chore: member can change role (#2371)
* chore: removed the issue draft log from my profile (#2368)
* adding sync info in pr title (#2373)
* chore: layout access validation and switch in plane deploy issues route (#2351)
* chore: handled route validation and layout access validation in plane deploy issues
* chore: impoved validation condition
* show current version in the help section dropdown (#2353)
* fix: table menu positioning (#2354)
* fix: handle cross project issues in the sub-issues. (#2357)
* fix: login process validation based on api config (#2361)
* dev: configuration endpoint for frontend client (#2355)
* dev: configuration endpoint for frontend clients
* dev: configuration enable magic and email/password signup
* dev: update unsplash keys
* dev: add unsplash API and add env for magic login
* fix: 404 when redirecting user clicks on Sign In button (#2349)
* fix: 404 when redirecting user to login page
* fix: next_path redirection not working
* fix: authentication workflow update in plane deploy
---------
Co-authored-by: gurusainath <gurusainath007@gmail.com>
* fix: project setting member role validation (#2369)
* fix: project setting member role validation
* chore: opacity removed from member setting page
* chore: member setting page validation
* chore: project covers endpoint (#2370)
* chore: project covers endpoint
* dev: remove print logs
* dev: formatting
---------
Co-authored-by: sriramveeraghanta <veeraghanta.sriram@gmail.com>
* feat: default project cover images tab on the change cover popover (#2375)
* feat: default project cover images tab
* chore: remove unnecessary env vars from turbo.json
* chore: remove unnecessary OAuth envs (#2378)
* chore: remove unnecessary oauth envs
* merge conflicts resolved
* fix: adding new service
---------
Co-authored-by: sriramveeraghanta <veeraghanta.sriram@gmail.com>
* fix: added user store variables in mobx store observable (#2380)
* fix: state group icons (#2381)
* fix: removed default theme setting in the index page (#2382)
* fix: removed default theme setting in the index page
* fix: empty space
* dev: global views and workspace filters store implemented
* sync CE Master to EE Develop
* refactor: create update view modal
* chore: static issue global views
* refactor: remove old code
* refactor: filters select dropdown
* chore: fix calendar layout
* chore: mobx store for new applied filters
* chore: dded search functionality
---------
Co-authored-by: Vamsi Kurama <vamsi.kurama@gmail.com>
Co-authored-by: Nikhil <118773738+pablohashescobar@users.noreply.github.com>
Co-authored-by: sriram veeraghanta <veeraghanta.sriram@gmail.com>
Co-authored-by: Anmol Singh Bhatia <121005188+anmolsinghbhatia@users.noreply.github.com>
Co-authored-by: Dakshesh Jain <65905942+dakshesh14@users.noreply.github.com>
Co-authored-by: Bavisetti Narayan <72156168+NarayanBavisetti@users.noreply.github.com>
Co-authored-by: guru_sainath <gurusainath007@gmail.com>
Co-authored-by: NarayanBavisetti <narayan3119@gmail.com>
Co-authored-by: Anmol Singh Bhatia <asb@Anmols-MacBook-Pro.local>
Co-authored-by: Rhea Jain <65884341+rhea0110@users.noreply.github.com>
Co-authored-by: Your Name <you@example.com>
Co-authored-by: pablohashescobar <nikhilschacko@gmail.com>
Co-authored-by: Henit Chobisa <chobisa.henit@gmail.com>
Co-authored-by: Thomas <git@thomasync.dev>
Co-authored-by: Luis Cruz <55716036+luis-cruzt@users.noreply.github.com>
Co-authored-by: Manish Gupta <manish@mgupta.me>
* fix: Auth fixes and Layout fixes (#2408)
* fix: auth fixes and layout improvements
* fix: layout fixes
* fix: analytics page fixes
* dev: implemented project views using MobX (#2410)
* dev: implemented project views list using mobx
* style: views list UI
* dev: implemented view issues page using mobx
* refactor: project view issues fetching
* chore: plane ui library component and code refactor (#2406)
* chore: swap input component with plane/ui package
* chore: swap textarea component with plane/ui package
* chore: swap button component with plane/ui package
* chore: button component revamp
* fix: button type fix
* chore: secondary button revamp
* chore: button props updated
* chore: swap loader component with plane/ui package
* fix: build error fix
* chore: button component refactor
* chore: code refactor
* chore: swap toggle switch component with plane/ui package
* chore: swap spinner component with plane/ui package
* chore: swap progress bar componenet with plan/ui package
* chore: code refactor
* fix: gitignore fixes
* fix: project card fixes
* chore: ui component revamp (#2415)
* chore: swap tooltip component with plane ui package
* chore: swap linear progress component with plane ui package
* fix: login button fix
* chore: implement new worksapace wrapper for global views (#2412)
* chore: implement new worksapace wrapper for global views pages
* fix: merge conflicts
* fix: merge conflicts
* dev: add remaining layouts to cycle (#2413)
* fix: workspace auth wrapper changes
* chore: project card revamp and refactor (#2416)
* removing dist from ui
* refactor: analytics (#2419)
* refactor: helper functions
* chore: updated all the page headers
* refactor: custom analytics
* refactor: project analytics modal
* refactor: folder structure, remove junk code (#2423)
* refactor: folder structure
* chore: ad order by target date option
* refactor: remove old layout components
* refactor: inbox folder structure
* fix: services fixes
* fix: store imports changes
* fix: services export fixes
* fix: services implementation fixes
* fix: build issue fixes
* fix: react library fixes
* refactor: MobX store folder structure (#2435)
* refactor: store folder structure
* chore: update import statements
* fix: service import errors (#2436)
* fix: service imports
* chore: update service imports in store
* chore: fix remianing service imports
* build fixes
* editor ts config fixes
* fix: turbo and build fixes
* fix: Auth screen loading implementation
* fix: build issues
* fix: turbo settings for ui package
---------
Co-authored-by: gurusainath <gurusainath007@gmail.com>
Co-authored-by: Aaryan Khandelwal <65252264+aaryan610@users.noreply.github.com>
Co-authored-by: Anmol Singh Bhatia <121005188+anmolsinghbhatia@users.noreply.github.com>
Co-authored-by: Dakshesh Jain <65905942+dakshesh14@users.noreply.github.com>
Co-authored-by: Bavisetti Narayan <72156168+NarayanBavisetti@users.noreply.github.com>
Co-authored-by: Aaryan Khandelwal <aaryankhandu123@gmail.com>
Co-authored-by: Vamsi Kurama <vamsi.kurama@gmail.com>
Co-authored-by: Nikhil <118773738+pablohashescobar@users.noreply.github.com>
Co-authored-by: NarayanBavisetti <narayan3119@gmail.com>
Co-authored-by: Anmol Singh Bhatia <asb@Anmols-MacBook-Pro.local>
Co-authored-by: Rhea Jain <65884341+rhea0110@users.noreply.github.com>
Co-authored-by: Your Name <you@example.com>
Co-authored-by: pablohashescobar <nikhilschacko@gmail.com>
Co-authored-by: Henit Chobisa <chobisa.henit@gmail.com>
Co-authored-by: Thomas <git@thomasync.dev>
Co-authored-by: Luis Cruz <55716036+luis-cruzt@users.noreply.github.com>
Co-authored-by: Manish Gupta <manish@mgupta.me>
2023-10-15 23:50:12 +05:30
|
|
|
const workspaceService = new WorkspaceService();
|
|
|
|
|
|
2023-11-21 15:46:41 +05:30
|
|
|
export const CommandModal: React.FC = observer(() => {
|
2025-02-06 20:41:31 +05:30
|
|
|
// router
|
|
|
|
|
const router = useAppRouter();
|
2025-02-20 17:59:32 +05:30
|
|
|
const { workspaceSlug, projectId: routerProjectId, workItem } = useParams();
|
2023-10-17 20:34:16 +05:30
|
|
|
// states
|
2023-07-26 15:12:00 +05:30
|
|
|
const [placeholder, setPlaceholder] = useState("Type a command or search...");
|
|
|
|
|
const [resultsCount, setResultsCount] = useState(0);
|
|
|
|
|
const [isLoading, setIsLoading] = useState(false);
|
|
|
|
|
const [isSearching, setIsSearching] = useState(false);
|
|
|
|
|
const [searchTerm, setSearchTerm] = useState("");
|
|
|
|
|
const [results, setResults] = useState<IWorkspaceSearchResults>({
|
2025-02-14 19:04:08 +05:30
|
|
|
results: { workspace: [], project: [], issue: [], cycle: [], module: [], issue_view: [], page: [] },
|
2023-07-26 15:12:00 +05:30
|
|
|
});
|
2025-02-14 19:04:08 +05:30
|
|
|
const [isWorkspaceLevel, setIsWorkspaceLevel] = useState(false);
|
2023-07-26 15:12:00 +05:30
|
|
|
const [pages, setPages] = useState<string[]>([]);
|
2025-02-14 19:04:08 +05:30
|
|
|
const [searchInIssue, setSearchInIssue] = useState(false);
|
2025-02-06 20:41:31 +05:30
|
|
|
// plane hooks
|
|
|
|
|
const { t } = useTranslation();
|
|
|
|
|
// hooks
|
2025-02-19 14:43:58 +05:30
|
|
|
const {
|
|
|
|
|
issue: { getIssueById },
|
|
|
|
|
fetchIssueWithIdentifier,
|
|
|
|
|
} = useIssueDetail();
|
2025-02-06 20:41:31 +05:30
|
|
|
const { workspaceProjectIds } = useProject();
|
2025-02-11 17:40:31 +05:30
|
|
|
const { platform, isMobile } = usePlatformOS();
|
2025-02-06 20:41:31 +05:30
|
|
|
const { canPerformAnyCreateAction } = useUser();
|
2024-05-08 23:01:20 +05:30
|
|
|
const { isCommandPaletteOpen, toggleCommandPaletteModal, toggleCreateIssueModal, toggleCreateProjectModal } =
|
|
|
|
|
useCommandPalette();
|
2024-09-16 18:56:28 +05:30
|
|
|
const { allowPermissions } = useUserPermissions();
|
2024-02-05 13:19:07 +05:30
|
|
|
const { setTrackElement } = useEventTracker();
|
2025-02-17 13:39:58 +05:30
|
|
|
const projectIdentifier = workItem?.toString().split("-")[0];
|
|
|
|
|
const sequence_id = workItem?.toString().split("-")[1];
|
2025-02-19 14:43:58 +05:30
|
|
|
// fetch work item details using identifier
|
|
|
|
|
const { data: workItemDetailsSWR } = useSWR(
|
2025-02-17 13:39:58 +05:30
|
|
|
workspaceSlug && workItem ? `ISSUE_DETAIL_${workspaceSlug}_${projectIdentifier}_${sequence_id}` : null,
|
|
|
|
|
workspaceSlug && workItem
|
|
|
|
|
? () => fetchIssueWithIdentifier(workspaceSlug.toString(), projectIdentifier, sequence_id)
|
|
|
|
|
: null
|
|
|
|
|
);
|
|
|
|
|
|
2025-02-06 20:41:31 +05:30
|
|
|
// derived values
|
2025-02-19 14:43:58 +05:30
|
|
|
const issueDetails = workItemDetailsSWR ? getIssueById(workItemDetailsSWR?.id) : null;
|
2025-02-17 13:39:58 +05:30
|
|
|
const issueId = issueDetails?.id;
|
2025-02-20 17:59:32 +05:30
|
|
|
const projectId = issueDetails?.project_id ?? routerProjectId;
|
2023-07-26 15:12:00 +05:30
|
|
|
const page = pages[pages.length - 1];
|
|
|
|
|
const debouncedSearchTerm = useDebounce(searchTerm, 500);
|
2024-09-06 16:21:14 +05:30
|
|
|
const { baseTabIndex } = getTabIndex(undefined, isMobile);
|
2024-09-16 18:56:28 +05:30
|
|
|
const canPerformWorkspaceActions = allowPermissions(
|
|
|
|
|
[EUserPermissions.ADMIN, EUserPermissions.MEMBER],
|
|
|
|
|
EUserPermissionsLevel.WORKSPACE
|
|
|
|
|
);
|
2025-02-06 20:41:31 +05:30
|
|
|
const resolvedPath = useResolvedAssetPath({ basePath: "/empty-state/search/search" });
|
2024-09-16 18:56:28 +05:30
|
|
|
|
2025-02-14 19:04:08 +05:30
|
|
|
useEffect(() => {
|
|
|
|
|
if (issueDetails && isCommandPaletteOpen) {
|
|
|
|
|
setSearchInIssue(true);
|
|
|
|
|
}
|
|
|
|
|
}, [issueDetails, isCommandPaletteOpen]);
|
|
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
|
|
|
if (!projectId && !isWorkspaceLevel) {
|
|
|
|
|
setIsWorkspaceLevel(true);
|
|
|
|
|
} else {
|
|
|
|
|
setIsWorkspaceLevel(false);
|
|
|
|
|
}
|
|
|
|
|
}, [projectId]);
|
|
|
|
|
|
2023-11-21 15:46:41 +05:30
|
|
|
const closePalette = () => {
|
|
|
|
|
toggleCommandPaletteModal(false);
|
2023-07-26 15:12:00 +05:30
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const createNewWorkspace = () => {
|
2023-10-17 20:34:16 +05:30
|
|
|
closePalette();
|
2023-07-26 15:12:00 +05:30
|
|
|
router.push("/create-workspace");
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
useEffect(
|
|
|
|
|
() => {
|
|
|
|
|
if (!workspaceSlug) return;
|
|
|
|
|
|
|
|
|
|
setIsLoading(true);
|
|
|
|
|
|
|
|
|
|
if (debouncedSearchTerm) {
|
|
|
|
|
setIsSearching(true);
|
|
|
|
|
workspaceService
|
2023-11-21 15:46:41 +05:30
|
|
|
.searchWorkspace(workspaceSlug.toString(), {
|
2023-07-26 15:12:00 +05:30
|
|
|
...(projectId ? { project_id: projectId.toString() } : {}),
|
|
|
|
|
search: debouncedSearchTerm,
|
|
|
|
|
workspace_search: !projectId ? true : isWorkspaceLevel,
|
|
|
|
|
})
|
|
|
|
|
.then((results) => {
|
|
|
|
|
setResults(results);
|
|
|
|
|
const count = Object.keys(results.results).reduce(
|
|
|
|
|
(accumulator, key) => (results.results as any)[key].length + accumulator,
|
|
|
|
|
0
|
|
|
|
|
);
|
|
|
|
|
setResultsCount(count);
|
|
|
|
|
})
|
|
|
|
|
.finally(() => {
|
|
|
|
|
setIsLoading(false);
|
|
|
|
|
setIsSearching(false);
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
setResults({
|
2025-02-14 19:04:08 +05:30
|
|
|
results: { workspace: [], project: [], issue: [], cycle: [], module: [], issue_view: [], page: [] },
|
2023-07-26 15:12:00 +05:30
|
|
|
});
|
|
|
|
|
setIsLoading(false);
|
|
|
|
|
setIsSearching(false);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
[debouncedSearchTerm, isWorkspaceLevel, projectId, workspaceSlug] // Only call effect if debounced search term changes
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
return (
|
2023-11-21 15:46:41 +05:30
|
|
|
<Transition.Root show={isCommandPaletteOpen} afterLeave={() => setSearchTerm("")} as={React.Fragment}>
|
2025-02-14 19:04:08 +05:30
|
|
|
<Dialog
|
|
|
|
|
as="div"
|
|
|
|
|
className="relative z-30"
|
|
|
|
|
onClose={() => {
|
|
|
|
|
closePalette();
|
|
|
|
|
if (searchInIssue) {
|
|
|
|
|
setSearchInIssue(true);
|
|
|
|
|
}
|
|
|
|
|
}}
|
|
|
|
|
>
|
2023-07-26 15:12:00 +05:30
|
|
|
<Transition.Child
|
|
|
|
|
as={React.Fragment}
|
|
|
|
|
enter="ease-out duration-300"
|
|
|
|
|
enterFrom="opacity-0"
|
|
|
|
|
enterTo="opacity-100"
|
|
|
|
|
leave="ease-in duration-200"
|
|
|
|
|
leaveFrom="opacity-100"
|
|
|
|
|
leaveTo="opacity-0"
|
|
|
|
|
>
|
2023-11-10 15:48:34 +05:30
|
|
|
<div className="fixed inset-0 bg-custom-backdrop transition-opacity" />
|
2023-07-26 15:12:00 +05:30
|
|
|
</Transition.Child>
|
|
|
|
|
|
2024-02-28 15:19:11 +05:30
|
|
|
<div className="fixed inset-0 z-30 overflow-y-auto">
|
|
|
|
|
<div className="flex items-center justify-center p-4 sm:p-6 md:p-20">
|
|
|
|
|
<Transition.Child
|
|
|
|
|
as={React.Fragment}
|
|
|
|
|
enter="ease-out duration-300"
|
|
|
|
|
enterFrom="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"
|
|
|
|
|
enterTo="opacity-100 translate-y-0 sm:scale-100"
|
|
|
|
|
leave="ease-in duration-200"
|
|
|
|
|
leaveFrom="opacity-100 translate-y-0 sm:scale-100"
|
|
|
|
|
leaveTo="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"
|
|
|
|
|
>
|
2025-02-11 17:40:31 +05:30
|
|
|
<Dialog.Panel className="relative flex w-full max-w-2xl transform flex-col items-center justify-center divide-y divide-custom-border-200 divide-opacity-10 rounded-lg bg-custom-background-100 shadow-custom-shadow-md transition-all">
|
2024-02-28 15:19:11 +05:30
|
|
|
<div className="w-full max-w-2xl">
|
|
|
|
|
<Command
|
|
|
|
|
filter={(value, search) => {
|
|
|
|
|
if (value.toLowerCase().includes(search.toLowerCase())) return 1;
|
|
|
|
|
return 0;
|
|
|
|
|
}}
|
2025-02-11 17:40:31 +05:30
|
|
|
shouldFilter={searchTerm.length > 0}
|
|
|
|
|
onKeyDown={(e: any) => {
|
|
|
|
|
if ((e.metaKey || e.ctrlKey) && e.key.toLowerCase() === "k") {
|
|
|
|
|
e.preventDefault();
|
|
|
|
|
e.stopPropagation();
|
|
|
|
|
closePalette();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (e.key === "Tab") {
|
|
|
|
|
e.preventDefault();
|
|
|
|
|
const commandList = document.querySelector("[cmdk-list]");
|
|
|
|
|
const items = commandList?.querySelectorAll("[cmdk-item]") || [];
|
|
|
|
|
const selectedItem = commandList?.querySelector('[aria-selected="true"]');
|
|
|
|
|
if (items.length === 0) return;
|
|
|
|
|
|
|
|
|
|
const currentIndex = Array.from(items).indexOf(selectedItem as Element);
|
|
|
|
|
let nextIndex;
|
|
|
|
|
|
|
|
|
|
if (e.shiftKey) {
|
|
|
|
|
nextIndex = currentIndex > 0 ? currentIndex - 1 : items.length - 1;
|
|
|
|
|
} else {
|
|
|
|
|
nextIndex = currentIndex < items.length - 1 ? currentIndex + 1 : 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const nextItem = items[nextIndex] as HTMLElement;
|
|
|
|
|
if (nextItem) {
|
|
|
|
|
nextItem.setAttribute("aria-selected", "true");
|
|
|
|
|
selectedItem?.setAttribute("aria-selected", "false");
|
|
|
|
|
nextItem.focus();
|
2025-02-14 19:04:08 +05:30
|
|
|
nextItem.scrollIntoView({ behavior: "smooth", block: "nearest" });
|
2025-02-11 17:40:31 +05:30
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (e.key === "Escape" && searchTerm) {
|
|
|
|
|
e.preventDefault();
|
|
|
|
|
setSearchTerm("");
|
|
|
|
|
}
|
2024-04-26 18:27:32 +05:30
|
|
|
|
2025-02-11 17:40:31 +05:30
|
|
|
if (e.key === "Escape" && !page && !searchTerm) {
|
|
|
|
|
e.preventDefault();
|
|
|
|
|
closePalette();
|
|
|
|
|
}
|
2023-11-21 15:46:41 +05:30
|
|
|
|
2024-02-28 15:19:11 +05:30
|
|
|
if (e.key === "Escape" || (e.key === "Backspace" && !searchTerm)) {
|
|
|
|
|
e.preventDefault();
|
|
|
|
|
setPages((pages) => pages.slice(0, -1));
|
|
|
|
|
setPlaceholder("Type a command or search...");
|
|
|
|
|
}
|
|
|
|
|
}}
|
2023-10-18 20:29:56 +05:30
|
|
|
>
|
2025-02-14 19:04:08 +05:30
|
|
|
<div className="relative flex items-center px-4 border-0 border-b border-custom-border-200">
|
|
|
|
|
<div className="flex items-center gap-2 flex-shrink-0">
|
|
|
|
|
<Search
|
|
|
|
|
className="h-4 w-4 text-custom-text-200 flex-shrink-0"
|
|
|
|
|
aria-hidden="true"
|
|
|
|
|
strokeWidth={2}
|
|
|
|
|
/>
|
|
|
|
|
{searchInIssue && issueDetails && (
|
|
|
|
|
<>
|
|
|
|
|
<span className="flex items-center text-sm">Update in:</span>
|
|
|
|
|
<span className="flex items-center gap-1 rounded px-1.5 py-1 text-sm bg-custom-primary-100/10 ">
|
|
|
|
|
{issueDetails.project_id && (
|
|
|
|
|
<IssueIdentifier
|
|
|
|
|
issueId={issueDetails.id}
|
|
|
|
|
projectId={issueDetails.project_id}
|
|
|
|
|
textContainerClassName="text-sm text-custom-primary-200"
|
|
|
|
|
/>
|
|
|
|
|
)}
|
|
|
|
|
<X
|
|
|
|
|
size={12}
|
|
|
|
|
strokeWidth={2}
|
|
|
|
|
className="flex-shrink-0 cursor-pointer"
|
|
|
|
|
onClick={() => {
|
|
|
|
|
setSearchInIssue(false);
|
|
|
|
|
}}
|
|
|
|
|
/>
|
|
|
|
|
</span>
|
|
|
|
|
</>
|
|
|
|
|
)}
|
|
|
|
|
</div>
|
2024-02-28 15:19:11 +05:30
|
|
|
<Command.Input
|
2025-02-14 19:04:08 +05:30
|
|
|
className={cn(
|
|
|
|
|
"w-full bg-transparent p-4 text-sm text-custom-text-100 outline-none placeholder:text-custom-text-400 focus:ring-0"
|
|
|
|
|
)}
|
2024-02-28 15:19:11 +05:30
|
|
|
placeholder={placeholder}
|
|
|
|
|
value={searchTerm}
|
|
|
|
|
onValueChange={(e) => setSearchTerm(e)}
|
|
|
|
|
autoFocus
|
2024-09-06 16:21:14 +05:30
|
|
|
tabIndex={baseTabIndex}
|
2024-02-28 15:19:11 +05:30
|
|
|
/>
|
|
|
|
|
</div>
|
2023-10-18 20:29:56 +05:30
|
|
|
|
2024-05-08 23:01:20 +05:30
|
|
|
<Command.List className="vertical-scrollbar scrollbar-sm max-h-96 overflow-scroll p-2">
|
2024-02-28 15:19:11 +05:30
|
|
|
{searchTerm !== "" && (
|
|
|
|
|
<h5 className="mx-[3px] my-4 text-xs text-custom-text-100">
|
|
|
|
|
Search results for{" "}
|
|
|
|
|
<span className="font-medium">
|
|
|
|
|
{'"'}
|
|
|
|
|
{searchTerm}
|
|
|
|
|
{'"'}
|
|
|
|
|
</span>{" "}
|
|
|
|
|
in {!projectId || isWorkspaceLevel ? "workspace" : "project"}:
|
|
|
|
|
</h5>
|
|
|
|
|
)}
|
2023-10-18 20:29:56 +05:30
|
|
|
|
2024-02-28 15:19:11 +05:30
|
|
|
{!isLoading && resultsCount === 0 && searchTerm !== "" && debouncedSearchTerm !== "" && (
|
2024-03-15 17:28:45 +05:30
|
|
|
<div className="flex flex-col items-center justify-center px-3 py-8 text-center">
|
2025-02-06 20:41:31 +05:30
|
|
|
<SimpleEmptyState title={t("command_k.empty_state.search.title")} assetPath={resolvedPath} />
|
2024-03-15 17:28:45 +05:30
|
|
|
</div>
|
2024-02-28 15:19:11 +05:30
|
|
|
)}
|
2023-10-18 20:29:56 +05:30
|
|
|
|
2024-02-28 15:19:11 +05:30
|
|
|
{(isLoading || isSearching) && (
|
|
|
|
|
<Command.Loading>
|
|
|
|
|
<Loader className="space-y-3">
|
|
|
|
|
<Loader.Item height="40px" />
|
|
|
|
|
<Loader.Item height="40px" />
|
|
|
|
|
<Loader.Item height="40px" />
|
|
|
|
|
<Loader.Item height="40px" />
|
|
|
|
|
</Loader>
|
|
|
|
|
</Command.Loading>
|
|
|
|
|
)}
|
2023-10-18 20:29:56 +05:30
|
|
|
|
2024-02-28 15:19:11 +05:30
|
|
|
{debouncedSearchTerm !== "" && (
|
|
|
|
|
<CommandPaletteSearchResults closePalette={closePalette} results={results} />
|
|
|
|
|
)}
|
2023-10-18 20:29:56 +05:30
|
|
|
|
2024-02-28 15:19:11 +05:30
|
|
|
{!page && (
|
|
|
|
|
<>
|
|
|
|
|
{/* issue actions */}
|
2025-02-14 19:04:08 +05:30
|
|
|
{issueId && issueDetails && searchInIssue && (
|
2024-02-28 15:19:11 +05:30
|
|
|
<CommandPaletteIssueActions
|
|
|
|
|
closePalette={closePalette}
|
|
|
|
|
issueDetails={issueDetails}
|
|
|
|
|
pages={pages}
|
|
|
|
|
setPages={(newPages) => setPages(newPages)}
|
|
|
|
|
setPlaceholder={(newPlaceholder) => setPlaceholder(newPlaceholder)}
|
|
|
|
|
setSearchTerm={(newSearchTerm) => setSearchTerm(newSearchTerm)}
|
|
|
|
|
/>
|
|
|
|
|
)}
|
2024-07-15 14:18:57 +05:30
|
|
|
{workspaceSlug &&
|
|
|
|
|
workspaceProjectIds &&
|
|
|
|
|
workspaceProjectIds.length > 0 &&
|
2024-07-19 15:28:48 +05:30
|
|
|
canPerformAnyCreateAction && (
|
2025-02-06 20:41:31 +05:30
|
|
|
<Command.Group heading="Work item">
|
2024-07-15 14:18:57 +05:30
|
|
|
<Command.Item
|
|
|
|
|
onSelect={() => {
|
|
|
|
|
closePalette();
|
|
|
|
|
setTrackElement("Command Palette");
|
|
|
|
|
toggleCreateIssueModal(true);
|
|
|
|
|
}}
|
|
|
|
|
className="focus:bg-custom-background-80"
|
|
|
|
|
>
|
|
|
|
|
<div className="flex items-center gap-2 text-custom-text-200">
|
|
|
|
|
<LayersIcon className="h-3.5 w-3.5" />
|
2025-02-06 20:41:31 +05:30
|
|
|
Create new work item
|
2024-07-15 14:18:57 +05:30
|
|
|
</div>
|
|
|
|
|
<kbd>C</kbd>
|
|
|
|
|
</Command.Item>
|
|
|
|
|
</Command.Group>
|
|
|
|
|
)}
|
2024-09-16 18:56:28 +05:30
|
|
|
{workspaceSlug && canPerformWorkspaceActions && (
|
2024-02-28 15:19:11 +05:30
|
|
|
<Command.Group heading="Project">
|
|
|
|
|
<Command.Item
|
|
|
|
|
onSelect={() => {
|
|
|
|
|
closePalette();
|
|
|
|
|
setTrackElement("Command palette");
|
|
|
|
|
toggleCreateProjectModal(true);
|
|
|
|
|
}}
|
|
|
|
|
className="focus:outline-none"
|
|
|
|
|
>
|
|
|
|
|
<div className="flex items-center gap-2 text-custom-text-200">
|
|
|
|
|
<FolderPlus className="h-3.5 w-3.5" />
|
|
|
|
|
Create new project
|
|
|
|
|
</div>
|
|
|
|
|
<kbd>P</kbd>
|
|
|
|
|
</Command.Item>
|
|
|
|
|
</Command.Group>
|
|
|
|
|
)}
|
2023-10-18 20:29:56 +05:30
|
|
|
|
2024-02-28 15:19:11 +05:30
|
|
|
{/* project actions */}
|
2024-09-16 18:56:28 +05:30
|
|
|
{projectId && canPerformAnyCreateAction && (
|
|
|
|
|
<CommandPaletteProjectActions closePalette={closePalette} />
|
|
|
|
|
)}
|
2024-09-16 19:22:47 +05:30
|
|
|
{canPerformWorkspaceActions && (
|
2024-09-16 18:56:28 +05:30
|
|
|
<Command.Group heading="Workspace Settings">
|
|
|
|
|
<Command.Item
|
|
|
|
|
onSelect={() => {
|
|
|
|
|
setPlaceholder("Search workspace settings...");
|
|
|
|
|
setSearchTerm("");
|
|
|
|
|
setPages([...pages, "settings"]);
|
|
|
|
|
}}
|
|
|
|
|
className="focus:outline-none"
|
|
|
|
|
>
|
|
|
|
|
<div className="flex items-center gap-2 text-custom-text-200">
|
|
|
|
|
<Settings className="h-3.5 w-3.5" />
|
|
|
|
|
Search settings...
|
|
|
|
|
</div>
|
|
|
|
|
</Command.Item>
|
|
|
|
|
</Command.Group>
|
|
|
|
|
)}
|
2024-02-28 15:19:11 +05:30
|
|
|
<Command.Group heading="Account">
|
|
|
|
|
<Command.Item onSelect={createNewWorkspace} className="focus:outline-none">
|
|
|
|
|
<div className="flex items-center gap-2 text-custom-text-200">
|
|
|
|
|
<FolderPlus className="h-3.5 w-3.5" />
|
|
|
|
|
Create new workspace
|
|
|
|
|
</div>
|
|
|
|
|
</Command.Item>
|
|
|
|
|
<Command.Item
|
|
|
|
|
onSelect={() => {
|
|
|
|
|
setPlaceholder("Change interface theme...");
|
|
|
|
|
setSearchTerm("");
|
|
|
|
|
setPages([...pages, "change-interface-theme"]);
|
|
|
|
|
}}
|
|
|
|
|
className="focus:outline-none"
|
|
|
|
|
>
|
|
|
|
|
<div className="flex items-center gap-2 text-custom-text-200">
|
|
|
|
|
<Settings className="h-3.5 w-3.5" />
|
|
|
|
|
Change interface theme...
|
|
|
|
|
</div>
|
|
|
|
|
</Command.Item>
|
|
|
|
|
</Command.Group>
|
2023-11-21 15:46:41 +05:30
|
|
|
|
2024-02-28 15:19:11 +05:30
|
|
|
{/* help options */}
|
|
|
|
|
<CommandPaletteHelpActions closePalette={closePalette} />
|
|
|
|
|
</>
|
|
|
|
|
)}
|
2023-07-26 15:12:00 +05:30
|
|
|
|
2024-02-28 15:19:11 +05:30
|
|
|
{/* workspace settings actions */}
|
|
|
|
|
{page === "settings" && workspaceSlug && (
|
|
|
|
|
<CommandPaletteWorkspaceSettingsActions closePalette={closePalette} />
|
|
|
|
|
)}
|
2023-11-21 15:46:41 +05:30
|
|
|
|
2024-02-28 15:19:11 +05:30
|
|
|
{/* issue details page actions */}
|
|
|
|
|
{page === "change-issue-state" && issueDetails && (
|
|
|
|
|
<ChangeIssueState closePalette={closePalette} issue={issueDetails} />
|
|
|
|
|
)}
|
|
|
|
|
{page === "change-issue-priority" && issueDetails && (
|
|
|
|
|
<ChangeIssuePriority closePalette={closePalette} issue={issueDetails} />
|
|
|
|
|
)}
|
|
|
|
|
{page === "change-issue-assignee" && issueDetails && (
|
|
|
|
|
<ChangeIssueAssignee closePalette={closePalette} issue={issueDetails} />
|
|
|
|
|
)}
|
2023-11-21 15:46:41 +05:30
|
|
|
|
2024-02-28 15:19:11 +05:30
|
|
|
{/* theme actions */}
|
|
|
|
|
{page === "change-interface-theme" && (
|
|
|
|
|
<CommandPaletteThemeActions
|
|
|
|
|
closePalette={() => {
|
|
|
|
|
closePalette();
|
|
|
|
|
setPages((pages) => pages.slice(0, -1));
|
|
|
|
|
}}
|
|
|
|
|
/>
|
|
|
|
|
)}
|
|
|
|
|
</Command.List>
|
|
|
|
|
</Command>
|
|
|
|
|
</div>
|
2025-02-11 17:40:31 +05:30
|
|
|
{/* Bottom overlay */}
|
|
|
|
|
<div className="w-full flex items-center justify-between px-4 py-2 border-t border-custom-border-200 bg-custom-background-90/80 rounded-b-lg">
|
|
|
|
|
<div className="flex items-center gap-2">
|
|
|
|
|
<span className="text-xs text-custom-text-300">Actions</span>
|
|
|
|
|
<div className="flex items-center gap-1">
|
|
|
|
|
<div className="grid h-6 min-w-[1.5rem] place-items-center rounded bg-custom-background-80 border-[0.5px] border-custom-border-200 px-1.5 text-[10px] text-custom-text-200">
|
|
|
|
|
{platform === "MacOS" ? <CommandIcon className="h-2.5 w-2.5 text-custom-text-200" /> : "Ctrl"}
|
|
|
|
|
</div>
|
|
|
|
|
<kbd className="grid h-6 min-w-[1.5rem] place-items-center rounded bg-custom-background-80 border-[0.5px] border-custom-border-200 px-1.5 text-[10px] text-custom-text-200">
|
|
|
|
|
K
|
|
|
|
|
</kbd>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div className="flex items-center gap-2">
|
|
|
|
|
<span className="text-xs text-custom-text-300">Workspace Level</span>
|
|
|
|
|
<ToggleSwitch
|
|
|
|
|
value={isWorkspaceLevel}
|
|
|
|
|
onChange={() => setIsWorkspaceLevel((prevData) => !prevData)}
|
2025-02-20 17:59:32 +05:30
|
|
|
disabled={!projectId}
|
2025-02-11 17:40:31 +05:30
|
|
|
size="sm"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2024-02-28 15:19:11 +05:30
|
|
|
</Dialog.Panel>
|
|
|
|
|
</Transition.Child>
|
|
|
|
|
</div>
|
2023-07-26 15:12:00 +05:30
|
|
|
</div>
|
|
|
|
|
</Dialog>
|
|
|
|
|
</Transition.Root>
|
|
|
|
|
);
|
2023-11-08 13:51:55 +05:30
|
|
|
});
|