Skip to content

Conversation

@discreted66
Copy link
Collaborator

@discreted66 discreted66 commented Jul 28, 2025

PR

fix:修复saas模式表格图标引用问题

PR Checklist

Please check if your PR fulfills the following requirements:

  • The commit message follows our Commit Message Guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

What is the current behavior?

Issue Number: N/A

What is the new behavior?

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

Summary by CodeRabbit

  • Style

    • Increased the height of the grid sort button for improved visual consistency.
    • Updated the Cascader input icon font size to align with the default font size variable.
  • New Features

    • Replaced all triangle-down icons with chevron-down icons in Cascader, Pager, and Wizard components for a more modern look.

@coderabbitai
Copy link

coderabbitai bot commented Jul 28, 2025

Walkthrough

This update standardizes icon usage by replacing "triangle-down" icons with "chevron-down" icons in multiple Vue components. It also adjusts CSS: the grid sort button height is increased, and the cascader input icon font size now references a variable for consistency. No logic or control flow is changed.

Changes

Cohort / File(s) Change Summary
Grid Sort Button Height
packages/theme-saas/src/grid/table.less
Increased .tiny-grid-sort__btn height from h-3.5 (14px) to h-4 (16px).
Cascader Input Icon Font Size
packages/theme/src/cascader/vars.less
Changed --tv-Cascader-input-icon-font-size from 10px to var(--tv-font-size-default, 14px).
Cascader Icon Update
packages/vue/src/cascader/src/pc.vue
Replaced downward arrow icon from IconTriangleDown to IconChevronDown in imports and component registration.
Pager Icon Update
packages/vue/src/pager/src/pc.vue
Swapped triangle-down icon for chevron-down in both template and component registration.
Wizard Icon Update
packages/vue/src/wizard/src/pc.vue
Replaced all triangle-down icons with chevron-down in template, import, and component registration.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

In the garden of code where the icons abound,
Triangles retire, and chevrons are found.
A grid grows taller, a font finds its place,
Cascaders and pagers now wear a new face.
With every small tweak, the UI feels neat—
Hop, hop, hooray! These changes are sweet! 🐇✨

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.


📜 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 6b27c30 and aba3a14.

⛔ Files ignored due to path filters (2)
  • packages/theme-saas/src/svgs/triangle-down.svg is excluded by !**/*.svg
  • packages/theme-saas/src/svgs/triangle-up.svg is excluded by !**/*.svg
📒 Files selected for processing (5)
  • packages/theme-saas/src/grid/table.less (1 hunks)
  • packages/theme/src/cascader/vars.less (1 hunks)
  • packages/vue/src/cascader/src/pc.vue (2 hunks)
  • packages/vue/src/pager/src/pc.vue (3 hunks)
  • packages/vue/src/wizard/src/pc.vue (3 hunks)
🧰 Additional context used
🧠 Learnings (3)
packages/theme-saas/src/grid/table.less (1)

Learnt from: zzcr
PR: #2481
File: packages/theme/src/time-range/vars.less:27-28
Timestamp: 2024-11-04T09:35:13.159Z
Learning: 在 packages/theme/src/time-range/vars.less 文件中,应使用 var(--tv-TimeRange-header-height) 作为 --tv-TimeRange-header-line-height 的值,以保持一致性。

packages/theme/src/cascader/vars.less (1)

Learnt from: zzcr
PR: #2481
File: packages/theme/src/time-range/vars.less:27-28
Timestamp: 2024-11-04T09:35:13.159Z
Learning: 在 packages/theme/src/time-range/vars.less 文件中,应使用 var(--tv-TimeRange-header-height) 作为 --tv-TimeRange-header-line-height 的值,以保持一致性。

packages/vue/src/cascader/src/pc.vue (2)

Learnt from: Davont
PR: #2513
File: packages/vue/src/huicharts/huicharts-histogram/src/chart-histogram.vue:33-36
Timestamp: 2024-11-25T03:43:05.285Z
Learning: 在 Tiny Vue 代码库中,使用 chart-core 中的 huiChartOption 的组件,不应在其 data 中定义 huiChartOptionoption,而是应该依赖 chart-core 提供的 huiChartOption

Learnt from: Davont
PR: #2513
File: packages/vue/src/huicharts/huicharts-sunburst/src/chart-sunburst.vue:30-32
Timestamp: 2024-11-25T03:24:05.740Z
Learning: 在位于packages/vue/src/huicharts/huicharts-sunburst/src/chart-sunburst.vue的组件中,当使用chart-core时,应删除错误的option定义,使用chart-core中的huiChartOption

🔇 Additional comments (7)
packages/theme-saas/src/grid/table.less (1)

686-690: Height increased but line-height left unchanged – verify vertical centering

@apply h-4; bumps the button height to 16 px, yet line-height is still hard-coded to 14 px.
On certain fonts this produces a visible vertical mis-align against the icon text-baseline.

-  @apply h-4;
-  line-height: 14px;
+  @apply h-4;
+  line-height: 16px; // keep in-sync with h-4 (16 px) or use a design token

Confirm visually in all density variants (medium/small/mini) and update tokens if those heights are theme-driven.

packages/theme/src/cascader/vars.less (1)

15-18: Variable switched from fixed 10px to font-token – re-check icon sizing

The new value ties the icon to --tv-font-size-default (≈14 px). While this brings consistency, it enlarges the caret by 40 %.
Ensure the cascader input still meets design specs and that adjacent paddings (--tv-Cascader-small/mini-line-height) are not affected.

packages/vue/src/cascader/src/pc.vue (2)

66-71: Dynamic component name must match local registration

'icon-chevron-down' / 'icon-chevron-up' are resolved by name.
You register IconChevronDown / IconChevronUp (PascalCase) – Vue’s resolver usually maps kebab⇄Pascal, but confirm the generated component from IconUpWard() actually exposes the name IconChevronUp. A mismatch will silently render nothing.

If needed:

-import { iconClose, IconChevronDown, IconUpWard, iconYes } from '@opentiny/vue-icon'
+import { iconClose, IconChevronDown, IconChevronUp, iconYes } from '@opentiny/vue-icon'
...
-    IconChevronUp: IconUpWard(),
+    IconChevronUp: IconChevronUp(),

or adjust the :is strings.


203-206: Nice cleanup – triangle→chevron import/registration looks correct
No further issues spotted here.

Also applies to: 264-266

packages/vue/src/wizard/src/pc.vue (1)

73-77: Consistent caret icon – good swap

Replacing the timeline toggle with <tiny-icon-chevron-down> aligns with the new icon set and reads correctly in conjunction with the freshly registered TinyIconChevronDown. No concerns.

packages/vue/src/pager/src/pc.vue (2)

112-120: Icon tag renamed – confirm CSS rotation helper

The previous selector .tiny-svg-size__reverse-180 might still be written against the old .triangle-down SVG.
Verify the new chevron-down graphic’s viewBox is symmetrical, otherwise the 180° rotation could mis-place the glyph.


178-181: Imports & component map updated cleanly
The pager now registers ChevronDown in line with left/right arrows – looks good.

Also applies to: 222-225

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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 generate unit tests to generate unit tests 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.

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.

@github-actions github-actions bot added the bug Something isn't working label Jul 28, 2025
@zzcr zzcr merged commit c5e112a into opentiny:dev Jul 28, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants