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

feat:[steps,loading,image,milstone] Support dark them #3044

Merged
merged 1 commit into from
Mar 7, 2025

Conversation

discreted66
Copy link
Collaborator

@discreted66 discreted66 commented Mar 5, 2025

PR

steps暗色主题适配

PR Checklist

Please check if your PR fulfills the following requirements:

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

PR Type

What kind of change does this PR introduce?

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

What is the current behavior?

Issue Number: N/A

What is the new behavior?

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

Summary by CodeRabbit

  • Style
    • Updated visual styling for step indicators with refined border and color adjustments.
    • Enhanced the appearance of active, completed, and standard elements to provide a more cohesive and visually distinct user interface.
    • Adjusted background and icon colors for completed nodes to improve contrast and visibility.
    • Modified text color for unselected items to enhance readability.
    • Improved calendar view styling by utilizing CSS variables for borders and background colors.
    • Standardized milestone flag text colors for better visual consistency across components.
    • Removed background colors from demo image components to streamline their appearance.
    • Eliminated borders from loading components for a cleaner look.
    • Introduced new CSS variables for hover and border colors in the calendar view.
    • Updated status colors for various milestones to enhance visual representation in the application.

Copy link

coderabbitai bot commented Mar 5, 2025

Walkthrough

This pull request updates CSS variable references in the steps component. In the index.less file, several color and border property variables for classes like .icon, .label, and .fixicons have been modified. The vars.less file now defines new values for background colors, icon colors, and text colors to align with a revised design scheme. Additional changes involve the removal of background colors in various Vue components, adjustments to the milestone component's icon styles, and modifications to the calendar view's border properties and custom properties.

Changes

File(s) Changes Summary
packages/theme/src/steps/index.less Updated CSS variable references for border and color properties: changes to the .icon, .label, and .fixicons classes to use new design tokens.
packages/theme/src/steps/vars.less Modified CSS custom properties for background colors, icon colors, active node, and text styling to reflect updated theming.
examples/sites/demos/pc/app/image/lazy-composition-api.vue Removed background-color from .demo-image__lazy class.
examples/sites/demos/pc/app/image/lazy.vue Removed background-color from .demo-image__lazy class.
examples/sites/demos/pc/app/loading/basic-usage-composition-api.vue Removed border property from #tiny-basic-loading1.
examples/sites/demos/pc/app/loading/basic-usage.vue Removed border property from #tiny-basic-loading1.
examples/sites/demos/pc/app/milestone/basic-usage.spec.ts Updated iconStyles array to standardize colors to rgb(25, 25, 25).
examples/sites/demos/pc/app/milestone/show-number.spec.ts Updated iconStyles array to standardize colors to rgb(25, 25, 25).
examples/sites/demos/pc/app/milestone/solid-style.spec.ts Updated iconStyles array to standardize colors to rgb(25, 25, 25).
packages/renderless/src/milestone/index.ts Updated color assignment logic in getMileIcon function for consistency.
packages/theme/src/calendar-view/index.less Updated border properties and background colors to use CSS variables for enhanced theming.
packages/theme/src/calendar-view/vars.less Added and modified CSS custom properties for radio button hover and date element border color.
packages/theme/src/milestone/vars.less Updated --tv-Milestone-text-color and --tv-Milestone-flag-desc-text-color to use a new color variable.

Possibly related PRs

  • feat:[steps,milestone] Support dark theme #2985: The changes in the main PR are related to those in the retrieved PR as both involve modifications to CSS variables and styles in the index.less and vars.less files for the steps component, specifically to support a dark theme.
  • feat(steps): [steps] Node line alignment #2116: The changes in the main PR are related to those in the retrieved PR as both modify the index.less and vars.less files within the steps component, specifically updating CSS properties and variables that affect the visual styling of the same elements.
  • fix(site): official website adapts to the dark mode. #2956: The changes in the main PR, which involve updates to CSS variable references and properties in the index.less file, are related to the modifications in the retrieved PR that also focus on CSS variables and styling adjustments for dark mode, particularly in how colors are defined and applied.

Suggested reviewers

  • zzcr

Poem

I'm a rabbit with a joyful beat,
Hopping along in code so neat.
Variables change, borders refined,
A theme refreshed, so well-aligned.
With CSS magic in every line,
I nibble on bugs until they're confined.
Happy hops and changes shine!

Warning

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

🔧 ESLint

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

packages/renderless/src/milestone/index.ts

Oops! Something went wrong! :(

ESLint: 8.57.1

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

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

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

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

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

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

examples/sites/demos/pc/app/milestone/show-number.spec.ts

Oops! Something went wrong! :(

ESLint: 8.57.1

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

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

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

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

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

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

examples/sites/demos/pc/app/milestone/solid-style.spec.ts

Oops! Something went wrong! :(

ESLint: 8.57.1

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

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

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

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

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

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

  • 2 others

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2fe8783 and b4991cf.

📒 Files selected for processing (14)
  • examples/sites/demos/pc/app/image/lazy-composition-api.vue (0 hunks)
  • examples/sites/demos/pc/app/image/lazy.vue (0 hunks)
  • examples/sites/demos/pc/app/loading/basic-usage-composition-api.vue (0 hunks)
  • examples/sites/demos/pc/app/loading/basic-usage.vue (0 hunks)
  • examples/sites/demos/pc/app/milestone/basic-usage-composition-api.vue (1 hunks)
  • examples/sites/demos/pc/app/milestone/basic-usage.spec.ts (1 hunks)
  • examples/sites/demos/pc/app/milestone/show-number.spec.ts (1 hunks)
  • examples/sites/demos/pc/app/milestone/solid-style.spec.ts (1 hunks)
  • packages/renderless/src/milestone/index.ts (1 hunks)
  • packages/theme/src/calendar-view/index.less (5 hunks)
  • packages/theme/src/calendar-view/vars.less (2 hunks)
  • packages/theme/src/milestone/vars.less (1 hunks)
  • packages/theme/src/steps/index.less (8 hunks)
  • packages/theme/src/steps/vars.less (6 hunks)
💤 Files with no reviewable changes (4)
  • examples/sites/demos/pc/app/image/lazy-composition-api.vue
  • examples/sites/demos/pc/app/loading/basic-usage-composition-api.vue
  • examples/sites/demos/pc/app/loading/basic-usage.vue
  • examples/sites/demos/pc/app/image/lazy.vue
🚧 Files skipped from review as they are similar to previous changes (10)
  • packages/renderless/src/milestone/index.ts
  • examples/sites/demos/pc/app/milestone/basic-usage.spec.ts
  • examples/sites/demos/pc/app/milestone/solid-style.spec.ts
  • examples/sites/demos/pc/app/milestone/show-number.spec.ts
  • examples/sites/demos/pc/app/milestone/basic-usage-composition-api.vue
  • packages/theme/src/calendar-view/vars.less
  • packages/theme/src/milestone/vars.less
  • packages/theme/src/steps/vars.less
  • packages/theme/src/calendar-view/index.less
  • packages/theme/src/steps/index.less
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: PR E2E Test (pnpm test:e2e3)

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions github-actions bot added the enhancement New feature or request (功能增强) label Mar 5, 2025
Copy link

Walkthrough

This PR introduces support for a dark theme in the steps component of the Tiny Vue library. The changes involve updating the color variables in the LESS files to adapt to the dark theme, ensuring that the component's appearance aligns with the new theme requirements.

Changes

Files Summary
packages/theme/src/steps/index.less Updated border and text color variables to support dark theme.
packages/theme/src/steps/vars.less Modified color variables for background, border, and text to adapt to dark theme.

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

🧹 Nitpick comments (2)
packages/theme/src/steps/vars.less (2)

99-99: Dark Theme – Advanced 'Doing' Node Background Color
The variable for the advanced guide's "doing" node background is now set to var(--tv-color-bg-3, #f0f0f0). Note that the fallback #f0f0f0 is quite light compared to the dark theme elements. Please double-check that this color choice creates the proper contrast and fits the overall dark theme design.


163-163: Dark Theme – Advanced Text Color Update
The advanced text color is updated to use var(--tv-color-text-inverse, #191919). Although the inverse variable is intended for dark themes, the fallback (#191919) remains a dark tone. It would be beneficial to confirm if this meets the design guidelines for readability on dark backgrounds.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4492296 and 2970293.

📒 Files selected for processing (2)
  • packages/theme/src/steps/index.less (3 hunks)
  • packages/theme/src/steps/vars.less (4 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: PR E2E Test (pnpm test:e2e3)
  • GitHub Check: PR Unit Test
🔇 Additional comments (6)
packages/theme/src/steps/vars.less (2)

29-29: Dark Theme – Completed Node Background Color
The background color for completed nodes has been updated to use var(--tv-color-text-inverse-black, #191919), which aligns well with the dark theme objective. Please verify that the fallback color (#191919) provides adequate contrast when paired with adjacent elements in dark mode.


53-53: Dark Theme – Completed Node Icon Color Update
The icon color for completed nodes now uses var(--tv-color-icon-inverse, #191919). This change is consistent with the dark theme aesthetics. Just ensure that the chosen fallback (#191919) harmonizes with the other dark accents of the component.

packages/theme/src/steps/index.less (4)

248-249: Icon Element Border Update
Within the .@{steps-prefix-cls}-icon block, the icon border is now defined as border: 1px solid var(--tv-Steps-node-done-border-color);. This update ensures consistency with the new color palette for completed nodes. Good work ensuring that the component styling references the updated theme variables.


877-879: Advanced Guide Label Color Adjustment
In the .label style within the advanced guide current item, the text color is now updated to var(--tv-Steps-line-doing-active-icon-color). This change appears to support the new dark theme color scheme. Please verify that the overall contrast remains optimal for readability.


1210-1213: Timeline – Process Current Icon Color Update
Within the .process-current .icon block, the icon color is updated (line 1212) to use var(--tv-Steps-line-doing-active-icon-color). This change is aligned with dark theme styling for active states. Confirm this visually to ensure consistency, especially in the timeline context.


1215-1217: Timeline – Fixicons Fill Color Updated
In the same timeline section, the fill property for .fixicons (line 1216) is now set to var(--tv-Steps-line-doing-active-icon-color). This ensures that the fill color on icons in the process current state is consistent with the updated dark theme palette.

@discreted66 discreted66 changed the title feat:[steps] Support dark them feat:[steps,loading,image,milstone] Support dark them Mar 5, 2025
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: 0

🧹 Nitpick comments (4)
packages/theme/src/calendar-view/vars.less (2)

23-25: Review Dark Theme Variable Assignments.
The new property --tv-CalendarView-radio-icon-hover-color is introduced with a value of var(--tv-color-bg), and the active inner background is updated to var(--tv-color-bg-3, #fff). Please verify that these choices provide the desired contrast and hover effect for dark theme users—especially since dark themes often require careful color balancing.


35-35: Confirm Date Border Color Usage.
The new variable --tv-CalendarView-date-border-color is set to var(--tv-color-border). Ensure that this value offers sufficient contrast in both light and dark themes for clear visual separation of the date element.

packages/theme/src/calendar-view/index.less (1)

52-54: Hover State Styling Validation.
Within the .tiny-radio-button__inner:hover block (line 52–54), the background color is now set to var(--tv-CalendarView-radio-icon-hover-color). Verify that this provides a clear and accessible hover effect for dark mode, matching the overall theme’s design guidelines.

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

13-78: Consider documenting theme adaptation in component comments.

While the implementation of dark theme support is solid, adding documentation comments about how the milestone component adapts to different themes would be beneficial for future maintainers. Consider adding brief notes about key theming considerations in the component's documentation.

Consider adding a comment block explaining theme adaptation near the beginning of the file:

.inject-Milestone-vars() {
+  // Theme adaptation:
+  // - Text colors use inverse-black variables to ensure proper contrast in dark themes
+  // - Background colors adapt based on the theme context
+  // - Icon colors standardized to match the current theme
+
  // 默认字号(不含旗子部分)
  --tv-Milestone-font-size: var(--tv-font-size-default, 14px);
  // doing状态文本色
  --tv-Milestone-doing-text-color: var(--tv-color-text-inverse-tint, #fff);
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d19e7a8 and 21876e0.

📒 Files selected for processing (13)
  • examples/sites/demos/pc/app/image/lazy-composition-api.vue (0 hunks)
  • examples/sites/demos/pc/app/image/lazy.vue (0 hunks)
  • examples/sites/demos/pc/app/loading/basic-usage-composition-api.vue (0 hunks)
  • examples/sites/demos/pc/app/loading/basic-usage.vue (0 hunks)
  • examples/sites/demos/pc/app/milestone/basic-usage.spec.ts (1 hunks)
  • examples/sites/demos/pc/app/milestone/show-number.spec.ts (1 hunks)
  • examples/sites/demos/pc/app/milestone/solid-style.spec.ts (1 hunks)
  • packages/renderless/src/milestone/index.ts (1 hunks)
  • packages/theme/src/calendar-view/index.less (5 hunks)
  • packages/theme/src/calendar-view/vars.less (2 hunks)
  • packages/theme/src/milestone/vars.less (1 hunks)
  • packages/theme/src/steps/index.less (4 hunks)
  • packages/theme/src/steps/vars.less (5 hunks)
💤 Files with no reviewable changes (4)
  • examples/sites/demos/pc/app/loading/basic-usage.vue
  • examples/sites/demos/pc/app/image/lazy.vue
  • examples/sites/demos/pc/app/loading/basic-usage-composition-api.vue
  • examples/sites/demos/pc/app/image/lazy-composition-api.vue
✅ Files skipped from review due to trivial changes (2)
  • examples/sites/demos/pc/app/milestone/basic-usage.spec.ts
  • packages/renderless/src/milestone/index.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • packages/theme/src/steps/vars.less
  • packages/theme/src/steps/index.less
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: PR E2E Test (pnpm test:e2e3)
🔇 Additional comments (12)
packages/theme/src/calendar-view/index.less (4)

24-24: Dynamic Border Color Integration.
The border on line 24 now uses var(--tv-CalendarView-date-border-color). This change promotes theme flexibility. Confirm that this dynamic approach works seamlessly across both dark and light themes.


27-27: Border-Bottom Removal Check.
The rule border-bottom: none; on line 27 has been added. Please double-check that removing the bottom border aligns with the intended design, particularly in dark theme contexts where contrast and separation are critical.


128-139: Consistent Border Application in Calendar Containers.
The use of var(--tv-CalendarView-date-border-color) for the top border (line 128) and bottom border of the list (line 139) enhances visual consistency. Ensure that these changes create uniform boundaries in both light and dark themes.


147-148: Refining List Item Borders.
The list items now use a right border defined as 1px solid var(--tv-CalendarView-date-border-color) (line 147), with the last item’s right border removed (lines 188–190). This strategy maintains a neat grid layout. Please verify that the visual separation remains effective in the dark theme implementation.

Also applies to: 188-190

examples/sites/demos/pc/app/milestone/show-number.spec.ts (1)

25-46:

❓ Verification inconclusive

Color standardization aligns with dark theme support.

The modification of icon colors to rgb(25, 25, 25) is consistent with the theming updates in this PR. This ensures that the milestone component's icons will display correctly in both light and dark themes. Note that one icon color (on line 33) remains rgb(255, 255, 255) as it appears to be for a special state (doing status).


🏁 Script executed:

#!/bin/bash
# Check if these color changes are consistent across other milestone test files
rg -l 'iconStyles.*color.*rgb\(25, 25, 25\)' examples/sites/demos/pc/app/milestone/

Length of output: 85


I'm going to run a more targeted search in the affected file so that we can better verify the usage of these color codes. The initial search using the pattern "iconStyles.*color.*rgb\(25, 25, 25\)" didn’t return any results—even though the file clearly shows explicit lines setting the icon colors—so I'll check directly for the color entries in the test file.

Please run the following shell script to verify the occurrences of these color definitions in the file examples/sites/demos/pc/app/milestone/show-number.spec.ts:

#!/bin/bash
echo "Occurrences of 'rgb(25, 25, 25)' in the file:"
rg -n "'color': 'rgb(25, 25, 25)'" examples/sites/demos/pc/app/milestone/show-number.spec.ts

echo "Occurrences of 'rgb(255, 255, 255)' in the file:"
rg -n "'color': 'rgb(255, 255, 255)'" examples/sites/demos/pc/app/milestone/show-number.spec.ts

Once you’ve confirmed that the file contains the entries as shown in the snippet—with most icons using 'rgb(25, 25, 25)' for standardized theming and one icon retaining 'rgb(255, 255, 255)' for its special state—please manually verify that this pattern is intentional and that no other test files need updating.


Review Update: Verify Color Standardization in Milestone Tests

  • The milestone test file now uses 'rgb(25, 25, 25)' for icons to support the dark theme, which aligns with the theming updates in this PR.
  • One icon remains 'rgb(255, 255, 255)' to indicate a special (doing) state.
  • Action required: Since the automated search returned no output, please manually verify this behavior in all milestone test files to ensure consistency.
examples/sites/demos/pc/app/milestone/solid-style.spec.ts (2)

25-46: Color standardization consistent with dark theme implementation.

The changes to icon colors (to rgb(25, 25, 25)) match the updates in other milestone test files, ensuring consistency across different test cases. Again, the 'doing' state (line 33) correctly maintains its unique white color for proper visibility.


94-96:

❓ Verification inconclusive

Verify background color compatibility with dark theme.

This test is checking for a specific background color (rgb(179, 214, 255)) after clicking a button. Please ensure this background color is still appropriate in dark theme context, as it might need to be adjusted if it doesn't provide sufficient contrast in dark mode.


🏁 Script executed:

#!/bin/bash
# Check if there are corresponding dark theme variables for this blue background color
rg -A 1 "bg-color.*179, 214, 255" packages/theme/src/ || rg -A 1 "B3D6FF" packages/theme/src/

Length of output: 92


Action Required: Manual Verification of Dark Theme Support

The test currently asserts that node icons use the background color rgb(179, 214, 255). However, our shell check did not locate any corresponding dark theme variables in the repository. Please manually verify that this background color provides sufficient contrast in the dark theme. Specifically, review theming configurations within the packages/theme/src/ directory to confirm whether a different color or an adjustment might be needed for dark mode.

  • Location: examples/sites/demos/pc/app/milestone/solid-style.spec.ts (lines 94-96)
  • Next Step: Manually inspect dark mode configuration files in packages/theme/src/ or consult with the design team if necessary.
packages/theme/src/milestone/vars.less (5)

65-65: Updated text color variable for dark theme support.

Replacing --tv-color-text-active-1 with --tv-color-text-inverse-black for the milestone text color is appropriate for implementing dark theme support. This change ensures the text will adapt properly between light and dark themes while maintaining the same fallback color.


71-71: Updated description text color variable for theme consistency.

Similar to the previous change, replacing --tv-color-text-active-1 with --tv-color-text-inverse-black for the flag description ensures consistent text appearance across themes. This modification helps maintain readability in both light and dark modes.


67-68:

❓ Verification inconclusive

Verify flag background color in dark theme.

The flag background is set to --tv-color-bg, #f5f5f5, which is a light gray. Ensure this color variable properly adapts in dark theme to maintain readability and visual distinction.


🏁 Script executed:

#!/bin/bash
# Check how the base background color is handled in dark theme
rg -A 1 "color-bg: " packages/theme/src/common/ || rg -A 1 "color-bg," packages/theme/src/common/

Length of output: 230


Dark Theme Flag Background – Manual Verification Required

The original check couldn’t locate a packages/theme/src/common directory, so we couldn’t verify how the dark theme overrides the --tv-color-bg variable automatically. Please ensure that a dark theme override exists for this variable—perhaps in another file (e.g. a dedicated dark theme variables file such as packages/theme/src/dark/vars.less)—to guarantee that the flag background adapts appropriately in dark mode.

  • The script’s error indicates that the targeted directory isn’t present.
  • Double-check your theme structure to confirm whether dark theme settings are managed elsewhere.
  • Verify that the light gray fallback (#f5f5f5) is suitably overridden in dark mode for readability.

37-38:

❓ Verification inconclusive

Verify completed line background color compatibility with dark theme.

The completed line background color is set to --tv-color-bg-primary, #191919, which is nearly black. In dark theme contexts, this might not provide sufficient contrast. Consider confirming whether this works well with dark backgrounds or if it needs a contrasting color variable.


🏁 Script executed:

#!/bin/bash
# Check if there are corresponding dark theme variables for line background
rg -A 1 "color-bg-primary.*#191919" packages/theme/src/common/

Length of output: 131


Action Required: Verify Dark Theme Contrast for Completed Line Background

The completed line background is set using --tv-color-bg-primary with a fallback of #191919 (nearly black). However, our initial search in packages/theme/src/common/ did not produce any results—likely because that directory doesn't exist or dark theme variables are defined elsewhere. Please manually verify where the dark theme variables (or equivalent contrasting definitions) are located in your codebase and confirm that the chosen color provides sufficient contrast in dark mode contexts. If the dark theme configuration is located in another directory, update the search accordingly; otherwise, consider using a more contrasting variable or color.

  • File under review: packages/theme/src/milestone/vars.less (Lines 37-38)
  • Next steps: Manually check other directories for dark theme variable definitions or re-run targeted searches in the repository to locate these settings.

49-50:

❓ Verification inconclusive

Verify completed node background contrast in dark theme.

The completed node background is set to --tv-color-bg-active-secondary, #ffffff (white). While this provides good contrast in light themes, ensure it adapts appropriately in dark themes to maintain sufficient contrast without being too bright.


🏁 Script executed:

#!/bin/bash
# Check how the active-secondary background color is handled in dark theme
rg -A 1 "color-bg-active-secondary" packages/theme/src/

Length of output: 52567


ACTION: Verify Completed Node Background Contrast in Dark Theme

The milestone’s completed background color is defined as
--tv-Milestone-status-completed-bg-color: var(--tv-color-bg-active-secondary, #ffffff);
In light themes the fallback (#ffffff) ensures proper contrast, but in dark themes the variable resolves to the value set in packages/theme/src/base/dark-theme.less—which is rgba(255, 255, 255, 0) (fully transparent). Please verify that using a transparent background against the dark theme’s underlying colors still achieves the intended contrast. If the current contrast is insufficient or visually inconsistent, consider updating the dark theme’s variable value accordingly.

@discreted66 discreted66 force-pushed the darkTheme3 branch 4 times, most recently from ad74fad to 2fe8783 Compare March 6, 2025 01:11
@zzcr zzcr merged commit 929995d into opentiny:dev Mar 7, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request (功能增强)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants