Skip to content

fix(grid,dropdown,select, pager,tooltip):fix the saas theme #3347

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

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

discreted66
Copy link
Collaborator

@discreted66 discreted66 commented Apr 24, 2025

PR

修复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
    • Improved vertical spacing and text layout in grid headers and cell ellipsis.
    • Adjusted dropdown item spacing and standardized margin and padding units for consistency.
    • Updated checkbox label spacing for a cleaner appearance.
    • Refined select, option, pager, tag, and tooltip components for more compact sizing, padding, and line height, especially on mobile.
    • Enhanced color and fill styling for the "light-info" tag variant.
    • Removed specific text size classes from select tags for a simplified look.
    • Added explicit CSS classes to timezone picker elements and improved default styling fallbacks for date panel components.

Copy link

coderabbitai bot commented Apr 24, 2025

Walkthrough

This update applies a series of targeted visual adjustments across multiple CSS and Vue component files. The changes include explicit line-height settings, margin and padding refinements, icon and tag sizing tweaks, and updates to color and fill classes for specific UI elements. Several CSS variables are introduced or updated to standardize spacing and styling. Additional CSS classes are added to markup elements for clearer styling association. No changes are made to logic, event handling, or exported/public APIs; all modifications focus on improving the consistency and clarity of the user interface's appearance.

Changes

Files/Group Change Summary
packages/theme-saas/src/grid/header.less Added explicit line-height: 1.375rem; to .grid-prefix-cls-cell-text selector.
packages/theme-saas/src/grid/mixins/table.less Replaced Tailwind's leading-normal with line-height: 1.375rem in .CellEllipsis mixin for non-active columns.
packages/theme/src/checkbox/index.less Removed padding-top: 3px; from checkbox label (&__label).
packages/theme/src/dropdown-item/index.less, packages/theme/src/dropdown-item/vars.less Added vertical margin variable --tv-DropdownItem-margin-y, updated zero values to 0, and cleaned up padding variable syntax.
packages/vue/src/base-select/src/token.ts, packages/vue/src/select/src/token.ts Removed text-sm and sm:text-sm classes for [data-tag=tiny-tag] in the select-tags class string.
packages/vue/src/option/src/mobile-first.vue, packages/vue/src/select/src/mobile-first.vue Reduced horizontal padding (sm:px-3 to sm:px-2), adjusted icon sizes, and updated color classes for multi-select and option items.
packages/vue/src/pager/src/mobile-first.vue Decreased height and width for pager controls (from 8 to 7 units), added text-xs and leading-5 for text elements.
packages/vue/src/tag/src/mobile-first.vue Changed right margin from mr-2 to mr-1 on tag container.
packages/vue/src/tag/src/token.ts Updated background and fill color classes for light-info style.
packages/vue/src/tooltip/src/mobile-first.vue Added leading-5 class to tooltip content wrapper for string content.
packages/theme/src/date-panel/index.less Removed fixed bottom margin from timezone selector; added fallback defaults for padding, hover background, popup box-shadow, and background colors.
packages/vue/src/date-panel/src/mobile-first.vue Added explicit CSS classes to timezone container, list, and list items for clearer styling association.

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant UI_Component
  participant CSS_Styles

  User->>UI_Component: Interacts with UI (e.g., dropdown, select, tag)
  UI_Component->>CSS_Styles: Applies updated classes and variables
  CSS_Styles-->>UI_Component: Renders with new spacing, sizing, and color styles
  UI_Component-->>User: Displays updated visual appearance
Loading

Poem

In the garden of code, where the styles align,
Margins shrink and icons shine.
Tags and tooltips, dressed anew,
With colors bright and spacing true.
A bunny hops with CSS delight—
“Consistent styles, what a sight!”
🐇✨

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

packages/vue/src/option/src/mobile-first.vue

Oops! Something went wrong! :(

ESLint: 8.57.1

ESLint couldn't find the plugin "eslint-plugin-vue".

(The package "eslint-plugin-vue" was not found when loaded as a Node module from the directory "".)

It's likely that the plugin isn't installed correctly. Try reinstalling by running the following:

npm install eslint-plugin-vue@latest --save-dev

The plugin "eslint-plugin-vue" was referenced from the config file in ".eslintrc.js » @antfu/eslint-config » @antfu/eslint-config-vue".

If you still can't figure out the problem, please stop by https://eslint.org/chat/help to chat with the team.

packages/vue/src/base-select/src/token.ts

Oops! Something went wrong! :(

ESLint: 8.57.1

ESLint couldn't find the plugin "eslint-plugin-vue".

(The package "eslint-plugin-vue" was not found when loaded as a Node module from the directory "".)

It's likely that the plugin isn't installed correctly. Try reinstalling by running the following:

npm install eslint-plugin-vue@latest --save-dev

The plugin "eslint-plugin-vue" was referenced from the config file in ".eslintrc.js » @antfu/eslint-config » @antfu/eslint-config-vue".

If you still can't figure out the problem, please stop by https://eslint.org/chat/help to chat with the team.

packages/vue/src/date-panel/src/mobile-first.vue

Oops! Something went wrong! :(

ESLint: 8.57.1

ESLint couldn't find the plugin "eslint-plugin-vue".

(The package "eslint-plugin-vue" was not found when loaded as a Node module from the directory "".)

It's likely that the plugin isn't installed correctly. Try reinstalling by running the following:

npm install eslint-plugin-vue@latest --save-dev

The plugin "eslint-plugin-vue" was referenced from the config file in ".eslintrc.js » @antfu/eslint-config » @antfu/eslint-config-vue".

If you still can't figure out the problem, please stop by https://eslint.org/chat/help to chat with the team.

  • 6 others

📜 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 43e0977 and 0f5ed54.

⛔ Files ignored due to path filters (2)
  • packages/theme/src/svgs/checked-sur.svg is excluded by !**/*.svg
  • packages/theme/src/svgs/halfselect.svg is excluded by !**/*.svg
📒 Files selected for processing (15)
  • packages/theme-saas/src/grid/header.less (1 hunks)
  • packages/theme-saas/src/grid/mixins/table.less (1 hunks)
  • packages/theme/src/checkbox/index.less (0 hunks)
  • packages/theme/src/date-panel/index.less (2 hunks)
  • packages/theme/src/dropdown-item/index.less (2 hunks)
  • packages/theme/src/dropdown-item/vars.less (1 hunks)
  • packages/vue/src/base-select/src/token.ts (1 hunks)
  • packages/vue/src/date-panel/src/mobile-first.vue (3 hunks)
  • packages/vue/src/option/src/mobile-first.vue (3 hunks)
  • packages/vue/src/pager/src/mobile-first.vue (4 hunks)
  • packages/vue/src/select/src/mobile-first.vue (3 hunks)
  • packages/vue/src/select/src/token.ts (1 hunks)
  • packages/vue/src/tag/src/mobile-first.vue (1 hunks)
  • packages/vue/src/tag/src/token.ts (2 hunks)
  • packages/vue/src/tooltip/src/mobile-first.vue (1 hunks)
💤 Files with no reviewable changes (1)
  • packages/theme/src/checkbox/index.less
✅ Files skipped from review due to trivial changes (5)
  • packages/theme-saas/src/grid/header.less
  • packages/theme/src/dropdown-item/index.less
  • packages/theme/src/date-panel/index.less
  • packages/vue/src/option/src/mobile-first.vue
  • packages/vue/src/date-panel/src/mobile-first.vue
🚧 Files skipped from review as they are similar to previous changes (9)
  • packages/vue/src/tag/src/mobile-first.vue
  • packages/theme-saas/src/grid/mixins/table.less
  • packages/vue/src/base-select/src/token.ts
  • packages/vue/src/tooltip/src/mobile-first.vue
  • packages/vue/src/select/src/token.ts
  • packages/vue/src/select/src/mobile-first.vue
  • packages/vue/src/pager/src/mobile-first.vue
  • packages/theme/src/dropdown-item/vars.less
  • packages/vue/src/tag/src/token.ts
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: PR E2E Test (pnpm test:e2e3)
✨ 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 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.

@github-actions github-actions bot added the bug Something isn't working label Apr 24, 2025
Copy link

Walkthrough

此PR修复了saas主题中的多个样式问题,主要涉及到调整行高、内边距和边距等样式属性的修改,以确保一致的视觉效果和布局。

Changes

文件 概要
packages/theme-saas/src/grid/header.less, packages/theme-saas/src/grid/mixins/table.less 修改了行高属性以确保文本显示的一致性。
packages/theme/src/checkbox/index.less 移除了顶部内边距。
packages/theme/src/dropdown-item/index.less, packages/theme/src/dropdown-item/vars.less 调整了下边距和内边距的变量定义。
packages/theme/src/svgs/checked-sur.svg, packages/theme/src/svgs/halfselect.svg SVG文件的微小调整。
packages/vue/src/base-select/src/token.ts, packages/vue/src/select/src/token.ts 修改了选择标签的样式定义。
packages/vue/src/option/src/mobile-first.vue 调整了组件的内边距和尺寸。
packages/vue/src/pager/src/mobile-first.vue 调整了分页组件的高度和文本样式。
packages/vue/src/select/src/mobile-first.vue 修改了选择组件的内边距和图标样式。
packages/vue/src/tag/src/mobile-first.vue, packages/vue/src/tag/src/token.ts 调整了标签组件的边距和颜色样式。
packages/vue/src/tooltip/src/mobile-first.vue 增加了行高样式以改善内容显示。

@@ -45,7 +45,7 @@
v-if="!state.selectMultiple && state.itemSelected && !disabled && !state.groupDisabled"
class="inline-block sm:hidden w-4 ml-4 shrink-0"
>
<icon-finish custom-class="w-4 h-4 fill-color-brand"> </icon-finish
<icon-finish custom-class="w-3.5 h-3.5 fill-color-brand"> </icon-finish

Choose a reason for hiding this comment

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

Ensure that the icon-finish component is correctly rendered with the updated class w-3.5 h-3.5. This change might affect the visual appearance of the icon, so verify it in the UI.

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


Walkthrough

This PR fixes multiple style issues in the saas theme, mainly involving modifying style attributes such as line height, inner margins and margins to ensure consistent visual effects and layout.

Changes

Documents Summary
packages/theme-saas/src/grid/header.less, packages/theme-saas/src/grid/mixins/table.less Modified the line height attribute to ensure consistent text display.
packages/theme/src/checkbox/index.less Removed top margin.
packages/theme/src/dropdown-item/index.less, packages/theme/src/dropdown-item/vars.less Adjusted the variable definitions of the lower margin and inner margins.
packages/theme/src/svgs/checked-sur.svg, packages/theme/src/svgs/halfselect.svg Slight adjustments to SVG files.
packages/vue/src/base-select/src/token.ts, packages/vue/src/select/src/token.ts Modified the style definition of the selected tag.
packages/vue/src/option/src/mobile-first.vue Resize the margins and sizes of the component.
packages/vue/src/pager/src/mobile-first.vue Adjusts the height and text style of the pagination component.
packages/vue/src/select/src/mobile-first.vue Modified the margin and icon style of the selected component.
packages/vue/src/tag/src/mobile-first.vue, packages/vue/src/tag/src/token.ts Adjusted the margins and color styles of the tag component.
packages/vue/src/tooltip/src/mobile-first.vue Added row-high style to improve content display.

@discreted66 discreted66 changed the title fix:Repair the saas theme. fix(grid,dropdown,select, pager,tooltip):fix the saas theme Apr 24, 2025
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