Skip to content

[WEB-4969] feat: add toggle button for work item filters row visibility#7865

Merged
pushya22 merged 4 commits intopreviewfrom
feat-work-item-filter-toggle
Sep 30, 2025
Merged

[WEB-4969] feat: add toggle button for work item filters row visibility#7865
pushya22 merged 4 commits intopreviewfrom
feat-work-item-filter-toggle

Conversation

@prateekshourya29
Copy link
Member

@prateekshourya29 prateekshourya29 commented Sep 29, 2025

Description

This PR introduces a toggle button for filters across all work item layouts, allowing users to hide the filters bar.

Type of Change

  • Feature (non-breaking change which adds functionality)

Note

Adds a filters toggle across work item pages and implements filter visibility state (auto/show-on-mount), plus a modal variant of the filters row.

  • UI/UX:
    • Add WorkItemFiltersToggle to headers for CYCLE, MODULE, PROJECT_VIEW, GLOBAL, ARCHIVED, PROFILE, and project issues.
    • Introduce FiltersToggle and update FiltersRow with visibility control, animation, icon tweaks, and new "modal" variant; default label hidden where appropriate.
    • Rename usages to "@/components/work-item-filters/filters-row".
  • State/Filters Core:
    • Add filter visibility to shared state: isVisible, toggleVisibility, auto-visibility options, and initialization via FilterInstanceHelper/FilterInstance.
    • Extend work item filter store/types: IWorkItemFilterInstance, TWorkItemFilterKey, showOnMount support, and visibility propagation.
  • Forms:
    • Use WorkItemFiltersRow modal variant in project/workspace view forms with showOnMount.
  • Routing/Params:
    • Minor param handling fixes (string coercion/guards) in headers.

Written by Cursor Bugbot for commit c4ee1db. This will update automatically on new commits. Configure here.

Summary by CodeRabbit

  • New Features

    • Added a Filters toggle to headers (project, cycle, module, view, workspace, archived, profile) to quickly show/hide work item filters.
    • Filters row gains a modal presentation and support for auto-show ("show on mount") when filters exist.
  • UI/UX

    • Header layouts streamlined to show layout/filter controls only in applicable contexts (e.g., unlocked or valid).
    • Filter button label can be hidden to reduce visual clutter.

@makeplane
Copy link

makeplane bot commented Sep 29, 2025

Linked to Plane Work Item(s)

This comment was auto-generated by Plane

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 29, 2025

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Walkthrough

Adds a work-item filters toggle component across headers, introduces filter visibility controls and showOnMount plumbing, updates types and store APIs for work-item filter instances, adjusts import paths, and refactors rich-filters UI variants and button config types.

Changes

Cohort / File(s) Summary
Header toggles & param guards
apps/web/app/(all)/.../cycles/(detail)/header.tsx, apps/web/app/(all)/.../modules/(detail)/header.tsx, apps/web/app/(all)/.../views/(detail)/[viewId]/header.tsx, apps/web/app/(all)/.../workspace-views/header.tsx, apps/web/core/components/profile/profile-issues-filter.tsx, apps/web/core/components/issues/archived-issues-header.tsx
Add WorkItemFiltersToggle to headers; derive/guard router IDs (avoid direct .toString()), simplify conditional rendering in headers.
General filters header
apps/web/core/components/issues/filters.tsx
Insert WorkItemFiltersToggle into header filters and pass entityType/entityId.
Issue layout & forms imports / usage
apps/web/core/components/issues/issue-layouts/roots/*-layout-root.tsx, apps/web/core/components/profile/profile-issues.tsx, apps/web/core/components/views/form.tsx, apps/web/core/components/workspace/views/form.tsx
Change import from work-item-filters/work-item-filters-rowwork-item-filters/filters-row; switch WorkItemFiltersRow variant to "modal" and add showOnMount to HOC invocations.
Rich filters UI
apps/web/core/components/rich-filters/add-filters-button.tsx, apps/web/core/components/rich-filters/filters-row.tsx, apps/web/core/components/rich-filters/filters-toggle.tsx
Make buttonConfig.label explicit (`string
Work-item filters HOCs / toggle wrapper
apps/web/core/components/work-item-filters/filters-row.tsx, apps/web/core/components/work-item-filters/filters-hoc/base.tsx, apps/web/core/components/work-item-filters/filters-hoc/shared.ts, apps/web/core/components/work-item-filters/filters-toggle.tsx
Align render-prop types to IWorkItemFilterInstance; add filter prop to row wrapper; thread showOnMount to HOCs and getOrCreateFilter; add WorkItemFiltersToggle wrapper that resolves filter from store.
Hook
apps/web/core/hooks/store/work-item-filters/use-work-item-filter-instance.ts
Return type changed to `IWorkItemFilterInstance
Work-item filters store & shared types
packages/shared-state/src/store/work-item-filters/filter.store.ts, packages/shared-state/src/store/work-item-filters/shared.ts, packages/shared-state/src/store/work-item-filters/index.ts
Introduce IWorkItemFilterInstance and TWorkItemFilterKey; migrate store maps/APIs to new types; add optional showOnMount to getOrCreateFilter; re-export shared types.
Rich-filters option constants
packages/constants/src/rich-filters/option.ts
Add TAutoVisibilityOptions, DEFAULT_FILTER_VISIBILITY_OPTIONS; extend TFilterOptions with visibility.
Shared-state: rich-filters core (visibility helper & filter)
packages/shared-state/src/store/rich-filters/filter-helpers.ts, packages/shared-state/src/store/rich-filters/filter.ts, packages/shared-state/src/store/rich-filters/config-manager.ts
Add FilterInstanceHelper with isVisible, setInitialVisibility, toggleVisibility; expose isVisible and toggleVisibility on IFilterInstance/FilterInstance; make _filterInstance private in config manager; initialize visibility via helper.

Sequence Diagram(s)

sequenceDiagram
  participant U as User
  participant H as Header UI
  participant W as WorkItemFiltersToggle
  participant S as WorkItemFilters Store
  participant F as IWorkItemFilterInstance
  participant FH as FilterInstanceHelper

  U->>H: Open page / header mounts
  H->>W: render(entityType, entityId)
  W->>S: getFilter(entityType, entityId)
  alt existing filter
    S-->>W: IWorkItemFilterInstance (existing)
  else create
    S->>F: getOrCreateFilter({ showOnMount? })
    F->>FH: setInitialVisibility(options)
    FH-->>F: isVisible initialized
    S-->>W: IWorkItemFilterInstance (new)
  end
  W-->>H: display toggle (F.isVisible)
  U->>W: click toggle
  W->>F: toggleVisibility()
  F->>FH: toggleVisibility()
  FH-->>F: isVisible updated
  F-->>W: new isVisible
  W-->>H: update UI (show/hide filters row)
Loading
sequenceDiagram
  participant C as FiltersToggle (component)
  participant F as IWorkItemFilterInstance
  participant U as User

  C->>F: read hasActiveFilters, hasUpdates, isVisible
  alt no conditions & hidden
    C-->>U: render AddFilterButton
  else
    C-->>U: render toggle + changes pill
  end
  U->>C: click toggle
  C->>F: toggleVisibility(optional)
  F->>F: update isVisible (via helper)
  F-->>C: new isVisible
  C-->>U: update rendered state
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~75 minutes

Possibly related PRs

Suggested labels

🌐frontend, ready_to_merge

Suggested reviewers

  • sriramveeraghanta

Poem

I twitch my whiskers at toggles bright,
A burrow of filters wakes to light.
Click once — visibility hops in view,
Conditions dance, the headers renew.
A rabbit’s cheer — small change, big delight. 🐇✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description Check ⚠️ Warning The PR description correctly fills out the Description and Type of Change sections from the template but omits the required Test Scenarios section and does not include the Screenshots and Media or References headings, making it incomplete against the repository’s pull request description template. Please add a “Test Scenarios” section detailing the steps used to verify the changes and include a “Screenshots and Media” section if visual context is applicable, as well as a “References” section to link any related issues.
✅ Passed checks (2 passed)
Check name Status Explanation
Title Check ✅ Passed The title clearly identifies the main change by stating that a toggle button is being added for work item filters row visibility and includes the relevant issue tag, making it concise and directly related to the changeset.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat-work-item-filter-toggle

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d0c8ff6 and c4ee1db.

📒 Files selected for processing (1)
  • packages/shared-state/src/store/work-item-filters/filter.store.ts (4 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
packages/shared-state/src/store/work-item-filters/filter.store.ts (3)
packages/constants/src/rich-filters/option.ts (1)
  • TExpressionOptions (44-48)
packages/types/src/view-props.ts (1)
  • TWorkItemFilterExpression (120-120)
packages/shared-state/src/store/work-item-filters/shared.ts (2)
  • TWorkItemFilterKey (6-6)
  • IWorkItemFilterInstance (8-8)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Build and lint web apps
  • GitHub Check: Cursor Bugbot
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (7)
packages/shared-state/src/store/work-item-filters/filter.store.ts (7)

9-11: LGTM! Clean type consolidation.

The imports correctly reference shared types (IWorkItemFilterInstance, TWorkItemFilterKey) from the local shared module, aligning with the refactoring objectives.


14-14: LGTM! Parameter addition supports visibility control.

The optional showOnMount parameter correctly extends the params type to support the new visibility toggle feature.


23-25: LGTM! Interface signatures correctly updated.

The interface methods now correctly use the shared IWorkItemFilterInstance and TWorkItemFilterKey types, maintaining type safety throughout the API surface.


46-46: LGTM! Type-safe map instantiation.

The map instantiation correctly uses the updated generic types, ensuring consistency with the interface definition.


85-88: LGTM! Visibility toggle now correctly honors both true and false.

The logic now properly checks if showOnMount is provided and forwards the boolean value directly to toggleVisibility(). This correctly handles both showOnMount=true (show filters) and showOnMount=false (hide filters), addressing the concerns raised in previous reviews.


94-95: LGTM! Standard map insertion with proper types.

The filter key generation and map insertion are straightforward and type-safe, correctly using the new shared types.


213-215: No changes required for showOnMount handling

The existing logic passes { autoSetVisibility: true } when params.showOnMount is false, causing setInitialVisibility to default to hidden (or visible only if there are active filters), which aligns with the intended behavior.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🧪 Early access (Sonnet 4.5): enabled

We are currently testing the Sonnet 4.5 model, which is expected to improve code review quality. However, this model may lead to increased noise levels in the review comments. Please disable the early access features if the noise level causes any inconvenience.

Note:

  • Public repositories are always opted into early access features.
  • You can enable or disable early access features from the CodeRabbit UI or by updating the CodeRabbit configuration file.

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 6

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
packages/shared-state/src/store/rich-filters/filter-helpers.ts (1)

61-63: Fix JSDoc: wrong @template, outdated @param, incorrect @returns

  • Line 61: @template K should be @template P.
  • Lines 74-79: constructor docs still mention @param adapter; update to @param filterInstance and @param params.
  • Lines 113-117: method doesn’t return a value; remove the @returns line or return a boolean.
- * @template K - The filter property type extending TFilterProperty
+ * @template P - The filter property type extending TFilterProperty
@@
- * @param adapter - The filter adapter for converting between internal and external formats
+ * @param filterInstance - The parent filter instance
+ * @param params - Additional parameters (e.g., adapter for conversions)
@@
- * @returns The initial visibility state

Also applies to: 74-79, 113-117

apps/web/core/components/rich-filters/add-filters-button.tsx (1)

10-21: Add missing label in inline buttonConfig for AddFilterButton
In apps/web/core/components/rich-filters/filters-toggle.tsx (lines 38–41), the inline buttonConfig object omits the now-required label: string | null. Add label: null (or an appropriate string) to satisfy the updated prop type. The filters-row.tsx usage already includes label: null.

🧹 Nitpick comments (11)
packages/shared-state/src/store/rich-filters/filter-helpers.ts (4)

84-88: MobX: don’t double-decorate actions

Methods are wrapped with action(...) and also annotated as action in makeObservable. Pick one. Keeping the makeObservable annotations and removing the wrappers is cleaner.

-    makeObservable(this, {
-      isVisible: observable,
-      setInitialVisibility: action,
-      toggleVisibility: action,
-    });
+    makeObservable(this, {
+      isVisible: observable,
+      setInitialVisibility: action,
+      toggleVisibility: action,
+    });
@@
-  setInitialVisibility: IFilterInstanceHelper<P, E>["setInitialVisibility"] = action((visibilityOption) => {
+  setInitialVisibility: IFilterInstanceHelper<P, E>["setInitialVisibility"] = (visibilityOption) => {
@@
-  });
+  };
@@
-  toggleVisibility: IFilterInstanceHelper<P, E>["toggleVisibility"] = action((isVisible) => {
+  toggleVisibility: IFilterInstanceHelper<P, E>["toggleVisibility"] = (isVisible) => {
@@
-  });
+  };

Also applies to: 118-147


98-101: Remove redundant deep clone (toJS already clones)

toJS returns a deep-cloned snapshot; combining it with cloneDeep is extra work.

-    return this.adapter.toInternal(toJS(cloneDeep(initialExpression)));
+    return this.adapter.toInternal(toJS(initialExpression));

20-22: Single source of truth for adapter

You already receive filterInstance; it exposes adapter. Passing a second adapter via params risks divergence.

-type TFilterInstanceHelperParams<P extends TFilterProperty, E extends TExternalFilter> = {
-  adapter: IFilterAdapter<P, E>;
-};
+type TFilterInstanceHelperParams<P extends TFilterProperty, E extends TExternalFilter> = Record<string, never>; // reserved for future
@@
-  private adapter: IFilterAdapter<P, E>;
+  private adapter: IFilterAdapter<P, E>;
@@
-  constructor(filterInstance: IFilterInstance<P, E>, params: TFilterInstanceHelperParams<P, E>) {
+  constructor(filterInstance: IFilterInstance<P, E>, _params: TFilterInstanceHelperParams<P, E>) {
     this._filterInstance = filterInstance;
-    this.adapter = params.adapter;
+    this.adapter = filterInstance.adapter;

If changing the signature is too invasive for this PR, at least assert equality in dev builds to catch mismatches.

Also applies to: 70-83


222-228: Optional: route unsupported operators to a no-op helper instead of console.warn

Library logs can get noisy. Consider a no-op branch or using your shared logger (with debug level) to avoid polluting console in production.

apps/web/core/components/rich-filters/add-filters-button.tsx (3)

104-107: Icon-only state lacks an accessible name

When label is null, the button renders icon-only without a text alternative. Add a visually hidden fallback so screen readers have a name.

           <div className="flex items-center gap-1">
             {iconConfig.shouldShowIcon && <FilterIcon className="size-4 text-custom-text-200" />}
-            {label}
+            {typeof label === "string" ? (
+              label
+            ) : (
+              <span className="sr-only">Filters</span>
+            )}
           </div>

22-24: Tighten the callback type to match the selected property

onFilterSelect currently types id as string, but handleFilterSelect passes a P. Make it (id: P) => void for type safety.

-  onFilterSelect?: (id: string) => void;
+  onFilterSelect?: (id: P) => void;

58-64: String is not localized

"All filters applied" is hard-coded. Consider moving to i18n to keep consistency with the rest of the app.

apps/web/core/components/rich-filters/filters-row.tsx (1)

163-175: Observer wrapper likely unnecessary

ElementTransition reads only React props and no observables. You can drop observer(...) to avoid extra wrapper.

packages/constants/src/rich-filters/option.ts (1)

55-66: Clarify the discriminant and align naming with UI props.

Consider a clearer discriminated union and consistent naming with UI props (showOnMount vs isVisibleOnMount).

-export type TAutoVisibilityOptions =
-  | {
-      autoSetVisibility: true;
-    }
-  | {
-      autoSetVisibility: false;
-      isVisibleOnMount: boolean;
-    };
+export type TAutoVisibilityOptions =
+  | { mode: "auto" }
+  | { mode: "manual"; showOnMount: boolean };

This reduces boolean‑flag ambiguity and matches the HOC/row prop terminology.

apps/web/core/components/views/form.tsx (1)

272-273: Switching to variant="modal": verify a11y and focus management.

Ensure the modal variant traps focus, sets aria‑modal/role, and restores focus on close. Quick sanity E2E recommended.

Suggested checks:

  • Open Create/Update View → filters open by default, Esc closes, tab loop stays inside.
  • Screen reader announces modal title.
apps/web/core/components/rich-filters/filters-toggle.tsx (1)

35-74: Hide the toggle until a filter instance exists

When the store hasn’t created a filter yet, filter is undefined, but we still render the clickable toggle. Users can click it, triggering the console error branch and leaving the control non-functional. Let’s skip rendering the interactive UI until the instance materializes so we don’t expose a dead control.

-    // Show the add filter button when there are no active conditions, the filter row is hidden, and no unsaved changes exist
-    if (filter && showAddFilterButton) {
+    if (!filter) {
+      return null;
+    }
+
+    // Show the add filter button when there are no active conditions, the filter row is hidden, and no unsaved changes exist
+    if (showAddFilterButton) {
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1fb22bd and 0decde5.

📒 Files selected for processing (31)
  • apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/cycles/(detail)/header.tsx (2 hunks)
  • apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/modules/(detail)/header.tsx (5 hunks)
  • apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/views/(detail)/[viewId]/header.tsx (5 hunks)
  • apps/web/app/(all)/[workspaceSlug]/(projects)/workspace-views/header.tsx (7 hunks)
  • apps/web/core/components/issues/archived-issues-header.tsx (3 hunks)
  • apps/web/core/components/issues/filters.tsx (2 hunks)
  • apps/web/core/components/issues/issue-layouts/roots/all-issue-layout-root.tsx (1 hunks)
  • apps/web/core/components/issues/issue-layouts/roots/archived-issue-layout-root.tsx (1 hunks)
  • apps/web/core/components/issues/issue-layouts/roots/cycle-layout-root.tsx (1 hunks)
  • apps/web/core/components/issues/issue-layouts/roots/module-layout-root.tsx (1 hunks)
  • apps/web/core/components/issues/issue-layouts/roots/project-layout-root.tsx (1 hunks)
  • apps/web/core/components/issues/issue-layouts/roots/project-view-layout-root.tsx (1 hunks)
  • apps/web/core/components/profile/profile-issues-filter.tsx (5 hunks)
  • apps/web/core/components/profile/profile-issues.tsx (1 hunks)
  • apps/web/core/components/rich-filters/add-filters-button.tsx (2 hunks)
  • apps/web/core/components/rich-filters/filters-row.tsx (5 hunks)
  • apps/web/core/components/rich-filters/filters-toggle.tsx (1 hunks)
  • apps/web/core/components/views/form.tsx (2 hunks)
  • apps/web/core/components/work-item-filters/filters-hoc/base.tsx (4 hunks)
  • apps/web/core/components/work-item-filters/filters-hoc/shared.ts (1 hunks)
  • apps/web/core/components/work-item-filters/filters-row.tsx (1 hunks)
  • apps/web/core/components/work-item-filters/filters-toggle.tsx (1 hunks)
  • apps/web/core/components/workspace/views/form.tsx (2 hunks)
  • apps/web/core/hooks/store/work-item-filters/use-work-item-filter-instance.ts (1 hunks)
  • packages/constants/src/rich-filters/option.ts (2 hunks)
  • packages/shared-state/src/store/rich-filters/config-manager.ts (1 hunks)
  • packages/shared-state/src/store/rich-filters/filter-helpers.ts (5 hunks)
  • packages/shared-state/src/store/rich-filters/filter.ts (9 hunks)
  • packages/shared-state/src/store/work-item-filters/filter.store.ts (4 hunks)
  • packages/shared-state/src/store/work-item-filters/index.ts (1 hunks)
  • packages/shared-state/src/store/work-item-filters/shared.ts (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (21)
apps/web/core/components/views/form.tsx (2)
apps/space/core/store/publish/publish.store.ts (1)
  • workspaceSlug (93-95)
apps/web/core/components/work-item-filters/filters-row.tsx (1)
  • WorkItemFiltersRow (12-12)
apps/web/core/components/workspace/views/form.tsx (1)
apps/web/core/components/work-item-filters/filters-row.tsx (1)
  • WorkItemFiltersRow (12-12)
apps/web/core/components/work-item-filters/filters-toggle.tsx (2)
apps/web/core/hooks/store/work-item-filters/use-work-item-filters.ts (1)
  • useWorkItemFilters (7-11)
apps/web/core/components/rich-filters/filters-toggle.tsx (1)
  • FiltersToggle (17-76)
apps/web/core/components/work-item-filters/filters-hoc/base.tsx (1)
packages/shared-state/src/store/work-item-filters/shared.ts (1)
  • IWorkItemFilterInstance (8-8)
apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/cycles/(detail)/header.tsx (1)
apps/web/core/components/work-item-filters/filters-toggle.tsx (1)
  • WorkItemFiltersToggle (14-22)
packages/shared-state/src/store/rich-filters/config-manager.ts (1)
packages/shared-state/src/store/rich-filters/filter.ts (1)
  • IFilterInstance (64-113)
apps/web/core/components/work-item-filters/filters-hoc/shared.ts (2)
packages/types/src/view-props.ts (2)
  • TWorkItemFilterProperty (104-104)
  • TWorkItemFilterExpression (120-120)
packages/shared-state/src/store/work-item-filters/shared.ts (1)
  • IWorkItemFilterInstance (8-8)
apps/web/core/components/work-item-filters/filters-row.tsx (2)
apps/web/core/components/rich-filters/filters-row.tsx (1)
  • TFiltersRowProps (13-23)
packages/shared-state/src/store/work-item-filters/shared.ts (1)
  • IWorkItemFilterInstance (8-8)
apps/web/core/hooks/store/work-item-filters/use-work-item-filter-instance.ts (1)
packages/shared-state/src/store/work-item-filters/shared.ts (1)
  • IWorkItemFilterInstance (8-8)
packages/shared-state/src/store/work-item-filters/filter.store.ts (3)
packages/constants/src/rich-filters/option.ts (1)
  • TExpressionOptions (44-48)
packages/types/src/view-props.ts (1)
  • TWorkItemFilterExpression (120-120)
packages/shared-state/src/store/work-item-filters/shared.ts (2)
  • TWorkItemFilterKey (6-6)
  • IWorkItemFilterInstance (8-8)
apps/web/core/components/rich-filters/filters-row.tsx (1)
apps/web/core/components/rich-filters/add-filters-button.tsx (1)
  • TAddFilterButtonProps (10-24)
apps/web/core/components/issues/archived-issues-header.tsx (2)
apps/web/core/components/archives/archive-tabs-list.tsx (1)
  • ArchiveTabsList (32-64)
apps/web/core/components/work-item-filters/filters-toggle.tsx (1)
  • WorkItemFiltersToggle (14-22)
packages/shared-state/src/store/rich-filters/filter.ts (4)
packages/types/src/rich-filters/expression.ts (1)
  • TFilterProperty (19-19)
packages/types/src/rich-filters/adapter.ts (1)
  • TExternalFilter (7-7)
packages/shared-state/src/store/rich-filters/filter-helpers.ts (1)
  • FilterInstanceHelper (64-230)
packages/constants/src/rich-filters/option.ts (1)
  • DEFAULT_FILTER_VISIBILITY_OPTIONS (70-72)
apps/web/core/components/issues/filters.tsx (1)
apps/web/core/components/work-item-filters/filters-toggle.tsx (1)
  • WorkItemFiltersToggle (14-22)
packages/shared-state/src/store/work-item-filters/shared.ts (2)
packages/shared-state/src/store/rich-filters/filter.ts (1)
  • IFilterInstance (64-113)
packages/types/src/view-props.ts (2)
  • TWorkItemFilterProperty (104-104)
  • TWorkItemFilterExpression (120-120)
packages/shared-state/src/store/rich-filters/filter-helpers.ts (4)
packages/types/src/rich-filters/expression.ts (2)
  • TFilterProperty (19-19)
  • TFilterExpression (86-88)
packages/types/src/rich-filters/adapter.ts (2)
  • TExternalFilter (7-7)
  • IFilterAdapter (14-23)
packages/constants/src/rich-filters/option.ts (2)
  • TExpressionOptions (44-48)
  • TAutoVisibilityOptions (58-65)
packages/shared-state/src/store/rich-filters/filter.ts (2)
  • isVisible (216-218)
  • IFilterInstance (64-113)
apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/views/(detail)/[viewId]/header.tsx (1)
apps/web/core/components/work-item-filters/filters-toggle.tsx (1)
  • WorkItemFiltersToggle (14-22)
apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/modules/(detail)/header.tsx (1)
apps/web/core/components/work-item-filters/filters-toggle.tsx (1)
  • WorkItemFiltersToggle (14-22)
apps/web/core/components/rich-filters/filters-toggle.tsx (4)
packages/types/src/rich-filters/expression.ts (1)
  • TFilterProperty (19-19)
packages/types/src/rich-filters/adapter.ts (1)
  • TExternalFilter (7-7)
packages/shared-state/src/store/rich-filters/filter.ts (1)
  • IFilterInstance (64-113)
apps/web/core/components/rich-filters/add-filters-button.tsx (1)
  • AddFilterButton (26-113)
apps/web/app/(all)/[workspaceSlug]/(projects)/workspace-views/header.tsx (3)
apps/web/ce/components/views/helper.tsx (1)
  • GlobalViewLayoutSelection (13-13)
apps/web/core/components/work-item-filters/filters-toggle.tsx (1)
  • WorkItemFiltersToggle (14-22)
apps/web/core/components/issues/issue-layouts/filters/header/helpers/dropdown.tsx (1)
  • FiltersDropdown (25-124)
apps/web/core/components/profile/profile-issues-filter.tsx (1)
apps/web/core/components/work-item-filters/filters-toggle.tsx (1)
  • WorkItemFiltersToggle (14-22)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Cursor Bugbot
  • GitHub Check: Analyze (javascript)
  • GitHub Check: Build and lint web apps
🔇 Additional comments (17)
packages/shared-state/src/store/rich-filters/config-manager.ts (1)

61-61: Encapsulation win

Making _filterInstance private enforces the intended ownership boundary so callers can’t poke at the parent filter directly. Solid cleanup.

packages/shared-state/src/store/rich-filters/filter-helpers.ts (1)

32-39: Visibility API addition looks good

Adding isVisible, setInitialVisibility, and toggleVisibility to the helper’s public surface aligns with the PR goal and keeps consumers simple.

Please confirm all call sites use toggleVisibility (not setting helper.isVisible directly).

apps/web/core/components/issues/issue-layouts/roots/archived-issue-layout-root.tsx (1)

12-12: Import path change looks good

Switch to the consolidated filters-row path keeps behavior unchanged.

apps/web/core/components/issues/issue-layouts/roots/project-view-layout-root.tsx (1)

12-12: Import path change looks good

Aligned with new filters-row module. No behavioral impact.

apps/web/core/components/issues/filters.tsx (1)

106-107: Verify EPIC context filters and default toggle visibility

Confirm that ISSUE_STORE_TO_FILTERS_MAP provides display and property filters for EIssuesStoreType.EPIC so the toggle renders valid filters in the EPIC header, and that its default visibility matches existing UX expectations.

apps/web/core/components/profile/profile-issues.tsx (1)

13-13: Import path update aligns with filters refactor.

Switching to the new filters-row module keeps this profile view in sync with the reorganized work-item filters components. ✔️

apps/web/core/components/issues/issue-layouts/roots/cycle-layout-root.tsx (1)

15-123: Path realignment looks good.

Pointing the cycle layout to filters-row matches the shared filters module move and keeps the tracker wiring intact without altering runtime behavior.

apps/web/core/components/issues/issue-layouts/roots/module-layout-root.tsx (1)

13-94: Consistent filters-row import.

Good call updating this module root to the shared filters-row path so all layouts rely on the same component surface.

apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/cycles/(detail)/header.tsx (1)

40-213: Toggle integration fits perfectly.

The header now exposes the shared WorkItemFiltersToggle with the cycle’s store identifiers, so users can hide/show the filters row without disturbing the existing display controls. Nice, cohesive placement ahead of the filters dropdown.

packages/shared-state/src/store/work-item-filters/index.ts (1)

3-3: Re-export keeps public API complete.

Including ./shared ensures downstream imports can pick up IWorkItemFilterInstance and related helpers from the top-level store index. 👍

apps/web/core/components/views/form.tsx (2)

25-25: Path update is consistent with module move.


267-268: Confirm showOnMount behavior won’t cause SSR hydration flicker.

If visibility derives from client state, ensure initial server markup matches (e.g., guard with useEffect or default visible state). Otherwise a brief flash may occur.

apps/web/core/components/issues/issue-layouts/roots/project-layout-root.tsx (1)

14-15: Import path swap is safe and consistent with other roots.

apps/web/core/components/workspace/views/form.tsx (3)

23-24: Import path update aligns with new component location.


178-179: showOnMount: validate initial visibility for Workspace views.

On create flows entityId is undefined; confirm HOC’s init path still shows filters immediately and doesn’t persist accidental state across form resets.


183-184: Modal variant parity with Project form.

Good for UX consistency. Verify both forms share the same close/save semantics and keyboard shortcuts.

apps/web/core/components/issues/issue-layouts/roots/all-issue-layout-root.tsx (1)

13-13: Import path alias verified; no residual references to the old module.
WorkItemFiltersRow is exported identically from the new path with no side effects.

this.isVisible = isVisible;
return;
}
this.isVisible = !this.isVisible;
Copy link
Member

Choose a reason for hiding this comment

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

Let's just use ?? here instead of an if-else.

Copy link
Member Author

Choose a reason for hiding this comment

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

I feel this is more readable.

cursor[bot]

This comment was marked as outdated.

@pushya22 pushya22 merged commit 7ce21a6 into preview Sep 30, 2025
7 checks passed
@pushya22 pushya22 deleted the feat-work-item-filter-toggle branch September 30, 2025 12:49
zy1000 pushed a commit to zy1000/plane that referenced this pull request Oct 1, 2025
…ty (makeplane#7865)

* [WEB-4969] feat: add toggle button for work item filters row visibility

* fix: improve error handling in filter update and refine visibility condition check

* chore: correct visibility toggle parameter in filter store
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants