-
Notifications
You must be signed in to change notification settings - Fork 281
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
refactor(theme): [qr-code,text-popup,watemark,rate] refactor some com… #2219
Conversation
…ponents theme vars
Warning Rate limit exceeded@zzcr has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 9 minutes and 5 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. WalkthroughThe pull request introduces significant changes across multiple components, primarily focusing on updating CSS variable naming conventions from Changes
Possibly related PRs
Suggested labels
Poem
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? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 8
🧹 Outside diff range and nitpick comments (13)
packages/theme/src/skeleton/vars.less (1)
2-2
: Use English comments for better maintainabilityThe comment "头像占位尺寸" is in Chinese. To improve code maintainability and accessibility for a potentially diverse team, consider using English comments throughout the codebase.
Replace the Chinese comment with an English equivalent:
- // 头像占位尺寸 + // Avatar placeholder sizepackages/theme/src/rate/vars.less (1)
15-21
: Approve CSS variable updates and suggest documentation update.The CSS variable changes improve consistency and maintainability:
- The prefix change from
--ti-rate-
to--tv-Rate-
follows a more consistent naming convention.- Using base variables (e.g.,
--tv-space-lg
) for values enhances theme consistency and simplifies future updates.These changes align well with the PR's refactoring objectives.
Consider updating any relevant documentation or style guides to reflect these new variable names and the use of base variables. This will help maintain consistency across the project and assist other developers in using these variables correctly.
packages/theme/src/espace/index.less (1)
Line range hint
1-40
: Summary: Consistent refactoring with potential for breaking changesThe changes in this file successfully refactor the theme variables for the Espace component, improving naming consistency and specificity. However, these changes have the potential to introduce breaking changes if not properly implemented across the entire project.
To ensure a smooth transition:
- Verify that all new variables are correctly defined in the appropriate files.
- Update all usages of the old variables throughout the project.
- Ensure that the new method for injecting CSS variables (
.inject-Espace-vars()
) is correctly implemented in the corresponding JavaScript/TypeScript files.- Conduct thorough testing to catch any styling issues that may arise from these changes.
Consider adding a migration guide or deprecation warnings for any public APIs that may be affected by these changes to assist users in updating their code.
packages/theme/src/text-popup/vars.less (1)
13-27
: Summary of TextPopup theme variable changesThe changes in this file improve naming consistency and readability for the TextPopup component's theme variables. However, there are a few points to address:
- Ensure that all references to the old function name
.component-css-vars-text-popup()
have been updated to.inject-TextPopup-vars()
across the codebase.- Verify that all usages of the old CSS variable names (with
--ti-
prefix) have been updated to the new naming convention (with--tv-
prefix).- Clarify how padding will be handled for the TextPopup component after the removal of padding-related variables.
These changes introduce breaking changes, so it's crucial to update all affected components and thoroughly test the TextPopup component to ensure its layout and appearance remain correct.
Consider adding a migration guide or update script to help other developers adapt to these changes in their implementations.
packages/theme/src/skeleton-item/vars.less (2)
3-31
: Approve CSS variable prefix changes and suggest documentation update.The consistent change from
--ti-
to--tv-
prefix for all CSS variables improves standardization. This change likely affects the entire project and should be documented.Consider updating the project's documentation to reflect this new naming convention and explain the meaning of the
--tv-
prefix.
31-31
: Clarify the purpose of the "(hide)" comment.The linear gradient variable has been correctly renamed to follow the new convention. However, the "(hide)" comment in the Chinese description is unclear and might lead to confusion.
Consider removing the "(hide)" comment or providing a clearer explanation of its purpose. If this variable is meant to be internal or not directly used, consider using a naming convention to indicate this, such as prefixing with an underscore:
- // 渐变颜色设置(hide) - --tv-SkeletonItem-linear-gradient: linear-gradient(to right, #fafafa, #ebebeb, #fafafa); + // 内部使用的渐变颜色设置 + --tv-SkeletonItem-_linear-gradient: linear-gradient(to right, #fafafa, #ebebeb, #fafafa);packages/theme/src/text-popup/index.less (1)
Line range hint
1-52
: Summary of changes and their impactThe changes in this file align with the PR objectives of refactoring theme variables for the text-popup component. The main modifications include:
- Updating the CSS variable injection method to follow a more consistent naming convention.
- Changing the padding for the
.area
class from CSS variables to fixed values.While these changes improve code consistency, the second change might limit customization options. Overall, no breaking changes were introduced in terms of functionality, but the reduced flexibility in padding customization should be reconsidered.
To maintain a balance between standardization and flexibility, consider:
- Keeping critical style properties configurable through CSS variables.
- Documenting any intentional limitations on customization in the component's documentation.
- Ensuring that these refactoring patterns are consistently applied across all components in the theme package.
packages/theme/src/qr-code/index.less (2)
Line range hint
20-24
: LGTM! Consider using LESS variables for improved maintainability.The addition of the
.border
class is a good improvement, providing more styling options for the QR code container. The implementation is consistent with the existing styles.For better maintainability, consider using LESS variables for the border color and border-radius. This would allow for easier theme customization:
&.border { - border: 1px solid rgb(5 5 5 / 6%); - border-radius: 8px; + border: 1px solid @qr-code-border-color; + border-radius: @qr-code-border-radius; }Then, define these variables at the top of the file or in a separate variables file:
@qr-code-border-color: rgb(5 5 5 / 6%); @qr-code-border-radius: 8px;This approach would make it easier to maintain consistent styling across the component and allow for easier theme customization.
Issue Found: Import statement for
vars.less
not removedThe mixin call
.component-css-vars-qr-code();
has been successfully removed, aligning with the PR objectives. However, the import statement@import '../vars.less';
was not removed as expected. Please ensure that all theme variable refactoring changes are applied consistently.
packages/theme/src/qr-code/index.less
🔗 Analysis chain
Line range hint
1-67
: Clarification needed: Discrepancy between PR objectives and actual changesThe PR objectives mention refactoring theme variables for the QR code component, but the changes in this file don't directly address this. Additionally, the AI summary mentions the removal of an import statement for
vars.less
and a mixin call.component-css-vars-qr-code()
, which are not visible in the provided code.Could you please clarify:
- How do these changes align with the PR objective of refactoring theme variables?
- Were there any removed lines (e.g., import statements or mixin calls) that are not shown in this diff?
To verify the removed lines, we can run the following script:
This will help us understand the full extent of the changes and ensure they align with the PR objectives.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Check for removed import statements and mixin calls in the QR code LESS file # Test 1: Check for removed import statement echo "Checking for removed import statement:" rg --type less "import.*vars\.less" packages/theme/src/qr-code/index.less # Test 2: Check for removed mixin call echo "Checking for removed mixin call:" rg --type less "\.component-css-vars-qr-code\(\)" packages/theme/src/qr-code/index.less # If both grep commands return no results, it confirms the removal of these linesLength of output: 327
Script:
#!/bin/bash # Description: Verify the removal of specific lines using git diff # Fetch the previous version of the file from the base branch git fetch origin main # Check for removal of the import statement echo "Verifying removal of import statement for 'vars.less':" git diff origin/main -- packages/theme/src/qr-code/index.less | grep -E "^-\s*@import\s+['\"]\.\./vars\.less['\"];" # Check for removal of the mixin call echo "Verifying removal of mixin call '.component-css-vars-qr-code()':" git diff origin/main -- packages/theme/src/qr-code/index.less | grep -E "^-\s*\.component-css-vars-qr-code\(\);"Length of output: 688
Script:
#!/bin/bash # Description: Determine the default branch and verify the removal of specific lines using git diff # Fetch all remote branches git fetch --all # Determine the default branch DEFAULT_BRANCH=$(git remote show origin | grep 'HEAD branch' | awk '{print $NF}') echo "Default branch detected: $DEFAULT_BRANCH" if [ -z "$DEFAULT_BRANCH" ]; then echo "Unable to determine the default branch." exit 1 fi # Check for removal of the import statement echo "Verifying removal of import statement for 'vars.less':" git diff origin/$DEFAULT_BRANCH -- packages/theme/src/qr-code/index.less | grep -E "^-\s*@import\s+['\"]\.\./vars\.less['\"];" # Check for removal of the mixin call echo "Verifying removal of mixin call '.component-css-vars-qr-code()':" git diff origin/$DEFAULT_BRANCH -- packages/theme/src/qr-code/index.less | grep -E "^-\s*\.component-css-vars-qr-code\(\);"Length of output: 730
packages/theme/src/dept/index.less (1)
Line range hint
1-79
: Summary: Consistent refactoring of theme variables with potential risks.The changes in this file consistently refactor theme variables by changing the prefix from
--ti-
to--tv-
and including the component name 'Dept' in the variable names. This aligns well with the PR objectives and should improve specificity and maintainability.However, there are potential risks to consider:
- These changes might introduce breaking changes if the old variable names are used elsewhere in the codebase.
- The
.inject-Dept-vars()
mixin replacement might affect other parts of the codebase that rely on the old mixin.To mitigate these risks:
- Ensure all occurrences of the old variable names and mixin are updated throughout the entire codebase.
- Thoroughly test the components that use these variables to verify that the styling is applied correctly.
- Update any documentation or style guides to reflect the new naming convention.
Consider creating a migration guide or script to help other developers update their code to use the new variable names and mixin.
packages/theme/src/bulletin-board/vars.less (1)
13-55
: Function name and variable prefix changes look good, but consider improving comment accessibility.The refactoring of the function name from
.component-css-vars-bulletin-board()
to.inject-BulletinBoard-vars()
and the consistent update of CSS variable prefixes fromti-
totv-
appear to be part of a larger standardization effort. These changes improve consistency and clarity in the codebase.The new CSS variables are well-organized and cover all necessary aspects of the bulletin board component's styling. However, to improve accessibility for non-Chinese speaking developers, consider adding English translations alongside the Chinese comments.
Consider updating the comments to include both Chinese and English translations, for example:
// 标题字号 (Title font size) --tv-BulletinBoard-title-font-size: var(--tv-font-size-heading-sm);This change would make the code more accessible to a wider range of developers while still maintaining the original Chinese comments.
packages/theme/src/base/vars.less (1)
379-379
: LGTM! Consider reordering for consistency.The addition of
--tv-border-radius-xs: 2px;
is a good improvement to the design system, allowing for more fine-grained control over border radii. The naming and value are consistent with the existing pattern.For better readability and consistency, consider reordering the border radius variables from smallest to largest:
- --tv-border-radius-xs: 2px; --tv-border-radius-sm: 4px; --tv-border-radius-md: 6px; --tv-border-radius-lg: 8px; --tv-border-radius-round: 999px; + --tv-border-radius-xs: 2px; + --tv-border-radius-sm: 4px; + --tv-border-radius-md: 6px; + --tv-border-radius-lg: 8px; + --tv-border-radius-round: 999px;packages/theme/src/bulletin-board/index.less (1)
Line range hint
191-192
: Replace hardcoded color values with CSS variables for theme consistencyIn the
.icon-close:hover
style:
- Line 191:
background-color: #b4bccc;
- Line 192:
color: #fff;
Replacing these hardcoded colors with CSS variables will ensure consistency with the theme and make future color adjustments more manageable.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (21)
- packages/theme/src/base/vars.less (1 hunks)
- packages/theme/src/bulletin-board/index.less (7 hunks)
- packages/theme/src/bulletin-board/vars.less (1 hunks)
- packages/theme/src/dept/index.less (3 hunks)
- packages/theme/src/dept/vars.less (1 hunks)
- packages/theme/src/drop-roles/vars.less (0 hunks)
- packages/theme/src/espace/index.less (2 hunks)
- packages/theme/src/espace/vars.less (1 hunks)
- packages/theme/src/fullscreen/vars.less (0 hunks)
- packages/theme/src/qr-code/index.less (1 hunks)
- packages/theme/src/qr-code/vars.less (0 hunks)
- packages/theme/src/rate/index.less (3 hunks)
- packages/theme/src/rate/vars.less (1 hunks)
- packages/theme/src/skeleton-item/index.less (2 hunks)
- packages/theme/src/skeleton-item/vars.less (1 hunks)
- packages/theme/src/skeleton/index.less (2 hunks)
- packages/theme/src/skeleton/vars.less (1 hunks)
- packages/theme/src/text-popup/index.less (2 hunks)
- packages/theme/src/text-popup/vars.less (1 hunks)
- packages/theme/src/watermark/index.less (0 hunks)
- packages/theme/src/watermark/vars.less (0 hunks)
💤 Files with no reviewable changes (5)
- packages/theme/src/drop-roles/vars.less
- packages/theme/src/fullscreen/vars.less
- packages/theme/src/qr-code/vars.less
- packages/theme/src/watermark/index.less
- packages/theme/src/watermark/vars.less
🔇 Additional comments (40)
packages/theme/src/skeleton/vars.less (3)
1-1
: Verify impact of mixin name changeThe mixin name has changed from
.component-css-vars-skeleton()
to.inject-Skeleton-vars()
. While this new name is more descriptive and consistent, it may impact other files that import and use this mixin.To ensure this change doesn't break existing imports, please run the following script:
#!/bin/bash # Search for usage of the old mixin name rg --type less '.component-css-vars-skeleton'If the script returns any results, those occurrences need to be updated to use the new mixin name
.inject-Skeleton-vars()
.
1-3
: Verify consistency of CSS variable prefix changeThe CSS variable prefix has changed from
--ti-
to--tv-
. This change should be part of a consistent refactoring effort across the entire codebase.To ensure this change is consistent with other components, please run the following script:
Review the results to ensure that the prefix change is applied consistently across all components. If there are mixed usages of
--ti-
and--tv-
prefixes, consider creating a separate issue to track and complete the refactoring process.
1-3
:⚠️ Potential issueSignificant reduction in Skeleton theme variables
The refactoring has removed several CSS variables that were previously defined for the Skeleton component, leaving only the avatar size variable. This change might impact the flexibility and customization options for the Skeleton component.
Please consider the following:
- Confirm that the removed variables (background color, margins, title dimensions, row spacing) are no longer needed for the Skeleton component.
- If these variables are still required, consider keeping them or providing alternative ways to customize these aspects of the Skeleton component.
- Update the component's documentation to reflect these changes in customization options.
To ensure this change doesn't negatively impact existing usage, please run the following script:
If the script returns any results, those occurrences need to be updated or removed.
✅ Verification successful
No usages of removed Skeleton CSS variables found
All removed Skeleton CSS variables are not used in the codebase, verification successful.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Search for usage of removed Skeleton CSS variables rg --type less --type css --type vue --type tsx '(--ti-skeleton-bg-color|--ti-skeleton-margin-right|--ti-skeleton-margin-bottom|--ti-skeleton-title-width|--ti-skeleton-title-height|--ti-skeleton-row-height|--ti-skeleton-row-margin-top)'Length of output: 266
Script:
#!/bin/bash # Search for usage of removed Skeleton CSS variables, including .vue files rg --type less --type css --type tsx --glob "*.vue" '(--ti-skeleton-bg-color|--ti-skeleton-margin-right|--ti-skeleton-margin-bottom|--ti-skeleton-title-width|--ti-skeleton-title-height|--ti-skeleton-row-height|--ti-skeleton-row-margin-top)'Length of output: 270
Script:
#!/bin/bash # Search for usage of removed Skeleton CSS variables, including .vue and .tsx files rg --type less --type css --glob "*.vue" --glob "*.tsx" '(--ti-skeleton-bg-color|--ti-skeleton-margin-right|--ti-skeleton-margin-bottom|--ti-skeleton-title-width|--ti-skeleton-title-height|--ti-skeleton-row-height|--ti-skeleton-row-margin-top)'Length of output: 246
Script:
#!/bin/bash # Search for usage of removed Skeleton CSS variables in .less, .css, .vue, and .tsx files rg --glob "*.less" --glob "*.css" --glob "*.vue" --glob "*.tsx" '(--ti-skeleton-bg-color|--ti-skeleton-margin-right|--ti-skeleton-margin-bottom|--ti-skeleton-title-width|--ti-skeleton-title-height|--ti-skeleton-row-height|--ti-skeleton-row-margin-top)'Length of output: 254
packages/theme/src/espace/vars.less (4)
14-16
: Variable updates improve consistency, but clarify design implications.The variable updates look good and seem to improve consistency with a new naming scheme:
- Prefix change from
ti
totv
.- PascalCase for component name ('Espace').
- More specific color variable names ('icon-color' instead of 'text-color').
- Use of centralized color variables (
--tv-color-icon
and--tv-color-icon-hover
).However, please clarify:
- Does the change from 'text-color' to 'icon-color' reflect a change in the component's design or usage?
- Are there any implications for accessibility or theming that should be documented?
13-16
: Verify updates in dependent components and styles.The changes to variable names and values may impact other components or styles that reference them. To ensure a smooth transition:
- Update all references to the old variable names (
--ti-espace-*
) in other components and stylesheets.- Review the visual appearance of components using these variables, especially given the change from
text-color
toicon-color
.- Update any documentation or comments referencing these variables.
Run the following script to identify potential areas that need updating:
#!/bin/bash # Description: Find potential references to old variable names # Test: Search for references to old variable names # Expect: No results if all references have been updated rg --type less '--ti-espace-' # Test: Search for components that might be using Espace styles # Expect: A list of files that might need review rg --type less 'espace'
13-13
: Function renaming looks good, but verify its usage.The function renaming from
.component-css-vars-espace()
to.inject-Espace-vars()
improves clarity about the function's purpose. The new name follows a different naming convention, which seems to be part of a larger refactoring effort.Please run the following script to verify that all references to this function have been updated:
#!/bin/bash # Description: Check for any remaining references to the old function name # Test: Search for the old function name. Expect: No results. rg --type less '.component-css-vars-espace' # Test: Search for the new function name. Expect: At least one result (this file). rg --type less '.inject-Espace-vars'
13-16
: Ensure naming convention consistency across components.The new naming convention (PascalCase for component name, 'tv' prefix, more specific variable names) appears to be part of a larger refactoring effort. To maintain consistency:
- Verify that this naming convention is applied uniformly across all components.
- Update any documentation or style guides to reflect these new conventions.
Run the following script to check for consistency in other component files:
packages/theme/src/skeleton/index.less (2)
20-22
: Approve avatar styling changes and suggest consistency check.The updates to the avatar size variables and the introduction of a fixed margin improve the consistency of the skeleton component styling. These changes align with the PR's refactoring objectives.
To ensure consistency across components, please verify that similar variable naming conventions have been applied to other components. Run the following script to check for variable naming patterns:
7-7
: Approve mixin renaming and suggest verification.The change from
.component-css-vars-skeleton()
to.inject-Skeleton-vars()
aligns with the PR's refactoring objectives and improves naming specificity. This change enhances code readability and maintainability.To ensure consistency across the codebase, please verify that this mixin renaming has been applied uniformly. Run the following script to check for any remaining usage of the old mixin name:
✅ Verification successful
Mixin renaming verified successfully.
The old mixin
.component-css-vars-skeleton()
has been removed, and the new mixin.inject-Skeleton-vars()
is correctly defined and used in the codebase.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Check for any remaining usage of the old mixin name # Test: Search for the old mixin name. Expect: No results. rg --type less $'.component-css-vars-skeleton\(' # Test: Search for the new mixin name. Expect: At least one result (this file). rg --type less $'.inject-Skeleton-vars\('Length of output: 987
Script:
#!/bin/bash # Description: Check for any remaining usage of the old mixin name # Test: Search for the old mixin name. Expect: No results. rg --type less '\.component-css-vars-skeleton\(' # Test: Search for the new mixin name. Expect: At least one result (this file). rg --type less '\.inject-Skeleton-vars\('Length of output: 224
packages/theme/src/rate/vars.less (1)
13-13
: Approve function renaming and verify usage.The function renaming from
.component-css-vars-rate()
to.inject-Rate-vars()
improves clarity and follows a more specific naming convention. This change enhances code readability and maintainability.To ensure this change doesn't break existing code, please verify all occurrences of this function name across the codebase. Run the following script to check for any remaining usage of the old function name:
If the old function name is found, update those occurrences to use the new name.
✅ Verification successful
Function renaming verified and no residual references found.
All occurrences of
.component-css-vars-rate
have been successfully updated to.inject-Rate-vars
. The renaming enhances code clarity without introducing any issues.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Search for any remaining usage of the old function name # Test: Search for the old function name. Expect: No results. rg --type less -g '!packages/theme/src/rate/vars.less' $'.component-css-vars-rate' # Test: Search for the new function name. Expect: At least one result (the import/usage). rg --type less $'.inject-Rate-vars'Length of output: 230
packages/theme/src/dept/vars.less (1)
13-19
: LGTM! New function looks good.The new
.inject-Dept-vars()
function is well-structured and follows a consistent naming convention. The use of existing theme variables for values promotes consistency across the theme.Verify the impact of the naming convention change.
The change from
ti-
totv-
prefix for variables might affect other parts of the codebase that rely on these variables. Please ensure that all references to these variables have been updated accordingly.Run the following script to check for any remaining references to the old variable names:
Verify the removal of the old function.
The AI summary mentions that the old function
.component-css-vars-dept()
has been removed. Please ensure that there are no remaining references to this function in the codebase.Run the following script to check for any remaining references to the old function:
packages/theme/src/espace/index.less (3)
29-30
: LGTM! Verify variable definitions and usages.The changes to
--tv-Espace-icon-color
and--tv-Espace-font-size
improve specificity and follow a consistent naming convention.Please ensure that these new variables are properly defined and that all usages of the old variables have been updated. Run the following script to verify:
#!/bin/bash # Description: Search for old and new variable names in the project echo "Searching for old variable names:" rg --type less '--ti-espace-text-color' rg --type less '--ti-espace-font-size' echo "Searching for new variable names:" rg --type less '--tv-Espace-icon-color' rg --type less '--tv-Espace-font-size'
35-35
: LGTM! Verify hover state variable definition and usages.The change to
--tv-Espace-icon-color-hover
is consistent with the new naming convention and improves specificity.Please ensure that this new variable is properly defined and that all usages of the old variable have been updated. Run the following script to verify:
#!/bin/bash # Description: Search for old and new hover state variable names in the project echo "Searching for old hover state variable name:" rg --type less '--ti-espace-hover-text-color' echo "Searching for new hover state variable name:" rg --type less '--tv-Espace-icon-color-hover'
20-20
: LGTM! Verify the corresponding JS/TS file.The change from
.component-css-vars-espace()
to.inject-Espace-vars()
aligns with the refactoring objective and follows a more consistent naming convention.Please ensure that the corresponding JavaScript/TypeScript file has been updated to use the new method name. Run the following script to verify:
packages/theme/src/text-popup/vars.less (3)
15-27
: CSS variable naming convention improved, but consider the impact.The update of CSS variable names from
--ti-
to--tv-
prefix and the change to PascalCase for the component name (e.g.,--tv-TextPopup-border-radius
) improves consistency and readability.However, this is a breaking change that might affect other components or stylesheets using these variables. Please ensure that all usages of these variables have been updated accordingly. Run the following script to check for any remaining occurrences of the old variable names:
#!/bin/bash # Description: Check for any remaining occurrences of the old CSS variable names # Test: Search for the old variable names. Expect: No results. rg --type less "--ti-text-popup-" # Test: Search for the new variable names. Expect: Results matching the changes we've reviewed. rg --type less "--tv-TextPopup-"
13-27
: Clarify handling of padding after variable removal.I noticed that several padding-related variables have been removed in this update. Could you please clarify how padding for the TextPopup component will be handled after this change? This removal might affect the component's layout and appearance.
To ensure that padding is still properly addressed, please run the following script to check for any new padding-related variables or inline styles:
#!/bin/bash # Description: Check for new padding handling in TextPopup component # Test: Search for new padding variables or inline styles in TextPopup-related files rg --type less --type vue --type js "padding.*TextPopup" "packages/theme/src" "packages/tiny-vue/src"
13-13
: Function name change looks good, but verify its usage.The new function name
.inject-TextPopup-vars()
is more descriptive and follows a consistent naming convention. This is a good improvement.However, we should ensure that all references to this function in other files have been updated. Please run the following script to check for any remaining occurrences of the old function name:
packages/theme/src/skeleton-item/vars.less (2)
3-31
: Approve value changes and suggest review of referenced variables.The changes to variable values, including the use of other
--tv-
prefixed variables, promote consistency and easier theme management. This is a positive change for maintainability.Please ensure that all referenced
--tv-
variables (e.g.,--tv-color-bg
,--tv-border-radius-sm
) are properly defined and accessible in the context where these variables will be used.Run the following script to check for the definitions of these variables:
#!/bin/bash # Search for definitions of referenced --tv- variables rg --type less "(--(tv-color-bg|tv-border-radius-sm|tv-color-bg|tv-size-height-sm|tv-border-radius-round)):\s*[^;]+"
1-1
: Approve function name change, but verify impact.The function name change from
.component-css-vars-skeleton-item()
to.inject-SkeletonItem-vars()
improves consistency and clarity. However, this change might affect how the function is used throughout the codebase.Please run the following script to check for any remaining references to the old function name:
packages/theme/src/text-popup/index.less (1)
19-19
: Approve the updated CSS variable injection method.The change from
.component-css-vars-text-popup()
to.inject-TextPopup-vars()
aligns with a more consistent naming convention for theme variable injection. This refactoring improves code readability and maintainability.To ensure this change doesn't break any existing functionality, please run the following script to check for any remaining usage of the old method name:
packages/theme/src/rate/index.less (6)
32-32
: Approve removal of unnecessary unit for zero value.The change from
font-size: 0px;
tofont-size: 0;
is a good practice in CSS. It removes the unnecessary 'px' unit for a zero value, which doesn't affect the rendered output but improves code cleanliness.
51-51
: Approve consistent removal of unnecessary unit.The change from
top: 0px;
totop: 0;
is consistent with the earlier modification to the font-size property. It follows good CSS practices by removing the unnecessary 'px' unit for a zero value.
Line range hint
1-69
: Overall feedback on the rate component refactoring.The changes in this file consistently refactor theme variables for the rate component, aligning well with the PR objectives. The modifications improve code organization, naming consistency, and follow good CSS practices. Key points:
- Mixin renaming improves clarity and maintainability.
- Removal of unnecessary units for zero values enhances code cleanliness.
- Consistent renaming of CSS variables improves overall theme structure.
To ensure the refactoring's success:
- Verify that the new mixin
.inject-Rate-vars()
is properly defined and used consistently.- Confirm that all new CSS variables (prefixed with
--tv-Rate-
) are correctly defined in the correspondingvars.less
file.- Check for any potential impacts on other components or files that might have used the old variable names.
These changes appear to be non-breaking and improve the codebase. Great work on this refactoring effort!
58-59
: Approve variable renaming and suggest definition verification.The changes from
--ti-rate-text-margin-left
to--tv-Rate-text-margin-left
and--ti-rate-text-font-size
to--tv-Rate-text-font-size
align with the PR's refactoring objective. They improve naming consistency and code organization.To ensure these new variables are properly defined, please run the following script:
#!/bin/bash # Description: Check for the definitions of the new CSS variables # Test: Search for the new variable definitions. Expect: Definitions found in a vars.less file. rg --type less $'--tv-Rate-text-margin-left:' packages/theme/src/rate/ rg --type less $'--tv-Rate-text-font-size:' packages/theme/src/rate/
64-64
: Approve consistent variable renaming and suggest definition verification.The changes from
--ti-rate-bottom-font-size
to--tv-Rate-bottom-font-size
and--ti-rate-bottom-margin-top
to--tv-Rate-bottom-margin-top
are consistent with the previous variable name changes. They continue to improve naming consistency and code organization.To ensure these new variables are properly defined, please run the following script:
#!/bin/bash # Description: Check for the definitions of the new CSS variables # Test: Search for the new variable definitions. Expect: Definitions found in a vars.less file. rg --type less $'--tv-Rate-bottom-font-size:' packages/theme/src/rate/ rg --type less $'--tv-Rate-bottom-margin-top:' packages/theme/src/rate/Also applies to: 68-68
19-19
: Approve mixin renaming and suggest impact verification.The change from
.component-css-vars-rate()
to.inject-Rate-vars()
aligns with the PR's refactoring objective and improves naming consistency. This change enhances code readability and maintainability.To ensure this change doesn't break other parts of the codebase, please run the following script to check for any remaining usage of the old mixin name:
✅ Verification successful
To ensure the old mixin
.component-css-vars-rate()
is no longer used in the codebase, please run the following corrected script:
Verification Successful: No usage of
.component-css-vars-rate()
found.The old mixin
.component-css-vars-rate()
is no longer used anywhere in the codebase, confirming that the renaming change is safe and does not impact other components.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Check for any remaining usage of the old mixin name # Test: Search for the old mixin name. Expect: No results. rg --type less $'\.component-css-vars-rate\('Length of output: 1001
Script:
#!/bin/bash # Description: Check for any remaining usage of the old mixin name # Test: Search for the old mixin name. Expect: No results. rg --type less '\.component-css-vars-rate\('Length of output: 46
packages/theme/src/dept/index.less (5)
78-78
: Approve variable renaming for icon color, but verify impact.The change to the icon color variable follows the same pattern as previous changes, maintaining consistency in the refactoring approach.
To ensure this change doesn't break other parts of the codebase, please run the following script:
#!/bin/bash # Description: Check for any remaining usage of the old icon color variable name # Test: Search for any remaining usage of the old variable name in less files rg --type less '--ti-dept-selected-info-text-color' # Test: Verify the new variable name is used consistently rg --type less '--tv-Dept-selected-info-text-color'
22-22
: Approve mixin change, but verify impact.The change from
.component-css-vars-dept()
to.inject-Dept-vars()
improves naming specificity. This refactoring aligns with the PR's objective to refactor theme variables.To ensure this change doesn't break other parts of the codebase, please run the following script:
✅ Verification successful
Mixin change verified successfully.
The old mixin
.component-css-vars-dept()
is no longer used, and the new mixin.inject-Dept-vars()
is correctly defined and utilized in the codebase.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Check for any remaining usage of the old mixin name # Test: Search for any remaining usage of the old mixin name rg --type less '.component-css-vars-dept\(' # Test: Verify the new mixin is defined rg --type less '.inject-Dept-vars\s*\('Length of output: 201
48-50
: Approve variable renaming for selected info, but verify impact.The changes to selected info color variables (text and background) follow the same pattern as previous changes, maintaining consistency in the refactoring approach.
To ensure these changes don't break other parts of the codebase, please run the following script:
✅ Verification successful
To resolve the issues with the previous search, please run the following corrected scripts:
Variable renaming for selected info approved.
All old variable names have been successfully replaced, and the new
--tv-Dept-*
variables are used consistently across the codebase.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Check for any remaining usage of the old selected info variable names # Test: Search for any remaining usage of the old variable names in less files rg --type less '(--ti-dept-selected-info-text-color|--ti-dept-selected-info-bg-color)' # Test: Verify the new variable names are used consistently rg --type less '(--tv-Dept-selected-info-text-color|--tv-Dept-selected-info-bg-color)'Length of output: 1354
Script:
# Check for any remaining usage of the old selected info variable names rg --type=less -e '--ti-dept-selected-info-text-color|--ti-dept-selected-info-bg-color' # Verify the new variable names are used consistently rg --type=less -e '--tv-Dept-selected-info-text-color|--tv-Dept-selected-info-bg-color'Length of output: 633
30-32
: Approve variable renaming, but verify impact.The change from
--ti-
to--tv-
prefix and inclusion of 'Dept' in variable names improves specificity and aligns with the PR's refactoring objective. This should enhance maintainability.To ensure these changes don't break other parts of the codebase, please run the following script:
✅ Verification successful
Variable renaming verified successfully.
The shell script results confirm that all old variable names (
--ti-dept-label-font-size
,--ti-dept-label-text-color
,--ti-dept-label-font-weight
) are no longer in use, and the new variable names (--tv-Dept-label-font-size
,--tv-Dept-label-text-color
,--tv-Dept-label-font-weight
) are consistently applied across the codebase.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Check for any remaining usage of the old variable names # Test: Search for any remaining usage of the old variable names in less files rg --type less '(--ti-dept-label-font-size|--ti-dept-label-text-color|--ti-dept-label-font-weight)' # Test: Verify the new variable names are used consistently rg --type less '(--tv-Dept-label-font-size|--tv-Dept-label-text-color|--tv-Dept-label-font-weight)'Length of output: 1354
Script:
#!/bin/bash # Description: Corrected script to check for any remaining usage of old and new variable names # Test: Search for any remaining usage of the old variable names in less files rg --type less \ -e '--ti-dept-label-font-size' \ -e '--ti-dept-label-text-color' \ -e '--ti-dept-label-font-weight' # Test: Verify the new variable names are used consistently rg --type less \ -e '--tv-Dept-label-font-size' \ -e '--tv-Dept-label-text-color' \ -e '--tv-Dept-label-font-weight'Length of output: 808
52-52
: Approve variable renaming for border-radius, but verify impact.The change to the border-radius variable for selected info follows the same pattern as previous changes, maintaining consistency in the refactoring approach.
To ensure this change doesn't break other parts of the codebase, please run the following script:
✅ Verification successful
Variable renaming verified successfully; no usages of the old variable '--ti-dept-selected-info-border-radius' found.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Check for any remaining usage of the old border-radius variable name # Test: Search for any remaining usage of the old variable name in less files rg --type less '--ti-dept-selected-info-border-radius' # Test: Verify the new variable name is used consistently rg --type less '--tv-Dept-selected-info-border-radius'Length of output: 1354
Script:
#!/bin/bash # Description: Check for any remaining usage of the old border-radius variable name # Test: Search for any remaining usage of the old variable name in less files rg --type less -e '--ti-dept-selected-info-border-radius' # Test: Verify the new variable name is used consistently rg --type less -e '--tv-Dept-selected-info-border-radius'Length of output: 316
Script:
#!/bin/bash # Description: Check for any remaining usage of the old and new border-radius variable names # Test: Search for any remaining usage of the old variable name in less files rg --type less -e '--ti-dept-selected-info-border-radius' # Test: Verify the new variable name is used consistently rg --type less -e '--tv-Dept-selected-info-border-radius'Length of output: 316
packages/theme/src/skeleton-item/index.less (8)
7-7
: LGTM: Updated CSS variable injection methodThe change from
.component-css-vars-skeleton-item()
to.inject-SkeletonItem-vars()
aligns with the PR's objective of refactoring theme variables. This new naming convention is more specific and consistent.
11-11
: LGTM: Updated linear gradient variable referenceThe change from
var(--ti-skeleton-item-linear-gradient)
tovar(--tv-SkeletonItem-linear-gradient)
is consistent with the PR's objective of refactoring theme variables. The new naming convention uses PascalCase for the component name, which improves readability.
18-19
: LGTM: Updated background color and border radius variable referencesThe changes to the background color and border radius variable references are consistent with the PR's objective. The new naming convention improves clarity and maintains the component's functionality.
23-23
: LGTM: Updated square height variable referenceThe change from
var(--ti-skeleton-item-square-height)
tovar(--tv-SkeletonItem-square-height)
aligns with the PR's refactoring objective. The new naming convention maintains consistency across the component.
27-27
: LGTM: Updated circle-related variable referencesThe changes to the circle border radius and size variables (small, medium, large) are consistent with the PR's refactoring objective. The new naming convention improves readability while maintaining the component's functionality.
Also applies to: 30-31, 35-36, 40-41
54-54
: LGTM: Updated image icon color variable referenceThe change from
var(--ti-skeleton-item-image-icon-color)
tovar(--tv-SkeletonItem-image-icon-color)
aligns with the PR's refactoring objective. The new naming convention maintains consistency across the component.
59-60
: LGTM: Updated image size variable referencesThe changes to the image size variables (small, medium, large) for both width and height are consistent with the PR's refactoring objective. The new naming convention improves readability while maintaining the component's functionality.
Also applies to: 64-65, 69-70
Line range hint
1-80
: Summary: Consistent refactoring of theme variablesThe changes in this file align well with the PR's objective of refactoring theme variables. All variable references have been updated from the
--ti-
prefix to the--tv-
prefix, and the CSS variable injection method has been renamed. These changes improve consistency and readability without altering the component's functionality.To ensure the completeness of this refactoring:
Please run the following script to verify that all occurrences of the old variable names have been updated throughout the codebase:
This will help ensure that the refactoring has been applied consistently across the entire project.
✅ Verification successful
Verification Successful: Theme Variables Refactored Consistently
All old variable names have been successfully removed, and the new
--tv-
prefixed variables are correctly defined and used throughout the codebase. The injection methodinject-SkeletonItem-vars
is consistently applied, ensuring no discrepancies remain.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Search for any remaining occurrences of the old variable names echo "Searching for old variable names:" rg --type less '\-\-ti-(skeleton-item|SkeletonItem)' # Search for the new variable names to ensure they are defined somewhere echo "Verifying new variable names are defined:" rg --type less '\-\-tv-SkeletonItem' # Check for any potential mismatches in the injection method name echo "Checking for consistency in the injection method name:" rg --type less '(component-css-vars-skeleton-item|inject-SkeletonItem-vars)'Length of output: 3947
packages/theme/src/base/vars.less (1)
379-379
: Verify usage of the new border radius variableThe addition of
--tv-border-radius-xs
is a good improvement to the design system. To ensure it's being used effectively:
- Review the project to identify components or elements that could benefit from this smaller border radius.
- Update relevant components to use
var(--tv-border-radius-xs)
where appropriate.- Consider adding documentation or updating design guidelines to include this new option for border radius.
To help identify potential usage of the new variable, you can run the following command:
This will help find any hardcoded
2px
border-radius values that could be replaced with the new variable.✅ Verification successful
Usage of the new border radius variable verified
No hardcoded
2px
border-radius values found. The new--tv-border-radius-xs
variable is being used effectively across the project.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Search for potential places to use the new border radius variable rg 'border-radius:\s*2px' --type css --type less --type scssLength of output: 91
Script:
#!/bin/bash # Search for potential places to use the new border radius variable rg 'border-radius:\s*2px' --type css --type less -g '*.scss'Length of output: 211
Script:
#!/bin/bash # List all .css, .less, and .scss files in the repository to verify their existence fd -e css -e less -e scssLength of output: 30671
|
||
&:last-child { | ||
width: var(--ti-skeleton-last-row-width); | ||
width: 60%; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Consider using a CSS variable for the last square item width.
While using a percentage maintains some responsiveness, using a CSS variable would allow for easier customization across different themes or use cases.
Consider the following alternative:
- width: 60%;
+ width: var(--tv-Skeleton-last-square-item-width, 60%);
This approach allows for easy customization through CSS variables while maintaining the current value as a default.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
width: 60%; | |
width: var(--tv-Skeleton-last-square-item-width, 60%); |
width: 240px; | ||
height: 48px; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Consider using relative units or CSS variables for title dimensions.
While fixed dimensions can provide consistency, they might limit flexibility and responsiveness. Consider using relative units (e.g., em, rem) or CSS variables for the title dimensions to maintain adaptability across different screen sizes and themes.
Here's a suggested alternative:
- width: 240px;
- height: 48px;
+ width: var(--tv-Skeleton-title-width, 15rem);
+ height: var(--tv-Skeleton-title-height, 3rem);
This approach allows for easy customization through CSS variables while providing sensible defaults.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
width: 240px; | |
height: 48px; | |
width: var(--tv-Skeleton-title-width, 15rem); | |
height: var(--tv-Skeleton-title-height, 3rem); |
margin-top: 24px; | ||
margin-bottom: 24px; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Consider using CSS variables for row margins.
While fixed margins can provide consistency, using CSS variables would allow for easier theme customization and maintain flexibility. This approach aligns better with the overall goal of refactoring theme variables.
Consider the following alternative:
- margin-top: 24px;
- margin-bottom: 24px;
+ margin-top: var(--tv-Skeleton-row-margin, 24px);
+ margin-bottom: var(--tv-Skeleton-row-margin, 24px);
This change allows for easy customization through CSS variables while maintaining the current values as defaults.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
margin-top: 24px; | |
margin-bottom: 24px; | |
margin-top: var(--tv-Skeleton-row-margin, 24px); | |
margin-bottom: var(--tv-Skeleton-row-margin, 24px); |
} | ||
|
||
&-item--square { | ||
margin-bottom: var(--ti-skeleton-row-margin-bottom); | ||
margin-bottom: 12px; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Consider using a CSS variable for square item margin.
To maintain consistency with the theme refactoring approach and allow for easier customization, consider using a CSS variable for the square item margin-bottom.
Here's a suggested alternative:
- margin-bottom: 12px;
+ margin-bottom: var(--tv-Skeleton-square-item-margin, 12px);
This approach allows for easy customization through CSS variables while providing the current value as a default.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
margin-bottom: 12px; | |
margin-bottom: var(--tv-Skeleton-square-item-margin, 12px); |
--tv-SkeletonItem-circle-large-size: 60px; | ||
// 圆形中尺寸设置 | ||
--ti-skeleton-item-circle-medium-size: var(--ti-common-size-12x, 48px); | ||
--tv-SkeletonItem-circle-medium-size: 48px; | ||
// 圆形小尺寸设置 | ||
--ti-skeleton-item-circle-small-size: var(--ti-common-size-5x, 20px); | ||
--tv-SkeletonItem-circle-small-size: 20px; | ||
// 小图片高度设置 | ||
--ti-skeleton-item-image-small-size-height: var(--ti-common-size-15x, 60px); | ||
--tv-SkeletonItem-image-small-size-height: 60px; | ||
// 小图片宽度设置 | ||
--ti-skeleton-item-image-small-size-width: var(--ti-common-size-15x, 60px); | ||
--tv-SkeletonItem-image-small-size-width: 60px; | ||
// 中图片高度设置 | ||
--ti-skeleton-item-image-medium-size-height: var(--ti-common-size-25x, 100px); | ||
--tv-SkeletonItem-image-medium-size-height: 100px; | ||
// 中图片宽度设置 | ||
--ti-skeleton-item-image-medium-size-width: var(--ti-common-size-25x, 100px); | ||
--tv-SkeletonItem-image-medium-size-width: 100px; | ||
// 大图片高度设置 | ||
--ti-skeleton-item-image-large-size-height: var(--ti-common-size-50x, 200px); | ||
--tv-SkeletonItem-image-large-size-height: 200px; | ||
// 大图片宽度设置 | ||
--ti-skeleton-item-image-large-size-width: var(--ti-common-size-50x, 200px); | ||
--tv-SkeletonItem-image-large-size-width: 200px; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Consider using relative units or theme variables for sizes.
The change to fixed pixel values for circle and image sizes might reduce flexibility in responsive designs or when scaling the UI. Consider using relative units (e.g., em, rem) or referencing theme variables for these sizes to maintain consistency and scalability.
Example refactor:
- --tv-SkeletonItem-circle-large-size: 60px;
+ --tv-SkeletonItem-circle-large-size: var(--tv-size-circle-large, 3.75rem);
- --tv-SkeletonItem-image-small-size-height: 60px;
- --tv-SkeletonItem-image-small-size-width: 60px;
+ --tv-SkeletonItem-image-small-size: var(--tv-size-image-small, 3.75rem);
This approach allows for easy global adjustments while still providing default values.
Committable suggestion was skipped due to low confidence.
@@ -27,7 +27,7 @@ | |||
.area { | |||
font-size: var(--ti-text-popup-font-size); | |||
font-family: var(--ti-text-popup-font-family); | |||
padding: var(--ti-text-popup-padding-vertical) var(--ti-text-popup-padding-horizontal); | |||
padding: 5px 12px; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider keeping padding configurable through CSS variables.
The padding for the .area
class has been changed from using CSS variables to fixed values of 5px 12px
. While this standardizes the padding across all instances of the component, it removes the flexibility to adjust the padding through theme variables.
Consider reverting this change to maintain customization options:
- padding: 5px 12px;
+ padding: var(--ti-text-popup-padding-vertical, 5px) var(--ti-text-popup-padding-horizontal, 12px);
This approach would preserve the default padding while allowing for easy customization when needed.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
padding: 5px 12px; | |
padding: var(--ti-text-popup-padding-vertical, 5px) var(--ti-text-popup-padding-horizontal, 12px); |
|
||
&__item { | ||
margin-bottom: var(--ti-bulletin-board-item-margin-bottom); | ||
margin-bottom: 24px; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Consider replacing hardcoded values with CSS variables for consistency and maintainability
While many styles have been updated to use CSS variables, some properties still use hardcoded values:
- Line 24:
margin-bottom: 24px;
- Line 29:
margin-bottom: 8px;
- Line 49:
padding: 12px 0 8px 24px;
- Line 85:
padding: 0 4px;
- Line 86:
margin-left: 6px;
- Line 144:
padding: 0;
Consider defining new CSS variables for these values to enhance consistency and make future adjustments easier.
Also applies to: 29-29, 49-49, 85-85, 86-86, 144-144
color: var(--ti-bulletin-board-item-title-text-color); | ||
margin-bottom: var(--ti-bulletin-board-item-title-text-margin-bottom); | ||
color: var(--tv-BulletinBoard-item-title-text-color); | ||
margin-bottom: 8px; | ||
font-size: var(--ti-common-font-size-base); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ensure consistency in CSS variable prefixes
There are variables still using the --ti-
prefix:
- Line 30:
font-size: var(--ti-common-font-size-base);
- Line 146:
font-size: var(--ti-common-font-size-1);
Since the refactoring changes variables to the --tv-
prefix, consider updating these to maintain consistency across the codebase.
Also applies to: 146-146
…ponents theme vars
…ponents theme vars
…ponents theme vars
PR
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: N/A
What is the new behavior?
Does this PR introduce a breaking change?
Other information
Summary by CodeRabbit
Release Notes
New Features
--tv-border-radius-xs
for border radius.Improvements
--ti-
to--tv-
for consistency across various components.skeleton
,text-popup
, andwatermark
.Bug Fixes
Chores