-
Notifications
You must be signed in to change notification settings - Fork 2.7k
[WEB-4661] fix: move helpers file into utils #7568
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughThis update standardizes the import path for the Changes
Sequence Diagram(s)Not applicable: changes are limited to import paths and do not affect control flow or introduce new features. Estimated code review effort🎯 2 (Simple) | ⏱️ ~7 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Note 🔌 MCP (Model Context Protocol) integration is now available in Early Access!Pro users can now connect to remote MCP servers under the Integrations page to get reviews and chat conversations that understand additional development context. ✨ Finishing Touches
🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Pull Request Linked with Plane Work Items
Comment Automatically Generated by Plane |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
🧹 Nitpick comments (5)
packages/ui/src/auth-form/auth-input.tsx (1)
3-3
: Optional: consider a path alias to avoid future relative path churnUsing a TS path alias (e.g.,
@ui/utils
) can make refactors like this trivial and reduce mistakes in deep trees. If desired, I can propose the tsconfig and moduleNameMapper updates.packages/ui/src/toast/index.tsx (1)
8-8
: Optional: consider a path alias for utils imports.
Using a TS path alias (e.g.,@plane/ui/utils
) avoids brittle relative paths as files move. Can be adopted incrementally.packages/ui/src/dropdown/common/input-search.tsx (2)
33-35
: Prefer optional chaining over short-circuit with eslint-disableUse optional chaining to focus the input without disabling lint rules.
- // eslint-disable-next-line @typescript-eslint/no-unused-expressions - inputRef.current && inputRef.current.focus(); + inputRef.current?.focus();
3-3
: Type-only React import (optional)Only types from React are used at runtime here; consider type-only import to reduce runtime bundle impact.
-import React, { FC, useEffect, useRef } from "react"; +import { useEffect, useRef } from "react"; +import type React, { FC } from "react";packages/ui/src/dropdown/common/options.tsx (1)
3-3
: Use type-only React import (optional)React is only used for typing (React.FC). Prefer type-only import.
-import React from "react"; +import type React from "react";
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (59)
apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/issues/(list)/mobile-header.tsx
(1 hunks)packages/ui/src/auth-form/auth-forgot-password.tsx
(1 hunks)packages/ui/src/auth-form/auth-form.tsx
(1 hunks)packages/ui/src/auth-form/auth-input.tsx
(1 hunks)packages/ui/src/avatar/avatar-group.tsx
(1 hunks)packages/ui/src/avatar/avatar.tsx
(1 hunks)packages/ui/src/badge/badge.tsx
(1 hunks)packages/ui/src/breadcrumbs/breadcrumbs.tsx
(1 hunks)packages/ui/src/breadcrumbs/navigation-dropdown.tsx
(1 hunks)packages/ui/src/breadcrumbs/navigation-search-dropdown.tsx
(1 hunks)packages/ui/src/button/button.tsx
(1 hunks)packages/ui/src/button/toggle-switch.tsx
(1 hunks)packages/ui/src/calendar.tsx
(1 hunks)packages/ui/src/card/card.tsx
(1 hunks)packages/ui/src/collapsible/collapsible-button.tsx
(1 hunks)packages/ui/src/content-wrapper/content-wrapper.tsx
(1 hunks)packages/ui/src/drag-handle.tsx
(1 hunks)packages/ui/src/drop-indicator.tsx
(1 hunks)packages/ui/src/dropdown/common/button.tsx
(1 hunks)packages/ui/src/dropdown/common/input-search.tsx
(2 hunks)packages/ui/src/dropdown/common/options.tsx
(1 hunks)packages/ui/src/dropdown/multi-select.tsx
(1 hunks)packages/ui/src/dropdown/single-select.tsx
(1 hunks)packages/ui/src/dropdowns/context-menu/item.tsx
(1 hunks)packages/ui/src/dropdowns/context-menu/root.tsx
(1 hunks)packages/ui/src/dropdowns/custom-menu.tsx
(1 hunks)packages/ui/src/dropdowns/custom-search-select.tsx
(1 hunks)packages/ui/src/dropdowns/custom-select.tsx
(1 hunks)packages/ui/src/emoji/emoji-icon-picker-new.tsx
(1 hunks)packages/ui/src/emoji/emoji-icon-picker.tsx
(1 hunks)packages/ui/src/emoji/icons-list.tsx
(1 hunks)packages/ui/src/emoji/lucide-icons-list.tsx
(1 hunks)packages/ui/src/favorite-star.tsx
(1 hunks)packages/ui/src/form-fields/checkbox.tsx
(1 hunks)packages/ui/src/form-fields/input-color-picker.tsx
(1 hunks)packages/ui/src/form-fields/input.tsx
(1 hunks)packages/ui/src/form-fields/textarea.tsx
(1 hunks)packages/ui/src/header/header.tsx
(1 hunks)packages/ui/src/icons/priority-icon.tsx
(1 hunks)packages/ui/src/loader.tsx
(1 hunks)packages/ui/src/modals/alert-modal.tsx
(1 hunks)packages/ui/src/modals/modal-core.tsx
(1 hunks)packages/ui/src/oauth/oauth-button.tsx
(1 hunks)packages/ui/src/oauth/oauth-options.tsx
(1 hunks)packages/ui/src/popovers/popover-menu.tsx
(1 hunks)packages/ui/src/popovers/popover.tsx
(1 hunks)packages/ui/src/progress/linear-progress-indicator.tsx
(1 hunks)packages/ui/src/row/row.tsx
(1 hunks)packages/ui/src/scroll-area.tsx
(1 hunks)packages/ui/src/sortable/draggable.tsx
(1 hunks)packages/ui/src/spinners/circular-spinner.tsx
(1 hunks)packages/ui/src/tables/table.tsx
(1 hunks)packages/ui/src/tabs/tab-list.tsx
(1 hunks)packages/ui/src/tabs/tabs.tsx
(1 hunks)packages/ui/src/tag/tag.tsx
(1 hunks)packages/ui/src/toast/index.tsx
(1 hunks)packages/ui/src/tooltip/tooltip.tsx
(1 hunks)packages/ui/src/typography/sub-heading.tsx
(1 hunks)packages/ui/src/utils/index.ts
(1 hunks)
⏰ 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: Analyze (python)
- GitHub Check: Analyze (javascript)
🔇 Additional comments (58)
packages/ui/src/utils/index.ts (1)
1-1
: Use explicit re-export forcn
onlyWe’ve confirmed that
packages/ui/src/utils/classname.tsx
only exportscn
and there are no other named or default exports. Replacing the wildcard export prevents accidental API surface growth and name collisions.Apply this change in
packages/ui/src/utils/index.ts
:-export * from "./classname"; +export { cn } from "./classname";packages/ui/src/scroll-area.tsx (1)
4-4
: LGTM: import path updated to utilsPath
./utils
is correct from this location. No functional changes.packages/ui/src/emoji/emoji-icon-picker-new.tsx (1)
8-8
: Confirmcn
API parity (object/conditional args)This file uses
cn
with conditional object syntax. Ensure the movedcn
fromutils/classname
preserves the prior API (strings, arrays, objects).If needed, confirm
cn
’s signature matches the previous helper (e.g., clsx-like types) to avoid subtle class merging regressions.packages/ui/src/form-fields/textarea.tsx (1)
3-3
: LGTM: standardizedcn
importImport updated to
../utils
; usage covers strings and conditional objects—consistent with expectedcn
behavior.packages/ui/src/modals/modal-core.tsx (1)
6-6
: LGTM: import path refactor onlyNo behavioral change. Path
../utils
is correct fromsrc/modals
.packages/ui/src/tabs/tab-list.tsx (1)
5-5
: LGTM: path update aligns with utils barrelRefactor-only change.
cn
is used with conditional logic; ensurecn
continues to handle object arg shape.packages/ui/src/content-wrapper/content-wrapper.tsx (1)
2-2
: LGTM: import path correctedConsistent with the move to
utils
. No other diffs; behavior unchanged.packages/ui/src/spinners/circular-spinner.tsx (1)
3-3
: LGTM: utils importRefactor-only. Spinner uses
cn
with simple string concat; safe.packages/ui/src/progress/linear-progress-indicator.tsx (1)
3-3
: Stale helpers import detected andcn
export needs confirmation
- packages/ui/src/emoji/logo.tsx (line 6) still imports from
./helpers
. Update it to import from../utils
:- import { emojiCodeToUnicode } from "./helpers"; + import { emojiCodeToUnicode } from "../utils";- Please manually confirm that
cn
is correctly exported frompackages/ui/src/utils/index.ts
so all consumers (likelinear-progress-indicator.tsx
) continue to resolve without errors.packages/ui/src/popovers/popover.tsx (1)
5-5
: Standardized cn import — OKPath "../utils" is correct from src/popovers. Change aligns with the refactor.
packages/ui/src/form-fields/checkbox.tsx (1)
3-3
: LGTM: cn now sourced from utilsRelative path is correct from src/form-fields → src/utils.
packages/ui/src/tooltip/tooltip.tsx (1)
4-4
: LGTM: utils import path correctThe change is consistent with the helpers→utils move.
packages/ui/src/card/card.tsx (1)
2-2
: LGTM: centralized cn importCorrect relative path from src/card → src/utils. No functional impact.
packages/ui/src/breadcrumbs/navigation-search-dropdown.tsx (1)
4-4
: LGTM: cn import normalizedPath "../utils" is correct from src/breadcrumbs. Consistent with PR scope.
packages/ui/src/button/toggle-switch.tsx (1)
4-4
: LGTM: helpers→utils migrationImport path is correct from src/button. Nothing else changed.
packages/ui/src/tabs/tabs.tsx (1)
5-5
: LGTM: cn import path updatedCorrect relative path from src/tabs → src/utils. Matches the repo-wide refactor.
packages/ui/src/auth-form/auth-input.tsx (1)
3-3
: LGTM:cn
import path looks correctRefactor aligns with the utils consolidation. No functional impact.
packages/ui/src/oauth/oauth-options.tsx (1)
2-2
: LGTM: standardizedcn
import pathCorrect relative path; change is consistent with the refactor.
packages/ui/src/icons/priority-icon.tsx (1)
3-3
: LGTM:cn
import updated correctlyConsistent with utils consolidation; no other changes.
packages/ui/src/row/row.tsx (1)
2-2
: LGTM: import path refactor looks correctMatches the new utils location.
packages/ui/src/emoji/lucide-icons-list.tsx (1)
5-5
: LGTM:cn
now sourced from utilsPath is correct from
src/emoji
.packages/ui/src/tag/tag.tsx (1)
2-2
: LGTM: centralizedcn
importCorrect relative path; consistent with other files.
packages/ui/src/form-fields/input-color-picker.tsx (1)
6-6
: LGTM:cn
import updated to utilsRelative path is correct; no other impact.
packages/ui/src/sortable/draggable.tsx (1)
5-5
: LGTM: updatedcn
import pathMatches new utils location from
src/sortable
.packages/ui/src/calendar.tsx (1)
7-7
: Updated import to ./utils is correct.Resolves to src/utils via index.ts; usage of cn unchanged.
packages/ui/src/tables/table.tsx (1)
3-3
: cn import path standardized to ../utils — looks good.Relative path is correct; component logic untouched.
packages/ui/src/badge/badge.tsx (1)
4-4
: LGTM: cn now sourced from ../utils.Correct relative path; no behavior changes.
packages/ui/src/button/button.tsx (1)
4-4
: LGTM: standardized cn import from ../utils.Path is correct; usage unchanged.
packages/ui/src/header/header.tsx (1)
2-2
: LGTM: cn import path corrected to ../utils.Matches new utilities barrel; no further changes required.
packages/ui/src/auth-form/auth-form.tsx (1)
3-3
: LGTM: cn now imported from ../utils.Correct path relative to src/auth-form.
packages/ui/src/drop-indicator.tsx (1)
2-2
: LGTM: import adjusted to ./utils.Barrel import aligns with the refactor.
packages/ui/src/typography/sub-heading.tsx (1)
2-2
: Import path realigned to utils — looks good.
cn
now sourced from the consolidated utils barrel. No functional changes.packages/ui/src/modals/alert-modal.tsx (1)
9-9
: Import path updated to utils — consistent with the refactor.
Helps centralize shared helpers. No behavior change.packages/ui/src/avatar/avatar-group.tsx (1)
5-5
: Switched to utils barrel — approved.
Keepscn
import consistent across UI.packages/ui/src/toast/index.tsx (1)
8-8
: Consolidatedcn
import via utils — approved.
Verified that:
packages/ui/src/utils/index.ts
re-exports./classname
packages/ui/src/utils/classname.tsx
defines and exportscn
- No remaining imports from
helpers
inpackages/ui/src
No further action required.
packages/ui/src/dropdowns/custom-select.tsx (1)
10-10
: Updated to utils — approved.
Keepscn
usage consistent with the new structure.packages/ui/src/dropdown/single-select.tsx (1)
8-8
: Aligned to utils import — approved.
Relative path../utils
is correct from this location.packages/ui/src/emoji/emoji-icon-picker.tsx (1)
10-10
: Movedcn
import to utils — approved.
Matches the helpers→utils consolidation.packages/ui/src/loader.tsx (1)
3-3
: Root-level file now imports from./utils
— approved.
Correct relative path from src root.packages/ui/src/collapsible/collapsible-button.tsx (1)
2-2
: Consolidate remaining helper import into utilsThe sweep uncovered one lingering
helpers
import that also needs to be routed throughutils
.• packages/ui/src/emoji/logo.tsx:6
- import { emojiCodeToUnicode } from "./helpers"; + import { emojiCodeToUnicode } from "../utils";• packages/ui/src/utils/index.ts (add export)
export * from "./classname"; +export { emojiCodeToUnicode } from "../emoji/helpers";
Likely an incorrect or invalid review comment.
packages/ui/src/auth-form/auth-forgot-password.tsx (1)
2-2
: Standardized cn import to ../utilsPath resolution is correct from src/auth-form to src/utils. No other changes.
packages/ui/src/emoji/icons-list.tsx (1)
6-6
: cn import updated to ../utils — correct relative pathFrom src/emoji to src/utils is ../utils. Matches the refactor intent without functional impact.
packages/ui/src/oauth/oauth-button.tsx (1)
2-2
: Consolidated cn import — LGTMRelative path from src/oauth to src/utils is correct. No logic changes.
packages/ui/src/avatar/avatar.tsx (1)
5-5
: Moved cn import to ../utilsPath is correct from src/avatar. This aligns with the utils centralization.
packages/ui/src/popovers/popover-menu.tsx (1)
5-5
: Updated cn import path — correctsrc/popovers to src/utils is ../utils. Change is consistent with the refactor.
packages/ui/src/breadcrumbs/breadcrumbs.tsx (1)
3-3
: cn import via ../utils — OKCorrect relative path; no behavioral differences introduced.
packages/ui/src/form-fields/input.tsx (1)
3-3
: Import path normalized to ../utilsFrom src/form-fields to src/utils is ../utils. All good.
packages/ui/src/breadcrumbs/navigation-dropdown.tsx (1)
5-5
: Fix lingeringhelpers
import inlogo.tsx
We verified that the
cn
migration is correct (utils/index.ts re-exports from classname, and classname.tsx exportscn
), but there’s still one remaininghelpers
import:• packages/ui/src/emoji/logo.tsx:6
- import { emojiCodeToUnicode } from "./helpers"; + // TODO: import from the shared utils barrel (or remove if no longer needed)Please update or remove this import so that no
./helpers
modules remain in the UI package.Likely an incorrect or invalid review comment.
packages/ui/src/dropdown/multi-select.tsx (1)
8-8
: LGTM: standardized cn importCorrect relative path from dropdown → utils. No functional changes.
packages/ui/src/favorite-star.tsx (1)
2-2
: LGTM: cn now sourced from utilsRelative path is correct (file at src → ./utils). Import reordering is benign.
Also applies to: 4-4
packages/ui/src/drag-handle.tsx (1)
2-2
: LGTM: cn import moved to utilsCorrect relative path (src → ./utils). No logic changes.
Also applies to: 4-4
packages/ui/src/dropdowns/custom-menu.tsx (1)
9-9
: LGTM: cn import consolidated under utilsPath is correct (dropdowns → ../utils). No side effects on behavior.
packages/ui/src/dropdowns/context-menu/item.tsx (1)
5-5
: LGTM: cn import path fixedCorrect hop (context-menu → ../../utils). No functional changes.
apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/issues/(list)/mobile-header.tsx (1)
9-9
: LGTM: import tidy-upISSUE_LAYOUTS/CustomMenu removals are safe; neither is used in this file. Updated constants import remains correct.
packages/ui/src/dropdowns/context-menu/root.tsx (1)
5-7
: LGTM: cn import moved; unused hook import removed
- Path is correct (context-menu → ../../utils).
- Removing useOutsideClickDetector is fine; outside-click is handled via a mousedown capture listener below.
packages/ui/src/dropdown/common/input-search.tsx (1)
5-5
: cn import path update: approvedThe move to "../../utils" matches the helpers-to-utils refactor.
packages/ui/src/dropdown/common/options.tsx (2)
5-5
: cn import path update: approvedImporting cn from "../../utils" aligns with the new utils barrel.
8-9
: Import reordering: OKComponent and types import reordering is non-functional and improves consistency.
Let’s directly import |
Description
Type of Change
Summary by CodeRabbit
No user-facing features or visual changes are included in this update.