diff --git a/plane-src/apps/web/ce/components/projects/external-contours/request-traceability.tsx b/plane-src/apps/web/ce/components/projects/external-contours/request-traceability.tsx index 8e39fc1..8505bfc 100644 --- a/plane-src/apps/web/ce/components/projects/external-contours/request-traceability.tsx +++ b/plane-src/apps/web/ce/components/projects/external-contours/request-traceability.tsx @@ -7,7 +7,6 @@ import type { ReactNode } from "react"; import { observer } from "mobx-react"; import { useTranslation } from "@plane/i18n"; -import { Badge } from "@plane/propel/badge"; import type { TExternalContourRequest } from "@plane/types"; import { Avatar } from "@plane/ui"; import { renderFormattedDate } from "@plane/utils"; @@ -54,7 +53,7 @@ export const ExternalContoursRequestTraceability = observer(function ExternalCon - {targetProjectName} + {targetProjectName} @@ -72,7 +71,7 @@ export const ExternalContoursRequestTraceability = observer(function ExternalCon {assigneeDetails.length > 0 ? (
{assigneeDetails.map((assignee) => ( -
+
{assignee.display_name}
@@ -91,13 +90,13 @@ export const ExternalContoursRequestTraceability = observer(function ExternalCon {requestedAt ? renderFormattedDate(requestedAt) : t("common.none")} - - {dueDate} - - {lastUpdatedAt ? renderFormattedDate(lastUpdatedAt) : t("common.none")} + + + {dueDate} +
); diff --git a/plane-src/apps/web/ce/components/projects/external-contours/state-pill.tsx b/plane-src/apps/web/ce/components/projects/external-contours/state-pill.tsx index d28eb89..3ad3afb 100644 --- a/plane-src/apps/web/ce/components/projects/external-contours/state-pill.tsx +++ b/plane-src/apps/web/ce/components/projects/external-contours/state-pill.tsx @@ -19,7 +19,7 @@ export function ExternalContourStatePill(props: Props) { const state = request.issue.state_detail; return ( -
+
- {button ? ( - - ) : ( - + const comboButton = button ? ( + + ) : ( + ); return ( @@ -216,17 +212,17 @@ export const WorkItemStateDropdownBase = observer(function WorkItemStateDropdown {isOpen && (
-
+
setQuery(e.target.value)} placeholder={t("common.search.label")} @@ -234,17 +230,28 @@ export const WorkItemStateDropdownBase = observer(function WorkItemStateDropdown onKeyDown={searchInputKeyDown} />
-
+
{filteredOptions ? ( filteredOptions.length > 0 ? ( filteredOptions.map((option) => ( - + value={option.value} + className={({ active, selected }) => + cn( + `flex w-full cursor-pointer items-center justify-between gap-2 truncate rounded-[0.9rem] px-2 py-2 select-none outline-none ${ + active ? "bg-white/6" : "" + } ${selected ? "text-primary" : "text-secondary"}` + ) + } + > + {({ selected }) => ( + <> + {option.content} + {selected && } + + )} + )) ) : (

{t("no_matching_results")}

diff --git a/plane-src/apps/web/core/components/dropdowns/priority.tsx b/plane-src/apps/web/core/components/dropdowns/priority.tsx index 4cb9a01..f45e6ac 100644 --- a/plane-src/apps/web/core/components/dropdowns/priority.tsx +++ b/plane-src/apps/web/core/components/dropdowns/priority.tsx @@ -102,26 +102,18 @@ function BorderButton(props: ButtonProps) { > {!hideIcon && (priority ? ( - + /> ) : ( ))} @@ -132,7 +124,7 @@ function BorderButton(props: ButtonProps) { "text-placeholder": !priority || priority === "none", })} > - {priorityDetails?.title ?? placeholder} + {priority ? t(priority) : placeholder} )} {dropdownArrow && ( @@ -193,26 +185,18 @@ function BackgroundButton(props: ButtonProps) { > {!hideIcon && (priority ? ( - + /> ) : ( ))} @@ -223,7 +207,7 @@ function BackgroundButton(props: ButtonProps) { "text-placeholder": !priority || priority === "none", })} > - {priorityDetails?.title ?? t("common.priority") ?? placeholder} + {priority ? t(priority) : t("common.priority") ?? placeholder} )} {dropdownArrow && ( @@ -277,26 +261,18 @@ function TransparentButton(props: ButtonProps) { > {!hideIcon && (priority ? ( - + /> ) : ( ))} @@ -307,7 +283,7 @@ function TransparentButton(props: ButtonProps) { "text-placeholder": !priority || priority === "none", })} > - {priorityDetails?.title ?? t("common.priority") ?? placeholder} + {priority ? t(priority) : t("common.priority") ?? placeholder} )} {dropdownArrow && ( @@ -368,8 +344,8 @@ export function PriorityDropdown(props: Props) { query: priority.key, content: (
- - {priority.title} + + {t(priority.key)}
), })); @@ -398,63 +374,53 @@ export function PriorityDropdown(props: Props) { ? BackgroundButton : TransparentButton; - const comboButton = ( - <> - {button ? ( - - ) : ( - + const comboButton = button ? ( + + ) : ( + ); return (
-
+
setQuery(e.target.value)} placeholder={t("search")} @@ -483,7 +449,7 @@ export function PriorityDropdown(props: Props) { onKeyDown={searchInputKeyDown} />
-
+
{filteredOptions.length > 0 ? ( filteredOptions.map((option) => ( cn( - `flex w-full cursor-pointer items-center justify-between gap-2 truncate rounded-sm px-1 py-1.5 select-none ${ - active ? "bg-layer-transparent-hover" : "" + `flex w-full cursor-pointer items-center justify-between gap-2 truncate rounded-[0.9rem] px-2 py-2 select-none outline-none ${ + active ? "bg-white/6" : "" } ${selected ? "text-primary" : "text-secondary"}` ) } diff --git a/plane-src/apps/web/core/components/dropdowns/state/base.tsx b/plane-src/apps/web/core/components/dropdowns/state/base.tsx index 1323886..9b0f218 100644 --- a/plane-src/apps/web/core/components/dropdowns/state/base.tsx +++ b/plane-src/apps/web/core/components/dropdowns/state/base.tsx @@ -11,7 +11,7 @@ import { usePopper } from "react-popper"; import { Combobox } from "@headlessui/react"; // plane imports import { useTranslation } from "@plane/i18n"; -import { SearchIcon, StateGroupIcon, ChevronDownIcon } from "@plane/propel/icons"; +import { SearchIcon, StateGroupIcon, ChevronDownIcon, CheckIcon } from "@plane/propel/icons"; import type { IState } from "@plane/types"; import { ComboDropDown, Spinner } from "@plane/ui"; import { cn } from "@plane/utils"; @@ -21,9 +21,6 @@ import { BUTTON_VARIANTS_WITH_TEXT } from "@/components/dropdowns/constants"; import type { TDropdownProps } from "@/components/dropdowns/types"; // hooks import { useDropdown } from "@/hooks/use-dropdown"; -// plane web imports -import { StateOption } from "@/plane-web/components/workflow"; - export type TWorkItemStateDropdownBaseProps = TDropdownProps & { alwaysAllowStateChange?: boolean; button?: ReactNode; @@ -136,71 +133,70 @@ export const WorkItemStateDropdownBase = observer(function WorkItemStateDropdown handleClose(); }; - const comboButton = ( - <> - {button ? ( - - ) : ( - + const comboButton = button ? ( + + ) : ( + ); return ( @@ -218,17 +214,17 @@ export const WorkItemStateDropdownBase = observer(function WorkItemStateDropdown {isOpen && (
-
+
setQuery(e.target.value)} placeholder={t("common.search.label")} @@ -236,17 +232,28 @@ export const WorkItemStateDropdownBase = observer(function WorkItemStateDropdown onKeyDown={searchInputKeyDown} />
-
+
{filteredOptions ? ( filteredOptions.length > 0 ? ( filteredOptions.map((option) => ( - + value={option.value} + className={({ active, selected }) => + cn( + `flex w-full cursor-pointer items-center justify-between gap-2 truncate rounded-[0.9rem] px-2 py-2 select-none outline-none ${ + active ? "bg-white/6" : "" + } ${selected ? "text-primary" : "text-secondary"}` + ) + } + > + {({ selected }) => ( + <> + {option.content} + {selected && } + + )} + )) ) : (

{t("no_matching_results")}

diff --git a/plane-src/apps/web/core/components/navigation/top-nav-power-k.tsx b/plane-src/apps/web/core/components/navigation/top-nav-power-k.tsx index bc090b0..73a27aa 100644 --- a/plane-src/apps/web/core/components/navigation/top-nav-power-k.tsx +++ b/plane-src/apps/web/core/components/navigation/top-nav-power-k.tsx @@ -9,6 +9,7 @@ import { Command } from "cmdk"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; import { createPortal } from "react-dom"; +import { useTranslation } from "@plane/i18n"; // hooks import { CloseIcon, SearchIcon } from "@plane/propel/icons"; import { cn } from "@plane/utils"; @@ -28,6 +29,7 @@ type TTopNavPowerKProps = { export const TopNavPowerK = observer((props: TTopNavPowerKProps) => { const { variant = "top-navigation" } = props; + const { t } = useTranslation(); // router const router = useAppRouter(); const params = useParams(); @@ -313,7 +315,7 @@ export const TopNavPowerK = observer((props: TTopNavPowerKProps) => { onMouseDown={handleMouseDown} onFocus={handleFocus} onKeyDown={handleKeyDown} - placeholder="Search commands..." + placeholder={t("power_k.search_menu.quick_command_placeholder")} className="placeholder-text-placeholder min-w-0 flex-1 bg-transparent text-13 text-primary outline-none" /> {searchTerm && ( @@ -386,19 +388,24 @@ export const TopNavPowerK = observer((props: TTopNavPowerKProps) => { if (!isOpen) openPanel(); }} onMouseDown={handleMouseDown} - onFocus={handleFocus} - onKeyDown={handleKeyDown} - placeholder="Search commands..." - className="placeholder-text-placeholder min-w-0 flex-1 bg-transparent text-13 text-primary outline-none" - autoFocus - /> + onFocus={handleFocus} + onKeyDown={handleKeyDown} + placeholder={t("power_k.search_menu.quick_command_placeholder")} + className="placeholder-text-placeholder min-w-0 flex-1 bg-transparent text-13 text-primary outline-none" + autoFocus + /> {searchTerm && ( )}
-
+
+
+
+ {t("power_k.search_menu.quick_access_title")} +
+
{searchCommandContent}
diff --git a/plane-src/packages/i18n/src/locales/en/translations.ts b/plane-src/packages/i18n/src/locales/en/translations.ts index 1de38cf..08485c9 100644 --- a/plane-src/packages/i18n/src/locales/en/translations.ts +++ b/plane-src/packages/i18n/src/locales/en/translations.ts @@ -2891,6 +2891,8 @@ export default { search_menu: { no_results: "No results found", clear_search: "Clear search", + quick_access_title: "Quick access", + quick_command_placeholder: "Find a quick command", }, footer: { workspace_level: "Workspace level", diff --git a/plane-src/packages/i18n/src/locales/ru/translations.ts b/plane-src/packages/i18n/src/locales/ru/translations.ts index 6062b53..0b4934e 100644 --- a/plane-src/packages/i18n/src/locales/ru/translations.ts +++ b/plane-src/packages/i18n/src/locales/ru/translations.ts @@ -3044,6 +3044,8 @@ export default { search_menu: { no_results: "Ничего не найдено", clear_search: "Очистить поиск", + quick_access_title: "Быстрый доступ", + quick_command_placeholder: "Найти быструю команду", }, footer: { workspace_level: "Уровень рабочего пространства",