Skip to content

Conversation

@yangxiaolang
Copy link
Collaborator

@yangxiaolang yangxiaolang commented Jul 11, 2025

Summary by CodeRabbit

  • Style

    • Tags now display with rounded corners and visible borders by default.
    • Adjusted tag sizing for mini variants and updated background color for info tags.
  • Documentation

    • Updated documentation and stories to reflect the new default rounded appearance for tags.
  • Chores

    • Added a changeset to track the update and revert a previous tag style modification.

@changeset-bot
Copy link

changeset-bot bot commented Jul 11, 2025

🦋 Changeset detected

Latest commit: c48b25e

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

This PR includes changesets to release 1 package
Name Type
@alauda/ui Minor

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

@coderabbitai
Copy link

coderabbitai bot commented Jul 11, 2025

Walkthrough

The changes revert a previous modification by restoring the default rounded and bordered appearance for tags in the UI library. Updates span component logic, styles, documentation, and stories to reflect the new default of rounded tags with borders, and adjust related visual details such as tag height and background color.

Changes

File(s) Change Summary
.changeset/fair-dots-nail.md Added changeset documenting the revert of tag style changes and a minor version bump.
src/tag/tag.component.ts, stories/tag/basic.component.ts Changed default value of round property from false to true for Tag components.
src/select/multi-select/multi-select.component.html Set [round] and [border] on <aui-tag> to true for selected options.
src/tag/tag.component.scss Increased .aui-tag--mini height, updated .aui-tag--info background color.
stories/tag/basic.stories.ts, stories/tag/tag.mdx Updated documentation and story defaults to reflect round: true as the new default.

Sequence Diagram(s)

sequenceDiagram
    User -> MultiSelectComponent: Selects option(s)
    MultiSelectComponent -> TagComponent: Renders tag with [round]=true, [border]=true
    TagComponent -> Stylesheet: Applies rounded corners and border styles
    TagComponent -> User: Displays rounded, bordered tag
Loading

Possibly related PRs

Poem

🐇
Tags once square now softly round,
With borders neat and corners crowned.
A gentle tweak, a style restored,
The UI’s look is much adored.
Hopping through code, I leave my mark—
Rounded tags light up the dark!

✨ 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.
    • Explain this complex logic.
    • 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 explain this code block.
    • @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 explain its main purpose.
    • @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.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

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 generate sequence diagram to generate a sequence diagram of the changes in 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.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

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

@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 comments (1)
src/tag/tag.component.scss (1)

88-96: Avoid hard-coding height; stick to design tokens

All other size variants use use-var(inline-height-*). Replacing the mini height with a literal 20px breaks token-driven theming and makes future global tweaks harder.

-    height: 20px;
+    // Reuse XS token until a dedicated mini token is introduced
+    height: use-var(inline-height-xs);
🧹 Nitpick comments (1)
src/select/multi-select/multi-select.component.html (1)

41-46: Redundant [round] attribute – default is already true

TagComponent’s default for round was flipped to true, so this explicit binding is no-ops and slightly clutters the template. Keeping [border]="true" is fine because the default for border is still false.

-    [round]="true"
+    <!-- round is already true by default -->
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f255c12 and c48b25e.

📒 Files selected for processing (7)
  • .changeset/fair-dots-nail.md (1 hunks)
  • src/select/multi-select/multi-select.component.html (1 hunks)
  • src/tag/tag.component.scss (2 hunks)
  • src/tag/tag.component.ts (1 hunks)
  • stories/tag/basic.component.ts (1 hunks)
  • stories/tag/basic.stories.ts (1 hunks)
  • stories/tag/tag.mdx (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: Redirect rules - aui
  • GitHub Check: Header rules - aui
  • GitHub Check: Pages changed - aui
🔇 Additional comments (6)
.changeset/fair-dots-nail.md (1)

1-6: LGTM - Changeset properly documents the revert.

The changeset file correctly documents the minor version bump and describes the nature of the change as a tag style revert.

stories/tag/tag.mdx (1)

52-52: LGTM - Documentation correctly reflects the new default.

The documentation update accurately reflects the change in the default value of the round property from false to true.

stories/tag/basic.stories.ts (1)

30-30: LGTM - Story args updated to match component defaults.

The story configuration correctly reflects the new default value of round: true, ensuring the story demonstration aligns with the actual component behavior.

stories/tag/basic.component.ts (1)

100-100: LGTM - Story component default updated for consistency.

The story component's default value for round is now consistent with the main TagComponent, ensuring accurate demonstration of the component's behavior.

src/tag/tag.component.ts (1)

48-48: Ensure consistent round behavior for all <aui-tag> usages

With the default now set to round = true, every <aui-tag> without an explicit round input will render as rounded:

  • Redundant explicit true
    In src/select/multi-select/multi-select.component.html you have:

    <aui-tag
      *ngFor="let option of selectedOptions$ | async; trackBy: trackByValue"
      type="info"
      [round]="true">

    Since round defaults to true, you can remove this binding or keep it for clarity.

  • Unintended rounding in tags-input
    In src/input/tags-input/tags-input.component.html, <aui-tag> is used without any round binding. It will now render as rounded, whereas prior to this revert it was square by default.
    → Verify whether tags-input should remain square. If so, add [round]="false" to those <aui-tag>s.

  • Other template checks
    No occurrences of [round]="false" were found in your HTML templates. Audit any other tag usages (e.g., in stories or custom components) to confirm they behave as intended.

Please update or remove redundant bindings and add explicit round="false" wherever square tags are required.

src/tag/tag.component.scss (1)

134-141: Double-check new n-8 background vs n-7 border contrast

background-color is now darker (n-8) while the border remains n-7, making the border lighter than the fill. Ensure this visual change is intentional and still meets contrast/AA guidelines for the info tag.

If the darker fill wasn’t deliberate, revert or adjust both values to preserve the previous light-on-dark hierarchy.

@yangxiaolang yangxiaolang merged commit 9d0a9f5 into master Jul 14, 2025
7 checks passed
@yangxiaolang yangxiaolang deleted the chore/revert-tag-style-modify branch July 14, 2025 08:01
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