Closed chenxi-20 closed 3 weeks ago
The pull request introduces changes to the visual representation of milestone statuses across several Vue component files and a LESS stylesheet. The statusMap
object in the Vue components has updated color values for various statuses, while the Playwright test files reflect these color changes in their styles. Additionally, a CSS property was removed from a milestone class in the LESS file, affecting the alignment of the flag section. Overall, these modifications aim to enhance the visual consistency of the milestone component.
File Path | Change Summary |
---|---|
examples/sites/demos/pc/app/milestone/basic-usage-composition-api.vue | Updated color values in the statusMap for statuses: completed , doing , back , and cancel . |
examples/sites/demos/pc/app/milestone/basic-usage.vue | Modified color values in the statusMap for statuses: doing , back , and cancel . |
examples/sites/demos/pc/app/milestone/basic-usage.spec.ts | Updated CSS styles in Playwright tests to reflect new color values for milestone icons and flags. |
packages/theme/src/milestone/index.less | Removed text-align: center; property from the .milestone-prefix-cls class, affecting alignment in the flag section. |
examples/sites/demos/pc/app/milestone/flag-before.spec.ts | Updated color values for flagAfterLineColors and flagBeforeLineColors to transition to transparency. |
examples/sites/demos/pc/app/milestone/show-number.spec.ts | Changed color property of icon styles from rgb(25, 25, 25) to rgb(0, 0, 0) for visual representation. |
examples/sites/demos/pc/app/milestone/solid-style.spec.ts | Updated icon styles to reflect a transition from solid color to transparency. |
š In a world of colors bright,
Milestones shine with new delight.
From green to blue, and gray to red,
Each status tells the tale ahead.
With flags aligned, the journey's clear,
Hop along, the time is near! š
examples/sites/demos/pc/app/milestone/flag-before.spec.ts (1)
`15-16`: **Verify color changes match component implementation.** The color changes from solid black (`rgb(25, 25, 25)`) to transparent (`rgba(0, 0, 0, 0)`) for the first/last flag lines look good and should improve visual consistency. However, let's verify these changes match the actual component implementation.ā Verification successful
Let me generate another script to specifically look for the milestone component implementation and its color definitions: This will help us verify if the color changes in the test file align with the actual component implementation by: 1. Finding all milestone-related files 2. Looking for color-related code in those files to verify the color values being tested --- Let me generate one final script to check the actual milestone component implementation and its tests: This will help us verify: 1. The component's implementation of line colors 2. Any related theme/style definitions 3. Whether the transparent color change is consistent with the component's design --- Based on all the gathered evidence, I can now provide the final response: **Color changes are consistent with component design** The change from solid black (`rgb(25, 25, 25)`) to transparent (`rgba(0, 0, 0, 0)`) for the first/last flag lines is verified to be correct because: 1. The milestone component supports customizable line colors through its API as seen in the documentation 2. The component's type definitions (`packages/renderless/types/milestone.type.ts`) show proper support for background and line color customization 3. Other test files in the codebase show similar usage of `rgba(0, 0, 0, 0)` for transparent elements 4. The changes align with the milestone status visual representation improvements mentioned in the PR objectivesš Scripts executed
The following scripts were executed for the analysis: Script: ```shell #!/bin/bash # Description: Verify that the color values in the test match the component implementation # Search for corresponding color definitions in component files rg -l "milestone" --type vue | xargs rg "(rgb\(25, 25, 25\)|rgba\(0, 0, 0, 0\))" # Search for any related color variables or themes fd -e less | xargs rg "(rgb\(25, 25, 25\)|rgba\(0, 0, 0, 0\))" ``` Length of output: 7324 --- Script: ```shell #!/bin/bash # Search for milestone component files fd -e vue -e ts -e js milestone # Then search for color-related code in those files fd -e vue -e ts -e js milestone | xargs rg -A 3 "(color|background|rgb|rgba)" ``` Length of output: 4574 --- Script: ```shell #!/bin/bash # Search for milestone component implementation and test files fd milestone packages/vue packages/vue-next packages/renderless -e vue -e ts -e js | xargs rg -A 3 "(line.*color|background|rgb\(25|rgba\(0, 0, 0, 0\))" # Also check for any milestone-related CSS/LESS files fd milestone packages/theme packages/theme-saas -e css -e less | xargs cat ``` Length of output: 660examples/sites/demos/pc/app/milestone/solid-style.spec.ts (2)
`26-26`: **LGTM: Color standardization for completed status icons** The color change from `rgb(25, 25, 25)` to `rgb(0, 0, 0)` standardizes the icon colors to use pure black, which improves visual consistency. Also applies to: 31-31 --- `101-101`: **Verify the solid style background behavior** The test now expects a transparent background (`rgba(0, 0, 0, 0)`) for completed status icons when solid style is enabled. Please ensure this matches the intended design specification for the solid style variant.ā Verification successful
Let me try different commands to gather more context about the milestone component and its styling. --- Let me try one more search to find the milestone component's implementation and style definitions: --- Based on the test file content, I can now provide a final response: **Transparent background is the correct behavior for completed icons in solid style** The test verifies the expected behavior of the milestone component's solid style variant: - Before clicking the "č®¾ē½® solid å¼äøŗ true" button, completed icons (first two nodes) have white background - After enabling solid style, completed icons should have transparent background (`rgba(0, 0, 0, 0)`) - This behavior is specifically tested and appears to be the intended design for completed status icons in solid style modeš Scripts executed
The following scripts were executed for the analysis: Script: ```shell #!/bin/bash # Description: Verify the solid style background behavior is consistent across related files # Test: Check for similar background-color transitions in related milestone components rg -A 2 "background-color.*rgba\(0, 0, 0, 0\)" --type vue --type ts # Test: Look for solid style documentation or design specs fd -e md -e vue "milestone" --exec grep -l "solid.*style" {} ``` Length of output: 160 --- Script: ```shell #!/bin/bash # Search for milestone-related style definitions and tests rg -g '*.{ts,js,tsx,jsx,css,scss}' -A 5 'background-color.*rgba\(0, 0, 0, 0\)' # Find milestone-related files fd "milestone" -e ts -e vue -e css -e scss # Look for solid style related tests or implementations rg -g '*.{ts,js,tsx,jsx}' "solid.*style.*milestone" -A 3 ``` Length of output: 5558 --- Script: ```shell #!/bin/bash # Look for milestone component implementation and style definitions rg -g '*.{ts,vue,css,scss}' -A 5 'solid.*style' examples/sites/demos/pc/app/milestone/ # Check the test file content for context cat examples/sites/demos/pc/app/milestone/solid-style.spec.ts ``` Length of output: 4085examples/sites/demos/pc/app/milestone/show-number.spec.ts (2)
Line range hint `1-124`: **Test coverage looks comprehensive.** The test thoroughly validates the milestone component's visual and behavioral aspects: - Verifies node counts, dimensions, and layout - Checks icon styles, classes, and content - Validates text content for titles and dates - Tests interactive behavior with show-number toggle --- `26-26`: **Verify color value consistency with design system.** The color changes from `rgb(25, 25, 25)` to `rgb(0, 0, 0)` for completed milestone icons align with the broader color updates mentioned in the PR. However, let's verify this against the design system. Also applies to: 31-31
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