Skip to content
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

feat: global labelPlacement prop #4346

Open
wants to merge 3 commits into
base: canary
Choose a base branch
from
Open

feat: global labelPlacement prop #4346

wants to merge 3 commits into from

Conversation

macci001
Copy link
Contributor

@macci001 macci001 commented Dec 12, 2024

Closes #

📝 Description

Adds the support for the labelPlacement prop in NextUI provider.

🚀 New behavior

  • Following components have been tested:
    • input
    • textarea
    • select
    • auto-complete
    • date-picker
    • date-range-picker
    • time-input

💣 Is this a breaking change (Yes/No): No

Summary by CodeRabbit

Release Notes

  • New Features

    • Introduced a global labelPlacement property for various components, enhancing label positioning flexibility.
    • Added labelPlacement prop to NextUIProvider, allowing specification of label positions.
  • Bug Fixes

    • Improved handling of label placements in input components, ensuring appropriate defaults and warnings.
  • Documentation

    • Updated API references to include new labelPlacement prop details.
  • Chores

    • Updated peer dependency versions across multiple packages to ensure compatibility.

Copy link

linear bot commented Dec 12, 2024

Copy link

changeset-bot bot commented Dec 12, 2024

🦋 Changeset detected

Latest commit: 03e9405

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 28 packages
Name Type
@nextui-org/date-picker Patch
@nextui-org/date-input Patch
@nextui-org/select Patch
@nextui-org/input Patch
@nextui-org/system Patch
@nextui-org/theme Patch
@nextui-org/react Patch
@nextui-org/accordion Patch
@nextui-org/autocomplete Patch
@nextui-org/drawer Patch
@nextui-org/modal Patch
@nextui-org/navbar Patch
@nextui-org/popover Patch
@nextui-org/tabs Patch
@nextui-org/calendar Patch
@nextui-org/checkbox Patch
@nextui-org/dropdown Patch
@nextui-org/form Patch
@nextui-org/input-otp Patch
@nextui-org/listbox Patch
@nextui-org/menu Patch
@nextui-org/radio Patch
@nextui-org/slider Patch
@nextui-org/snippet Patch
@nextui-org/table Patch
@nextui-org/tooltip Patch
@nextui-org/aria-utils Patch
@nextui-org/framer-utils Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

vercel bot commented Dec 12, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
nextui-docs-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 13, 2024 2:25pm
nextui-storybook-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 13, 2024 2:25pm

Copy link
Contributor

coderabbitai bot commented Dec 12, 2024

Walkthrough

This pull request introduces a series of enhancements across various components from the @nextui-org library, focusing on the addition of a global labelPlacement property. This property allows for consistent label positioning across components such as date-picker, date-input, select, input, and others. Additionally, the NextUIProvider component's documentation has been updated to reflect this new property. The changes also include modifications to component logic and type definitions, ensuring that the new label placement functionality is integrated throughout the codebase.

Changes

File Path Change Summary
.changeset/chilly-dancers-switch.md Introduced global labelPlacement property for multiple components.
apps/docs/content/docs/api-references/nextui-provider.mdx Added labelPlacement prop to NextUIProvider, updated documentation.
packages/components/date-input/src/use-date-input.ts Integrated useLabelPlacement hook, updated date boundaries handling.
packages/components/date-input/src/use-time-input.ts Replaced label placement logic with useLabelPlacement hook.
packages/components/date-picker/src/use-date-range-picker.ts Introduced label parameter, updated label placement logic.
packages/components/input/src/use-input.ts Enhanced label placement handling for file inputs, refactored logic.
packages/components/select/src/use-select.ts Streamlined label placement logic using useLabelPlacement hook.
packages/core/system/src/provider-context.ts Added optional labelPlacement property to ProviderContextProps.
packages/core/system/src/provider.tsx Added labelPlacement to NextUIProviderProps and context object.
packages/core/theme/src/components/date-input.ts Removed default variant for labelPlacement from dateInput.
packages/core/theme/src/components/input.ts Removed default value for labelPlacement in input component.
packages/core/theme/src/components/select.ts Changed default labelPlacement from "inside" to "outside" and updated styling options.
packages/storybook/.storybook/preview.tsx Added labelPlacement parameter to Storybook globals for enhanced configuration.
packages/core/system/src/hooks/index.ts Exported new useLabelPlacement hook.
packages/core/system/src/hooks/use-label-placement.ts Introduced useLabelPlacement hook for managing label placement logic.
packages/core/system/src/index.ts Exported useLabelPlacement function from hooks module.
packages/components/date-input/package.json Updated peer dependency versions for @nextui-org/system and @nextui-org/theme.
packages/components/date-picker/package.json Updated peer dependency versions for @nextui-org/system and @nextui-org/theme.
packages/components/input/package.json Updated peer dependency versions for @nextui-org/system and @nextui-org/theme.
packages/components/select/package.json Updated peer dependency versions for @nextui-org/system and @nextui-org/theme.

Possibly related PRs

Suggested labels

📋 Scope : Docs, 👀 Status: In Review

Suggested reviewers

  • wingkwong
  • jrgarciadev

📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between cc685d5 and 03e9405.

📒 Files selected for processing (4)
  • packages/components/date-input/package.json (1 hunks)
  • packages/components/date-picker/package.json (1 hunks)
  • packages/components/input/package.json (1 hunks)
  • packages/components/select/package.json (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (4)
  • packages/components/select/package.json
  • packages/components/date-picker/package.json
  • packages/components/input/package.json
  • packages/components/date-input/package.json

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Experiment)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

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: 1

🧹 Outside diff range and nitpick comments (5)
.changeset/chilly-dancers-switch.md (1)

9-10: Enhance the changeset description

The current description could be more informative. Consider adding:

  • Available values for labelPlacement (inside, outside, outside-left)
  • Impact on affected components
  • Migration notes if any

Also, add a space between "prop" and the ticket reference.

Here's a suggested improvement:

-Adding support for global labelPlacement prop.(ENG-1694)
+Adding support for global labelPlacement prop to customize label positioning across components. 
+
+The labelPlacement prop can be set globally via NextUIProvider with the following values:
+- inside
+- outside
+- outside-left
+
+Affects: Input, Select, DatePicker, DateInput, and related components.
+
+(ENG-1694)
🧰 Tools
🪛 LanguageTool

[uncategorized] ~10-~10: Possible missing comma found.
Context: ...": patch --- Adding support for global labelPlacement prop.(ENG-1694)

(AI_HYDRA_LEO_MISSING_COMMA)

packages/core/system/src/provider-context.ts (1)

14-19: Enhance JSDoc documentation for labelPlacement

While the documentation is present, it would be more helpful to include:

  • Description of each possible value
  • Example usage
  • Default behavior implications

Consider expanding the documentation like this:

  /**
   * Position where the label should appear.
   *
+  * @description
+  * - "inside": Label appears within the input field
+  * - "outside": Label appears above the input field
+  * - "outside-left": Label appears to the left of the input field
+  * 
+  * @example
+  * ```tsx
+  * <NextUIProvider labelPlacement="outside">
+  *   <Input label="Username" />
+  * </NextUIProvider>
+  * ```
   *
   * @default undefined
   */
apps/docs/content/docs/api-references/nextui-provider.mdx (1)

145-150: Enhance the documentation for the labelPlacement prop.

The documentation could be more detailed to help developers understand the impact of each value:

 `labelPlacement`
 
-  - **Description**: Determines the position where label should appear, such as inside, outside or outside-left of the component.
+  - **Description**: Determines the position where label should appear in form components:
+    - `inside`: Places the label inside the input field, floating when focused or filled
+    - `outside`: Places the label above the input field
+    - `outside-left`: Places the label to the left of the input field
+    - `undefined`: Uses the default placement for each component
-  - **Type**: `string` | `undefined`
-  - **Possible Values**: `inside` | `outside` | `outside-left` | `undefined`
+  - **Type**: `"inside" | "outside" | "outside-left" | undefined`
   - **Default**: `undefined`
packages/components/date-input/src/use-time-input.ts (1)

137-145: Optimize the useMemo dependency array.

Consider destructuring the required properties earlier to make the dependencies more explicit and maintainable.

+  const globalLabelPlacement = globalContext?.labelPlacement;
+
   const labelPlacement = useMemo<DateInputVariantProps["labelPlacement"]>(() => {
     const labelPlacement =
-      originalProps.labelPlacement ?? globalContext?.labelPlacement ?? "inside";
+      originalProps.labelPlacement ?? globalLabelPlacement ?? "inside";
 
     if (labelPlacement === "inside" && !label) {
       return "outside";
     }
 
     return labelPlacement;
-  }, [originalProps.labelPlacement, globalContext?.labelPlacement, label]);
+  }, [originalProps.labelPlacement, globalLabelPlacement, label]);
packages/components/date-picker/src/use-date-picker-base.ts (1)

12-12: Consider importing from a shared location.

The useMemo import could be grouped with other React hooks if they're imported from the same location.

-import {useCallback, useMemo} from "react";
+import {useCallback, useMemo, type ReactNode} from "react";
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 77206bc and 5fffcdd.

📒 Files selected for processing (14)
  • .changeset/chilly-dancers-switch.md (1 hunks)
  • apps/docs/content/docs/api-references/nextui-provider.mdx (1 hunks)
  • packages/components/date-input/src/use-date-input.ts (1 hunks)
  • packages/components/date-input/src/use-time-input.ts (1 hunks)
  • packages/components/date-picker/src/use-date-picker-base.ts (2 hunks)
  • packages/components/date-picker/src/use-date-range-picker.ts (4 hunks)
  • packages/components/input/src/use-input.ts (2 hunks)
  • packages/components/select/src/use-select.ts (1 hunks)
  • packages/core/system/src/provider-context.ts (1 hunks)
  • packages/core/system/src/provider.tsx (3 hunks)
  • packages/core/theme/src/components/date-input.ts (0 hunks)
  • packages/core/theme/src/components/input.ts (0 hunks)
  • packages/core/theme/src/components/select.ts (0 hunks)
  • packages/storybook/.storybook/preview.tsx (2 hunks)
💤 Files with no reviewable changes (3)
  • packages/core/theme/src/components/date-input.ts
  • packages/core/theme/src/components/input.ts
  • packages/core/theme/src/components/select.ts
🧰 Additional context used
🪛 LanguageTool
.changeset/chilly-dancers-switch.md

[uncategorized] ~10-~10: Possible missing comma found.
Context: ...": patch --- Adding support for global labelPlacement prop.(ENG-1694)

(AI_HYDRA_LEO_MISSING_COMMA)

🔇 Additional comments (11)
.changeset/chilly-dancers-switch.md (1)

1-8: LGTM: Version bumps are appropriate

The patch version bumps are correctly specified for all affected components, which aligns with the non-breaking nature of the changes.

packages/storybook/.storybook/preview.tsx (2)

10-10: LGTM: Proper integration of labelPlacement in Storybook decorator

The labelPlacement property is correctly destructured from globals and properly passed to the NextUIProvider.

Also applies to: 16-16


130-141: LGTM: Well-structured Storybook toolbar configuration

The labelPlacement toolbar configuration is well-implemented with clear title, description, and appropriate options matching the provider's supported values.

packages/core/system/src/provider.tsx (1)

61-61: LGTM: Clean implementation of labelPlacement in provider

The labelPlacement property is properly:

  • Destructured from props
  • Included in the memoized context
  • Added to the dependency array

Also applies to: 89-89, 98-98

packages/components/date-input/src/use-date-input.ts (1)

195-203: LGTM: Clean implementation of labelPlacement logic

The implementation correctly handles the label placement hierarchy:

  1. Uses prop value if provided
  2. Falls back to global context value
  3. Defaults to "inside"
  4. Automatically switches to "outside" when no label is present
packages/components/input/src/use-input.ts (2)

234-242: LGTM: Proper handling of file input edge case

The code correctly handles the special case for file inputs by defaulting to "outside" placement and providing a clear warning when the global context attempts to use "inside" placement.


253-261: LGTM: Consistent implementation of labelPlacement logic

The implementation aligns with the standard pattern used across components:

  1. Props take precedence
  2. Falls back to global context
  3. Uses "inside" as default
  4. Automatically switches to "outside" when no label is present
packages/components/select/src/use-select.ts (1)

347-355: LGTM: Consistent implementation of labelPlacement logic

The implementation maintains consistency with other components by following the same pattern:

  1. Props take precedence
  2. Falls back to global context
  3. Uses "inside" as default
  4. Automatically switches to "outside" when no label is present
packages/components/date-picker/src/use-date-range-picker.ts (3)

63-63: LGTM: Label parameter addition is well-integrated

The addition of the label parameter to the hook's props is consistent with the PR's objective and maintains backward compatibility.


399-399: LGTM: Proper label prop handling

The label prop is correctly forwarded to the input group and exposed in the hook's return value, following React best practices.

Also applies to: 427-427


148-156: Verify the automatic label placement behavior

The logic forces outside placement when there's no label, even if inside was explicitly specified. This automatic override might:

  1. Cause unexpected behavior for consumers
  2. Lead to layout shifts if the label changes dynamically
  3. Conflict with explicit placement preferences

Consider:

  • Documenting this behavior
  • Making it configurable
  • Respecting the explicit placement preference
✅ Verification successful

The automatic label placement behavior is consistent across components

The behavior of forcing outside placement when there's no label is a deliberate design pattern implemented consistently across multiple form components:

  • Input component (use-input.ts)
  • Select component (use-select.ts)
  • Date/Time inputs (use-date-input.ts, use-time-input.ts)
  • Date pickers (use-date-picker-base.ts, use-date-range-picker.ts)

This consistent implementation suggests it's an intentional UX decision to prevent empty inside labels that could cause layout issues or poor user experience. The behavior is also handled uniformly through the NextUI Provider's global context.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for similar behavior in other components
ast-grep --pattern 'if ($placement === "inside" && !$label) {
  return "outside";
}'

Length of output: 86


Script:

#!/bin/bash
# Search for similar behavior with labelPlacement in other components
rg -A 3 'labelPlacement.*=.*"inside"' --type ts

# Search for any label placement logic
rg -A 3 'labelPlacement' --type ts

# Search for documentation about label placement
fd README.md | xargs rg -i 'label.*placement|placement.*label'

Length of output: 67972

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: 0

🧹 Outside diff range and nitpick comments (1)
packages/core/system/src/hooks/use-label-placement.ts (1)

12-20: Consider adding JSDoc documentation.

The implementation logic is solid with proper fallback handling and edge cases. However, adding JSDoc documentation would help explain the behavior, especially the special case where "inside" placement defaults to "outside" when no label is provided.

+/**
+ * Custom hook to determine label placement based on props and global context.
+ * @param props.labelPlacement - Optional label placement override
+ * @param props.label - Optional label content
+ * @returns The computed label placement, defaulting to "outside" if placement is "inside" with no label
+ */
 export function useLabelPlacement(props: {
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5fffcdd and db5d31c.

📒 Files selected for processing (8)
  • packages/components/date-input/src/use-date-input.ts (2 hunks)
  • packages/components/date-input/src/use-time-input.ts (2 hunks)
  • packages/components/date-picker/src/use-date-picker-base.ts (2 hunks)
  • packages/components/date-picker/src/use-date-range-picker.ts (5 hunks)
  • packages/components/select/src/use-select.ts (2 hunks)
  • packages/core/system/src/hooks/index.ts (1 hunks)
  • packages/core/system/src/hooks/use-label-placement.ts (1 hunks)
  • packages/core/system/src/index.ts (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • packages/core/system/src/hooks/index.ts
🚧 Files skipped from review as they are similar to previous changes (5)
  • packages/components/date-input/src/use-time-input.ts
  • packages/components/date-picker/src/use-date-picker-base.ts
  • packages/components/select/src/use-select.ts
  • packages/components/date-input/src/use-date-input.ts
  • packages/components/date-picker/src/use-date-range-picker.ts
🔇 Additional comments (3)
packages/core/system/src/hooks/use-label-placement.ts (2)

5-8: LGTM! Well-defined props interface.

The props interface is clear and type-safe, using proper TypeScript types for labelPlacement and label.


9-10: Verify error handling for missing provider context.

The hook accesses globalContext without null checks. While the optional chaining on line 10 prevents runtime errors, we should verify this behavior is intentional.

packages/core/system/src/index.ts (1)

36-37: LGTM! Clean export addition.

The useLabelPlacement hook export follows the established pattern and maintains consistency with other exports.

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.

Caution

Inline review comments failed to post. This is likely due to GitHub's limits when posting large numbers of comments.

Actionable comments posted: 2

🧹 Outside diff range and nitpick comments (6)
packages/components/spacer/package.json (1)

39-39: Consider documenting the dependency update rationale

While the Spacer component might not directly use the labelPlacement feature, it requires the updated theme package. Consider documenting this indirect dependency requirement in the changelog.

This update pattern across components suggests a need for a centralized dependency management strategy. Consider using a tool like Renovate or Dependabot to automate version bumps across packages.

packages/components/kbd/package.json (1)

39-39: Version update preserves compatibility

The peer dependency update is appropriate and maintains consistency with other components while preserving backward compatibility through the use of the >= operator.

For package consumers: This update requires a minimum theme version of 2.4.3, but it's recommended to update all NextUI packages together to maintain consistency and avoid potential version conflicts.

packages/components/link/package.json (1)

39-40: Version updates are aligned with the global changes.

The peer dependency updates maintain consistency:

  • @nextui-org/theme: >=2.4.3
  • @nextui-org/system: >=2.4.5

Consider adding a note in the changelog or documentation about the minimum version requirements for the new labelPlacement feature.

packages/components/breadcrumbs/package.json (1)

39-40: Consider selective version updates based on component needs

The current approach updates all component dependencies uniformly. Consider:

  1. Only updating versions for components that actually use the labelPlacement feature
  2. Creating a dependency map to track which components require these updates
  3. Documenting the minimum version requirements in the PR description

This would help maintain looser version constraints where possible and make future updates easier to manage.

packages/components/tooltip/package.json (1)

40-41: LGTM! Consider updating the changelog

The peer dependency updates are consistent with other components. Since this is part of a feature rollout (global labelPlacement), consider documenting these version requirements in the changelog.

packages/components/modal/package.json (1)

37-41: Consider documenting the minimum version requirements

Since these version updates are related to the new global labelPlacement feature, consider:

  1. Adding a note in the migration guide about minimum version requirements
  2. Updating the documentation to reflect these version dependencies
  3. Adding examples of using the new feature with these minimum versions

This will help users understand the version requirements when using the labelPlacement feature.

Also applies to: 46-47, 40-41

🛑 Comments failed to post (2)
plop/component/package.json.hbs (1)

39-41: 💡 Codebase verification

Both theme and system packages should be aligned to their latest versions

The verification reveals that:

  • The system package (2.4.4) is actually ahead of the theme package (2.4.3)
  • The system package has labelPlacement-related files, indicating it's actively involved in this feature
  • The template should use the latest available versions for both packages

Update the peer dependencies in the template to:

  • "@nextui-org/theme": ">=2.4.3"
  • "@nextui-org/system": ">=2.4.4"
🔗 Analysis chain

Verify version alignment between theme and system packages

The theme package is bumped to >=2.4.3 while system remains at >=2.4.0. Since this PR adds global labelPlacement support, please verify if @nextui-org/system should also be bumped to maintain version alignment.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check if system package has related changes or dependencies on theme package

# Search for labelPlacement-related changes in system package
rg -l "labelPlacement" packages/core/system/

# Check package.json files for current versions
fd -g "package.json" packages/core/system/ -x cat {} | jq -r 'select(.name=="@nextui-org/system") | .version'
fd -g "package.json" packages/core/theme/ -x cat {} | jq -r 'select(.name=="@nextui-org/theme") | .version'

Length of output: 415

packages/components/date-picker/package.json (1)

37-38: 💡 Codebase verification

Update required: Dependency version constraint needs adjustment

The specified version @nextui-org/[email protected] is not yet published (latest available is 2.4.4). While other components consistently use >=2.4.5, this version is not yet available on npm. The theme dependency version >=2.4.3 is valid as this version exists.

  • Update @nextui-org/system to use >=2.4.4 instead of >=2.4.5 until the new version is published
  • Keep @nextui-org/theme at >=2.4.3 as it's valid
🔗 Analysis chain

Verify dependency version compatibility

The peer dependency updates look consistent with the global labelPlacement feature implementation. Let's verify the version compatibility.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify if the specified versions exist and are stable

# Check if the required versions are published on npm
echo "Checking @nextui-org/system version..."
npm view @nextui-org/system versions --json | jq 'contains(["2.4.5"])'

echo "Checking @nextui-org/theme version..."
npm view @nextui-org/theme versions --json | jq 'contains(["2.4.3"])'

# Check for any deprecation notices
npm view @nextui-org/system deprecated
npm view @nextui-org/theme deprecated

Length of output: 408


Script:

#!/bin/bash
# Let's check the latest available versions and version ranges
echo "Latest @nextui-org/system versions:"
npm view @nextui-org/system versions --json | jq -r '.[-5:]'

# Check other components' package.json files for version consistency
echo -e "\nChecking other components' dependencies:"
fd package.json --type f --exec grep -l "@nextui-org/system" {} \; | xargs cat | grep "@nextui-org/system"

Length of output: 4000

Copy link
Member

@wingkwong wingkwong left a comment

Choose a reason for hiding this comment

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

why @nextui-org/theme got bumped to >=2.4.3 for some components such as badge, bredcrumbs etc while there is not theme change for those packages?

Also please double check the changeset. seems some packages are missing there.

@macci001
Copy link
Contributor Author

I made the changes to maintain uniformity among the package's peerDependency.
But, I just realised this might bump the version of those packages without having any actual change.
Will revert this

@macci001 macci001 requested a review from wingkwong December 13, 2024 14:23
@wingkwong wingkwong added this to the v2.7.0 milestone Dec 14, 2024
@wingkwong wingkwong changed the title feat: adding the support for labelPlacement globally feat: global labelPlacement prop Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants