Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions apps/web/core/components/core/image-picker-popover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ export const ImagePickerPopover = observer(function ImagePickerPopover(props: Pr
<Tab.Panel className="mt-4 h-full w-full space-y-4">
{(unsplashImages || !unsplashError) && (
<>
<div className="flex gap-x-2">
<div className="flex items-center gap-x-2">
<Controller
control={control}
name="search"
Expand All @@ -239,7 +239,7 @@ export const ImagePickerPopover = observer(function ImagePickerPopover(props: Pr
/>
)}
/>
<Button variant="primary" onClick={() => setSearchParams(formData.search)}>
<Button variant="primary" size="xl" onClick={() => setSearchParams(formData.search)}>
Search
</Button>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import type { FC } from "react";
import { observer } from "mobx-react";
import { Tab } from "@headlessui/react";
// plane imports
Expand Down Expand Up @@ -122,7 +121,7 @@ export const CycleProgressStats = observer(function CycleProgressStats(props: TC
className={cn(
`flex w-full items-center justify-between gap-2 rounded-md p-1`,
roundedTab ? `rounded-3xl` : `rounded-md`,
noBackground ? `` : `bg-surface-2`,
noBackground ? `` : `bg-layer-2`,
size === "xs" ? `text-11` : `text-13`
)}
>
Expand All @@ -131,7 +130,9 @@ export const CycleProgressStats = observer(function CycleProgressStats(props: TC
className={cn(
`p-1 w-full text-primary outline-none focus:outline-none cursor-pointer transition-all`,
roundedTab ? `rounded-3xl border border-subtle` : `rounded-sm`,
stat.key === currentTab ? "bg-surface-1 text-tertiary" : "text-placeholder hover:text-tertiary"
stat.key === currentTab
? "bg-layer-transparent-active text-secondary"
: "text-placeholder hover:text-secondary"
)}
key={stat.key}
onClick={() => setCycleTab(stat.key)}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import type { FC } from "react";
import { observer } from "mobx-react";
import { Tab } from "@headlessui/react";
import { useTranslation } from "@plane/i18n";
Expand Down Expand Up @@ -120,7 +119,7 @@ export const ModuleProgressStats = observer(function ModuleProgressStats(props:
className={cn(
`flex w-full items-center justify-between gap-2 rounded-md p-1`,
roundedTab ? `rounded-3xl` : `rounded-md`,
noBackground ? `` : `bg-surface-2`,
noBackground ? `` : `bg-layer-2`,
size === "xs" ? `text-11` : `text-13`
)}
>
Expand All @@ -129,7 +128,9 @@ export const ModuleProgressStats = observer(function ModuleProgressStats(props:
className={cn(
`p-1 w-full text-primary outline-none focus:outline-none cursor-pointer transition-all`,
roundedTab ? `rounded-3xl border border-subtle` : `rounded-sm`,
stat.key === currentTab ? "bg-surface-1 text-tertiary" : "text-placeholder hover:text-tertiary"
stat.key === currentTab
? "bg-layer-transparent-active text-secondary"
: "text-placeholder hover:text-secondary"
Comment on lines +131 to +133

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Use -selected variant instead of -active for persistent tab selection.

The selected tab currently uses bg-layer-transparent-active, but according to design guidelines, -active variants are for momentary pressed or active states, while -selected variants are for persistent selection logic. Since the tab selection is persistent (determined by currentTab state), use bg-layer-transparent-selected or the data-[selected] pattern instead:

stat.key === currentTab
  ? "bg-layer-transparent-selected text-secondary"
  : "text-placeholder hover:text-secondary"

Or with data attributes (if Base UI components set data-selected):

className={cn(
  "...",
  stat.key === currentTab && "data-[selected]:bg-layer-transparent-selected"
)}
🤖 Prompt for AI Agents
In apps/web/core/components/modules/analytics-sidebar/progress-stats.tsx around
lines 131 to 133, the tab uses the transient "-active" background class for a
persistent selection state; replace "bg-layer-transparent-active" with the
persistent variant "bg-layer-transparent-selected" (or use the data-[selected]
pattern if your UI base sets data-selected) so the selected tab uses the correct
styling for persistent selection while keeping the text class as
"text-secondary".

)}
key={stat.key}
onClick={() => setModuleTab(stat.key)}
Expand Down
Loading