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

fix(input): revise styles in color type #5098

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

Conversation

wingkwong
Copy link
Member

@wingkwong wingkwong commented Mar 22, 2025

Closes #5083

📝 Description

With type=color, it shows a rectangle in laptop and circle in mobile. since we have w-full, it becomes an oval in mobile.

⛳️ Current behavior (updates)

image

🚀 New behavior

same as laptop view

image

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

No

📝 Additional Information

Summary by CodeRabbit

  • New Features

    • Enhanced color input styling for a square, modern appearance.
    • Added an attribute to input elements, offering improved styling flexibility.
  • Chores

    • Updated the dependency requirement for the theme package to ensure compatibility with recent visual improvements.

@wingkwong wingkwong added this to the v2.7.6 milestone Mar 22, 2025
@wingkwong wingkwong requested a review from jrgarciadev as a code owner March 22, 2025 17:06
Copy link

linear bot commented Mar 22, 2025

Copy link

changeset-bot bot commented Mar 22, 2025

🦋 Changeset detected

Latest commit: 8274f87

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

This PR includes changesets to release 13 packages
Name Type
@heroui/input Patch
@heroui/theme Patch
@heroui/autocomplete Patch
@heroui/select Patch
@heroui/react Patch
@heroui/checkbox Patch
@heroui/date-input Patch
@heroui/date-picker Patch
@heroui/form Patch
@heroui/input-otp Patch
@heroui/number-input Patch
@heroui/radio Patch
@heroui/table 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 Mar 22, 2025

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

Name Status Preview Comments Updated (UTC)
heroui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 22, 2025 5:07pm
heroui-sb ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 22, 2025 5:07pm

Copy link
Contributor

coderabbitai bot commented Mar 22, 2025

Walkthrough

This pull request introduces a changelog entry that documents a patch for the @heroui/input and @heroui/theme packages to address the iOS color input styling issue (#5083). It updates the peer dependency version for @heroui/theme in the input package, adds a new data-type attribute via the useInput hook for input elements, and appends a new styling class for color inputs in the theme configuration. No public API changes were made.

Changes

File(s) Change Summary
.changeset/light-hairs-complain.md New changelog entry documenting the patch for color input styling fix (#5083).
packages/components/input/package.json Updated peer dependency: "@heroui/theme": ">=2.4.9""@heroui/theme": ">=2.4.12".
packages/components/input/src/use-input.ts
packages/core/theme/src/components/input.ts
Added a new data-type attribute in getInputProps and introduced a corresponding CSS class (data-[type=color]:rounded-none) for color inputs.

Assessment against linked issues

Objective Addressed Explanation
Fix styling issue for color input on iOS (#5083)

Possibly related PRs

Suggested reviewers

  • 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 654518e and 8274f87.

📒 Files selected for processing (4)
  • .changeset/light-hairs-complain.md (1 hunks)
  • packages/components/input/package.json (1 hunks)
  • packages/components/input/src/use-input.ts (1 hunks)
  • packages/core/theme/src/components/input.ts (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: TypeScript
  • GitHub Check: Continuous Release
  • GitHub Check: Build
🔇 Additional comments (4)
.changeset/light-hairs-complain.md (1)

1-7: Changeset looks good

The changeset correctly documents the patch for both packages and references the issue being fixed (#5083).

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

378-378: Good addition of data attribute for type-specific styling

Adding the data-type attribute is a clean approach to enable type-specific styling. This works well with the corresponding CSS selector added in the theme file.

packages/core/theme/src/components/input.ts (1)

48-48: Perfect fix for the color input styling issue

Adding data-[type=color]:rounded-none ensures color inputs maintain a consistent rectangular shape across all devices, resolving the oval appearance on mobile screens.

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

39-39: Correct peer dependency update

Updating the minimum required theme version to >=2.4.12 ensures compatibility with the new styling classes added for color inputs.

✨ Finishing Touches
  • 📝 Generate Docstrings

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
🪧 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.
  • @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.

Sorry, something went wrong.

Copy link

pkg-pr-new bot commented Mar 22, 2025

Open in Stackblitz

@heroui/accordion

npm i https://pkg.pr.new/@heroui/accordion@5098

@heroui/autocomplete

npm i https://pkg.pr.new/@heroui/autocomplete@5098

@heroui/alert

npm i https://pkg.pr.new/@heroui/alert@5098

@heroui/avatar

npm i https://pkg.pr.new/@heroui/avatar@5098

@heroui/badge

npm i https://pkg.pr.new/@heroui/badge@5098

@heroui/breadcrumbs

npm i https://pkg.pr.new/@heroui/breadcrumbs@5098

@heroui/button

npm i https://pkg.pr.new/@heroui/button@5098

@heroui/calendar

npm i https://pkg.pr.new/@heroui/calendar@5098

@heroui/card

npm i https://pkg.pr.new/@heroui/card@5098

@heroui/checkbox

npm i https://pkg.pr.new/@heroui/checkbox@5098

@heroui/chip

npm i https://pkg.pr.new/@heroui/chip@5098

@heroui/code

npm i https://pkg.pr.new/@heroui/code@5098

@heroui/date-input

npm i https://pkg.pr.new/@heroui/date-input@5098

@heroui/date-picker

npm i https://pkg.pr.new/@heroui/date-picker@5098

@heroui/divider

npm i https://pkg.pr.new/@heroui/divider@5098

@heroui/drawer

npm i https://pkg.pr.new/@heroui/drawer@5098

@heroui/dropdown

npm i https://pkg.pr.new/@heroui/dropdown@5098

@heroui/form

npm i https://pkg.pr.new/@heroui/form@5098

@heroui/image

npm i https://pkg.pr.new/@heroui/image@5098

@heroui/input

npm i https://pkg.pr.new/@heroui/input@5098

@heroui/input-otp

npm i https://pkg.pr.new/@heroui/input-otp@5098

@heroui/kbd

npm i https://pkg.pr.new/@heroui/kbd@5098

@heroui/link

npm i https://pkg.pr.new/@heroui/link@5098

@heroui/listbox

npm i https://pkg.pr.new/@heroui/listbox@5098

@heroui/menu

npm i https://pkg.pr.new/@heroui/menu@5098

@heroui/modal

npm i https://pkg.pr.new/@heroui/modal@5098

@heroui/navbar

npm i https://pkg.pr.new/@heroui/navbar@5098

@heroui/number-input

npm i https://pkg.pr.new/@heroui/number-input@5098

@heroui/pagination

npm i https://pkg.pr.new/@heroui/pagination@5098

@heroui/popover

npm i https://pkg.pr.new/@heroui/popover@5098

@heroui/progress

npm i https://pkg.pr.new/@heroui/progress@5098

@heroui/radio

npm i https://pkg.pr.new/@heroui/radio@5098

@heroui/ripple

npm i https://pkg.pr.new/@heroui/ripple@5098

@heroui/scroll-shadow

npm i https://pkg.pr.new/@heroui/scroll-shadow@5098

@heroui/skeleton

npm i https://pkg.pr.new/@heroui/skeleton@5098

@heroui/select

npm i https://pkg.pr.new/@heroui/select@5098

@heroui/slider

npm i https://pkg.pr.new/@heroui/slider@5098

@heroui/snippet

npm i https://pkg.pr.new/@heroui/snippet@5098

@heroui/spacer

npm i https://pkg.pr.new/@heroui/spacer@5098

@heroui/spinner

npm i https://pkg.pr.new/@heroui/spinner@5098

@heroui/switch

npm i https://pkg.pr.new/@heroui/switch@5098

@heroui/table

npm i https://pkg.pr.new/@heroui/table@5098

@heroui/tabs

npm i https://pkg.pr.new/@heroui/tabs@5098

@heroui/toast

npm i https://pkg.pr.new/@heroui/toast@5098

@heroui/tooltip

npm i https://pkg.pr.new/@heroui/tooltip@5098

@heroui/user

npm i https://pkg.pr.new/@heroui/user@5098

@heroui/react

npm i https://pkg.pr.new/@heroui/react@5098

@heroui/system

npm i https://pkg.pr.new/@heroui/system@5098

@heroui/system-rsc

npm i https://pkg.pr.new/@heroui/system-rsc@5098

@heroui/theme

npm i https://pkg.pr.new/@heroui/theme@5098

@heroui/use-aria-accordion

npm i https://pkg.pr.new/@heroui/use-aria-accordion@5098

@heroui/use-aria-accordion-item

npm i https://pkg.pr.new/@heroui/use-aria-accordion-item@5098

@heroui/use-aria-button

npm i https://pkg.pr.new/@heroui/use-aria-button@5098

@heroui/use-aria-link

npm i https://pkg.pr.new/@heroui/use-aria-link@5098

@heroui/use-aria-modal-overlay

npm i https://pkg.pr.new/@heroui/use-aria-modal-overlay@5098

@heroui/use-aria-multiselect

npm i https://pkg.pr.new/@heroui/use-aria-multiselect@5098

@heroui/use-callback-ref

npm i https://pkg.pr.new/@heroui/use-callback-ref@5098

@heroui/use-clipboard

npm i https://pkg.pr.new/@heroui/use-clipboard@5098

@heroui/use-data-scroll-overflow

npm i https://pkg.pr.new/@heroui/use-data-scroll-overflow@5098

@heroui/use-disclosure

npm i https://pkg.pr.new/@heroui/use-disclosure@5098

@heroui/use-draggable

npm i https://pkg.pr.new/@heroui/use-draggable@5098

@heroui/use-infinite-scroll

npm i https://pkg.pr.new/@heroui/use-infinite-scroll@5098

@heroui/use-image

npm i https://pkg.pr.new/@heroui/use-image@5098

@heroui/use-intersection-observer

npm i https://pkg.pr.new/@heroui/use-intersection-observer@5098

@heroui/use-is-mobile

npm i https://pkg.pr.new/@heroui/use-is-mobile@5098

@heroui/use-is-mounted

npm i https://pkg.pr.new/@heroui/use-is-mounted@5098

@heroui/use-measure

npm i https://pkg.pr.new/@heroui/use-measure@5098

@heroui/use-pagination

npm i https://pkg.pr.new/@heroui/use-pagination@5098

@heroui/use-real-shape

npm i https://pkg.pr.new/@heroui/use-real-shape@5098

@heroui/use-ref-state

npm i https://pkg.pr.new/@heroui/use-ref-state@5098

@heroui/use-resize

npm i https://pkg.pr.new/@heroui/use-resize@5098

@heroui/use-safe-layout-effect

npm i https://pkg.pr.new/@heroui/use-safe-layout-effect@5098

@heroui/use-scroll-position

npm i https://pkg.pr.new/@heroui/use-scroll-position@5098

@heroui/use-ssr

npm i https://pkg.pr.new/@heroui/use-ssr@5098

@heroui/use-theme

npm i https://pkg.pr.new/@heroui/use-theme@5098

@heroui/use-update-effect

npm i https://pkg.pr.new/@heroui/use-update-effect@5098

@heroui/aria-utils

npm i https://pkg.pr.new/@heroui/aria-utils@5098

@heroui/dom-animation

npm i https://pkg.pr.new/@heroui/dom-animation@5098

@heroui/framer-utils

npm i https://pkg.pr.new/@heroui/framer-utils@5098

@heroui/react-rsc-utils

npm i https://pkg.pr.new/@heroui/react-rsc-utils@5098

@heroui/react-utils

npm i https://pkg.pr.new/@heroui/react-utils@5098

@heroui/shared-icons

npm i https://pkg.pr.new/@heroui/shared-icons@5098

@heroui/shared-utils

npm i https://pkg.pr.new/@heroui/shared-utils@5098

@heroui/stories-utils

npm i https://pkg.pr.new/@heroui/stories-utils@5098

@heroui/test-utils

npm i https://pkg.pr.new/@heroui/test-utils@5098

commit: 8274f87

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.

[BUG] - Input Color picker (type: color) iOS visual bug
2 participants