Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(docs): [progress] The document is modified to meet the requirements of the new specifications. #2306

Merged
merged 1 commit into from
Oct 19, 2024

Conversation

chenxi-20
Copy link
Collaborator

@chenxi-20 chenxi-20 commented Oct 19, 2024

PR

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

  • New Features

    • Updated the visual appearance of progress bars by reducing the stroke-width property from 24 to 12 across multiple components.
    • Introduced new text styling for progress indicators, setting the font size to 14px to enhance readability.
  • Bug Fixes

    • Adjusted expected dimensions in test cases to align with the new progress bar specifications.

@chenxi-20 chenxi-20 added the documentation 对文档的改进或补充 label Oct 19, 2024
Copy link

coderabbitai bot commented Oct 19, 2024

Walkthrough

This pull request includes modifications to various Vue component files that primarily adjust the stroke-width property of the <tiny-progress> component from 24 to 12. These changes affect the visual representation of progress bars across multiple components, including their associated test files. Additionally, new CSS rules are introduced to set the font size of the text within the progress components to 14px, ensuring it takes precedence over other styles.

Changes

File Path Change Summary
examples/sites/demos/pc/app/progress/basic-usage-composition-api.vue Updated stroke-width from 24 to 12 for the second <tiny-progress> component.
examples/sites/demos/pc/app/progress/basic-usage.vue Updated stroke-width from 24 to 12 for the second <tiny-progress> component.
examples/sites/demos/pc/app/progress/basic-usage.spec.ts Adjusted expected height from 24px to 12px and border-radius from 12px to 6px for the second progress bar in tests.
examples/sites/demos/pc/app/progress/custom-color-composition-api.vue Updated stroke-width from 24 to 12 for three <tiny-progress> components; added CSS for font size.
examples/sites/demos/pc/app/progress/custom-color.vue Updated stroke-width from 24 to 12 for three <tiny-progress> components; added CSS for font size.
examples/sites/demos/pc/app/progress/custom-status-composition-api.vue Updated stroke-width from 24 to 12 for four <tiny-progress> components; added scoped CSS for font size.
examples/sites/demos/pc/app/progress/custom-status.vue Updated stroke-width from 24 to 12 for four <tiny-progress> components; added CSS for font size.
examples/sites/demos/pc/app/progress/format-text-composition-api.vue Updated stroke-width from 24 to 12; added CSS for font size.
examples/sites/demos/pc/app/progress/format-text.vue Updated stroke-width from 24 to 12; added CSS for font size.
examples/sites/demos/pc/app/progress/progress-status-composition-api.vue Updated stroke-width from 24, 22, and 20 to 12 for three <tiny-progress> components.
examples/sites/demos/pc/app/progress/progress-status.vue Updated stroke-width from 24, 22, and 20 to 12 for three <tiny-progress> components.
examples/sites/demos/pc/app/progress/progress-status.spec.ts Adjusted expected dimensions of SVG icons from 20 to 16 in tests.

Possibly related PRs

Suggested labels

enhancement

Suggested reviewers

  • zzcr

🐇 In the meadow, progress flows,
With strokes so fine, the rabbit knows.
From twenty-four to twelve, they say,
The bars now shine in a brighter way!
Font sizes dance, a lovely sight,
Hop along, all feels just right! 🐰✨


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?

❤️ 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 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 bug Something isn't working and removed documentation 对文档的改进或补充 labels Oct 19, 2024
@chenxi-20 chenxi-20 changed the title fix(docs): The document is modified to meet the requirements of the new specifications. fix(docs): [progress] The document is modified to meet the requirements of the new specifications. Oct 19, 2024
Copy link

[e2e-test-warn]
The component to be tested is missing.

The title of the Pull request should look like "fix(vue-renderless): [action-menu, alert] fix xxx bug".

Please make sure you've read our contributing guide

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: 1

🧹 Outside diff range and nitpick comments (12)
examples/sites/demos/pc/app/progress/progress-status.vue (1)

Line range hint 1-46: Suggestions for improving component structure and reusability

While the changes made to the stroke-width are appropriate, here are some suggestions to further improve this component:

  1. Consider making the button text more descriptive. For example:

    {{ textInside ? 'Show Icon Status' : 'Show Text Status' }}
  2. To enhance reusability, consider making the progress percentages dynamic:

    <tiny-progress
      v-for="(item, index) in progressItems"
      :key="index"
      class="progress"
      :text-inside="textInside"
      :stroke-width="12"
      :percentage="item.percentage"
      :status="item.status"
    ></tiny-progress>
  3. Consider refactoring to use the Composition API for better organization and reusability:

    <script setup>
    import { ref } from 'vue'
    import { Progress, Button } from '@opentiny/vue'
    
    const textInside = ref(false)
    const progressItems = ref([
      { percentage: 100, status: 'success' },
      { percentage: 80, status: 'warning' },
      { percentage: 50, status: 'exception' }
    ])
    
    const toggleTextInside = () => {
      textInside.value = !textInside.value
    }
    </script>

These changes would make the component more flexible and easier to maintain.

examples/sites/demos/pc/app/progress/format-text-composition-api.vue (1)

39-41: Consider the necessity of !important.

The addition of this CSS rule ensures a consistent font size for the progress text, which aligns with the documentation update objectives. The use of :deep() is correct for targeting nested component styles in Vue 3.

While the !important flag ensures this style takes precedence, consider if it's absolutely necessary. Overuse of !important can lead to specificity wars and make styles harder to maintain. If possible, try to achieve the same result without !important by increasing the specificity of the selector or adjusting the component's internal styles.

examples/sites/demos/pc/app/progress/format-text.vue (1)

49-51: LGTM: Progress text font size adjusted, with a suggestion

The addition of this CSS rule to set the font size of the progress text to 14px is in line with the PR objective. The use of :deep() is correct for targeting nested components.

However, consider the following suggestion:

Instead of using !important, which can make styles harder to maintain, consider increasing the specificity of the selector. For example:

.progress-container :deep(.tiny-progress .tiny-progress__text) {
  font-size: 14px;
}

This approach achieves the same result without relying on !important, making the styles more maintainable in the long run.

examples/sites/demos/pc/app/progress/custom-color-composition-api.vue (1)

45-50: Style addition looks good, but consider the use of !important.

The new style section correctly uses the :deep selector to target the text within the progress component, ensuring a consistent font size of 14px. This aligns with the PR objective of updating the documentation to meet new specifications.

However, the use of !important might lead to maintainability issues in the future. Consider if this declaration can be made more specific to increase its specificity without using !important.

If possible, try to remove the !important declaration by making the selector more specific or by adjusting the component's internal styles.

examples/sites/demos/pc/app/progress/basic-usage-composition-api.vue (1)

10-10: LGTM! Consider adjusting the first progress component for consistency.

The change from stroke-width="24" to stroke-width="12" for the second progress component is correct and aligns with the PR objectives. This adjustment will result in a thinner progress bar, potentially improving its visual appearance.

For consistency, consider applying a similar change to the first <tiny-progress> component on line 8. This would ensure a uniform appearance across both progress bars. Here's a suggested modification:

-    <tiny-progress class="progress-first" :stroke-width="4" :percentage="percentage"></tiny-progress>
+    <tiny-progress class="progress-first" :stroke-width="6" :percentage="percentage"></tiny-progress>

This change would make the first progress bar slightly thicker while maintaining a visual difference between the two components.

examples/sites/demos/pc/app/progress/basic-usage.vue (1)

Line range hint 1-58: Consider documenting the visual differences between progress components

The file now contains two tiny-progress components with distinct visual styles:

  1. The first component has a stroke-width of 4 and a text size of 12px.
  2. The second component has a stroke-width of 12 and a text size of 14px.

These differences create a visual hierarchy and demonstrate different styling options for the progress component. Consider adding a comment in the template or updating the component's documentation to explain the purpose of these variations, which could be helpful for other developers using this example.

examples/sites/demos/pc/app/progress/custom-color.vue (2)

4-4: LGTM. Consider updating documentation.

The change from stroke-width="24" to stroke-width="12" is consistent with the PR objective. This will result in a thinner progress bar.

If there's any user-facing documentation describing the appearance of the progress bar, please ensure it's updated to reflect this change.


54-59: LGTM. Document use of !important.

The addition of the scoped style to set the font size of the progress text is appropriate. The use of :deep() selector ensures proper targeting of the nested component.

The use of !important is sometimes necessary but can lead to maintainability issues. Consider documenting the reason for its use in a comment, or explore alternative ways to achieve the desired specificity without !important if possible.

examples/sites/demos/pc/app/progress/basic-usage.spec.ts (1)

15-17: LGTM! Consider adding a comment explaining the visual change.

The changes to the expected height and border-radius of the second progress bar are consistent with the updated specifications. The 2:1 ratio between height and border-radius is maintained, which is good for visual consistency.

Consider adding a brief comment explaining the reason for this visual change, to provide context for future developers. For example:

// Progress bar dimensions updated to match new design specifications
await expect(progress2).toHaveCSS('height', '12px')
await expect(progress2).toHaveCSS('border-radius', '6px')
examples/sites/demos/pc/app/progress/custom-status-composition-api.vue (1)

146-148: LGTM with a suggestion: Consider removing !important if possible.

The addition of this CSS rule ensures a consistent font size (14px) for the progress text across all states. The use of :deep is correct for targeting child components in Vue 3.

However, the use of !important is generally discouraged unless absolutely necessary, as it can make future style changes more difficult. If possible, consider removing !important and adjusting the specificity of the selector to achieve the same result.

If removing !important doesn't affect the desired outcome, consider this alternative:

.tiny-progress :deep(.tiny-progress__text) {
  font-size: 14px;
}

If !important is indeed necessary, please add a comment explaining why it's required in this case.

examples/sites/demos/pc/app/progress/custom-status.vue (2)

76-76: LGTM: Consistent stroke width adjustment. Consider refactoring.

The stroke-width property has been consistently reduced from 24 to 12 for the "Success" status progress bar, maintaining uniformity with all previous changes.

Given that the stroke-width value is now consistent across all progress bars, consider refactoring to use a shared constant or prop for this value. This would make future updates easier and ensure consistency. For example:

<script>
export default {
  // ... other code ...
  data() {
    return {
      // ... other data ...
      progressStrokeWidth: 12
    }
  }
  // ... other code ...
}
</script>

<template>
  <!-- ... other template code ... -->
  <tiny-progress
    :stroke-width="progressStrokeWidth"
    <!-- ... other props ... -->
  ></tiny-progress>
  <!-- ... other template code ... -->
</template>

149-151: LGTM with a note: Font size consistency added, but consider !important usage.

The addition of this CSS rule ensures a consistent font size of 14px for the progress text across all progress bars in this component.

While the use of !important ensures that this style takes precedence, it's generally considered a last resort in CSS. Its presence might indicate conflicting styles elsewhere in the codebase. Consider the following suggestions:

  1. Investigate if there are conflicting styles and resolve them without using !important.
  2. If !important is absolutely necessary, add a comment explaining why it's needed to prevent future confusion.
  3. Consider using more specific selectors or adjusting the CSS specificity to achieve the desired result without !important.

Example:

.tiny-progress :deep(.tiny-progress__text) {
  /* Overriding conflicting styles from X component */
  font-size: 14px !important;
}
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 5e16cbe and 698d105.

📒 Files selected for processing (12)
  • examples/sites/demos/pc/app/progress/basic-usage-composition-api.vue (1 hunks)
  • examples/sites/demos/pc/app/progress/basic-usage.spec.ts (1 hunks)
  • examples/sites/demos/pc/app/progress/basic-usage.vue (1 hunks)
  • examples/sites/demos/pc/app/progress/custom-color-composition-api.vue (2 hunks)
  • examples/sites/demos/pc/app/progress/custom-color.vue (2 hunks)
  • examples/sites/demos/pc/app/progress/custom-status-composition-api.vue (5 hunks)
  • examples/sites/demos/pc/app/progress/custom-status.vue (5 hunks)
  • examples/sites/demos/pc/app/progress/format-text-composition-api.vue (2 hunks)
  • examples/sites/demos/pc/app/progress/format-text.vue (2 hunks)
  • examples/sites/demos/pc/app/progress/progress-status-composition-api.vue (1 hunks)
  • examples/sites/demos/pc/app/progress/progress-status.spec.ts (1 hunks)
  • examples/sites/demos/pc/app/progress/progress-status.vue (1 hunks)
🧰 Additional context used
🔇 Additional comments (22)
examples/sites/demos/pc/app/progress/progress-status-composition-api.vue (4)

12-12: LGTM: Stroke width updated as per new specifications.

The stroke-width property has been changed from 24 to 12, which aligns with the new specifications mentioned in the PR objectives. This change will result in a thinner progress bar, potentially improving the overall aesthetics of the component.


20-20: LGTM: Consistent stroke width update.

The stroke-width property has been consistently updated to 12, matching the change in the first progress component. This ensures a uniform appearance across all progress bars in this example.


28-28: LGTM: Uniform stroke width applied to all progress components.

The stroke-width property has been consistently updated to 12 for all three progress components in this file. This change ensures a uniform appearance and aligns with the new specifications mentioned in the PR objectives.

Overall, these changes successfully update the documentation example to reflect the new specifications for the <tiny-progress> component. The uniform stroke-width of 12 across all instances will provide a consistent look in the documentation.


12-28: Summary: Documentation successfully updated to reflect new specifications.

The changes in this file consistently update the stroke-width property of all <tiny-progress> components from their previous values (24, 22, and 20) to a uniform value of 12. This modification aligns perfectly with the PR objectives of updating the documentation to meet new specifications.

These changes will result in thinner progress bars across all examples in this file, providing a consistent visual representation of the updated <tiny-progress> component. The uniformity of the changes ensures that the documentation accurately reflects the new design guidelines.

No other modifications were made to the file, maintaining the existing functionality and structure of the example. This focused approach to updating only the necessary attributes is commendable.

examples/sites/demos/pc/app/progress/format-text-composition-api.vue (1)

12-12: LGTM! Verify the new stroke-width value.

The change from 24 to 12 for the stroke-width prop is consistent with the updates mentioned in the PR summary. This will result in a thinner progress bar.

Please confirm that 12 is the correct value according to the new specifications. If you have a design document or specification that outlines this change, it would be helpful to reference it in the PR description.

examples/sites/demos/pc/app/progress/format-text.vue (2)

12-12: LGTM: Progress bar stroke width adjusted

The change from stroke-width="24" to stroke-width="12" aligns with the PR objective of updating the documentation to meet new specifications. This adjustment will result in a thinner progress bar, which may improve the overall visual design.


Line range hint 1-51: Summary: Visual adjustments to progress component

The changes in this file focus on visual improvements to the progress component:

  1. The progress bar is made thinner by reducing the stroke-width.
  2. The progress text font size is explicitly set to ensure consistency.

These modifications align well with the PR objective of updating documentation to meet new specifications. The component's core functionality remains unchanged, and these visual tweaks should enhance the overall user experience.

A minor suggestion was made regarding the CSS implementation, but overall, the changes are appropriate and improve the component's presentation.

examples/sites/demos/pc/app/progress/progress-status.spec.ts (1)

17-18: LGTM. Please clarify the reason for the icon size change.

The changes to the minimum expected dimensions of the SVG icons (from 20x20 to 16x16) have been implemented correctly. This adjustment aligns with potential visual updates mentioned in the PR summary.

However, to ensure comprehensive documentation:

  1. Could you please clarify the reason for this change? Is it related to the stroke-width adjustment or new CSS rules mentioned in the PR summary?
  2. If this change is part of a broader visual update, please ensure that the component documentation is also updated to reflect these new dimensions.

To verify if there are any related changes in the documentation, please run the following script:

examples/sites/demos/pc/app/progress/custom-color-composition-api.vue (1)

4-8: LGTM: Consistent stroke-width changes applied.

The stroke-width property has been consistently updated from 24 to 12 for all TinyProgress components. This change aligns with the PR objective of updating documentation to meet new specifications.

To ensure the visual changes meet the intended design, please verify the appearance of the progress bars with the new stroke-width. Consider adding before/after screenshots to the PR description for easier review.

examples/sites/demos/pc/app/progress/basic-usage.vue (1)

10-10: Stroke width adjustment aligns with PR objectives

The change from :stroke-width="24" to :stroke-width="12" for the second tiny-progress component is consistent with the PR objectives of updating documentation to meet new specifications. This modification will result in a thinner progress bar, which may improve the visual appearance and consistency with other UI elements.

To ensure this change is part of a broader update, let's check for similar changes in other files:

✅ Verification successful

Stroke width adjustment verified across the codebase

The change from :stroke-width="24" to :stroke-width="12" for the tiny-progress component in basic-usage.vue is consistent with similar updates in other Vue components. This ensures uniformity in the progress bar's appearance throughout the application.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Search for other occurrences of stroke-width changes in progress components
rg --type vue 'tiny-progress.*stroke-width="(12|24)"' -g '!examples/sites/demos/pc/app/progress/basic-usage.vue'

Length of output: 142


Script:

#!/bin/bash
# Description: Search for other occurrences of stroke-width changes in tiny-progress components within .vue files
rg 'tiny-progress.*stroke-width="(12|24)"' -g '*.vue' --exclude 'examples/sites/demos/pc/app/progress/basic-usage.vue'

Length of output: 530


Script:

#!/bin/bash
# Description: Search for other occurrences of stroke-width changes in tiny-progress components within .vue files, excluding the specified file
rg 'tiny-progress.*stroke-width="(12|24)"' -g '*.vue' -g '!examples/sites/demos/pc/app/progress/basic-usage.vue'

Length of output: 1785

examples/sites/demos/pc/app/progress/custom-color.vue (3)

6-6: LGTM. Consistent change.

The change from stroke-width="24" to stroke-width="12" is consistent with the previous progress bar modification.


8-8: LGTM. Verify visual impact.

The change from stroke-width="24" to stroke-width="12" is consistent with the previous progress bar modifications.

Please verify that the visual appearance of all progress bars is as intended with the new stroke-width value.


Line range hint 1-59: Summary: Changes look good, with minor suggestions.

The modifications to the stroke-width property and the addition of the scoped style are consistent with the PR objectives. Here are some final points to consider:

  1. Update any user-facing documentation that describes the appearance of the progress bars to reflect the new stroke-width.
  2. Verify that the visual appearance of all progress bars is as intended with the new stroke-width value.
  3. Consider documenting the reason for using !important in the new style, or explore alternative ways to achieve the desired specificity.

Overall, the changes improve the consistency of the progress bar components and provide better control over the text styling.

examples/sites/demos/pc/app/progress/custom-status-composition-api.vue (5)

15-15: LGTM: Stroke width adjustment for consistency.

The change from stroke-width="24" to stroke-width="12" aligns with the PR objective of updating to new specifications. This adjustment will result in a thinner progress bar.

Please verify that this change doesn't negatively impact the visibility of the progress bar, especially in the "exception" (failure) state.


35-35: LGTM: Consistent stroke width adjustment.

The change from stroke-width="24" to stroke-width="12" is consistent with the previous adjustment, ensuring uniformity across different progress bar instances.


52-52: LGTM: Uniform stroke width for consistency across states.

The change from stroke-width="24" to stroke-width="12" maintains consistency with previous adjustments, ensuring a uniform appearance across different progress bar states, including the "exception" (retryable failure) state.


76-76: LGTM: Consistent stroke width across all progress states.

The change from stroke-width="24" to stroke-width="12" completes the uniform adjustment across all progress bar states (normal, exception, retryable failure, and success). This ensures a consistent visual appearance throughout the component.


Line range hint 1-324: Summary: Consistent updates to progress component styling.

The changes in this file successfully update the tiny-progress component to meet new specifications:

  1. The stroke-width property has been consistently changed from 24 to 12 across all progress bar states (normal, exception, retryable failure, and success). This results in thinner, more uniform progress bars throughout the component.

  2. A new CSS rule has been added to ensure consistent 14px font size for the progress text.

These modifications enhance the overall consistency and appearance of the progress component. The changes align well with the PR objective of updating documentation to meet new specifications.

To further improve the code:

  1. Verify that the thinner stroke width (12 instead of 24) doesn't negatively impact visibility or usability.
  2. Consider removing the !important flag from the new CSS rule if possible, or add a comment explaining its necessity if it must be retained.

Overall, these changes represent a positive update to the component's styling and consistency.

examples/sites/demos/pc/app/progress/custom-status.vue (4)

15-15: LGTM: Stroke width adjustment for consistency.

The stroke-width property has been reduced from 24 to 12, which aligns with the PR objective of updating to meet new specifications. This change will result in a thinner progress bar.

Please verify that this change doesn't negatively impact the visual appearance of the progress bar, especially in different viewport sizes.


35-35: LGTM: Consistent stroke width adjustment.

The stroke-width property has been consistently reduced from 24 to 12 for the "Uploading" status progress bar, maintaining uniformity with the previous change.


52-52: LGTM: Consistent stroke width adjustment.

The stroke-width property has been consistently reduced from 24 to 12 for the "Retryable Failure" status progress bar, maintaining uniformity with the previous changes.


Line range hint 1-338: Summary: Consistent updates to progress bars with minor suggestions.

The changes in this file consistently update the stroke-width of all progress bars from 24 to 12 and introduce a new CSS rule for consistent text sizing. These modifications align well with the PR objective of updating documentation to meet new specifications.

Key points:

  1. All stroke-width changes are consistent and approved.
  2. A suggestion to refactor the stroke-width value into a shared constant or prop has been made.
  3. The new CSS rule for text sizing is approved, with a note to reconsider the use of !important.

Overall, these changes improve the consistency of the component's appearance. Please address the suggestions if possible, particularly regarding the use of !important in the CSS rule.

@@ -9,23 +9,23 @@
<tiny-progress
class="progress"
:text-inside="textInside"
:stroke-width="24"
:stroke-width="12"
Copy link

Choose a reason for hiding this comment

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

💡 Codebase verification

Inconsistent stroke-width values detected in progress components

Some <tiny-progress> components still use a different stroke-width value:

  • examples/sites/demos/pc/app/progress/basic-usage.vue: :stroke-width="4"
  • examples/sites/demos/pc/app/progress/basic-usage-composition-api.vue: :stroke-width="4"

Please ensure all progress components are updated to use a stroke-width of 12 for consistency.

🔗 Analysis chain

Standardization of stroke-width across progress bars

The stroke-width property has been uniformly set to 12 for all three <tiny-progress> components. This change promotes consistency in the appearance of progress bars within this component.

However, consider the following points:

  1. Ensure this change aligns with the overall design system and doesn't negatively impact the visual hierarchy.
  2. Verify if this change should be applied globally to all progress bars in the application for consistency.
  3. Consider adding a comment explaining the rationale behind choosing 12 as the standard width.

To ensure consistency across the codebase, let's check for other occurrences of stroke-width in progress components:

Also applies to: 20-20, 28-28

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Search for other occurrences of stroke-width in progress components
# Expected result: All progress components should use a stroke-width of 12

rg --type vue 'stroke-width' examples/sites/demos/pc/app/progress

Length of output: 93


Script:

#!/bin/bash
# Description: Search for other occurrences of stroke-width in .vue progress components
# Expected result: All progress components should use a stroke-width of 12

rg 'stroke-width' -g "*.vue" examples/sites/demos/pc/app/progress

Length of output: 3333

@zzcr zzcr merged commit fa3a4ab into dev Oct 19, 2024
12 of 17 checks passed
@kagol kagol deleted the fix/newdesign-20241016 branch November 4, 2024 06:16
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