Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat(wizard): [wizard] Add new specification wizard component #2000

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

Merged
merged 4 commits into from
Aug 29, 2024

Conversation

chenxi-20
Copy link
Collaborator

@chenxi-20 chenxi-20 commented Aug 28, 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

    • Enhanced status and content properties for workflow representation in the wizard component.
    • Introduced new theme properties for the wizard, allowing for better customization.
    • Added new CSS variables for improved styling options across various states in the wizard interface.
    • Introduced a new theme configuration for user contact roles, enhancing styling flexibility.
  • Bug Fixes

    • Improved visual clarity and layout adjustments in the wizard component.
  • Documentation

    • Updated styling conventions to utilize CSS variables for maintainability.
  • Refactor

    • Enhanced the wizard component's structure for better modularity and responsiveness.

@chenxi-20 chenxi-20 added the enhancement New feature or request (功能增强) label Aug 28, 2024
Copy link

coderabbitai bot commented Aug 28, 2024

Warning

Rate limit exceeded

@chenxi-20 has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 15 minutes and 14 seconds before requesting another review.

How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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.

Commits

Files that changed from the base of the PR and between ff2e1c6 and af97888.

Walkthrough

The changes involve updates to the status and content properties of various objects in Vue components, enhancements to CSS mixins and variables for improved styling, and the introduction of new theme configurations. These modifications refine the visual presentation and functionality of components, particularly within a wizard interface, ensuring consistency and flexibility in design.

Changes

Files Change Summary
examples/sites/demos/pc/app/wizard/vertical-composition-api.vue
examples/sites/demos/pc/app/wizard/vertical.vue
Updated status and content properties for objects '一级审批' and '完成'. Status changed from 'wait' to 'doing' for '一级审批' and from 'doing' to 'wait' for '完成'.
examples/sites/demos/pc/app/wizard/page-guide.vue Modified name property in dataSet to duplicate the string value for '出差信息填写'.
examples/sites/demos/pc/app/wizard/time-line-flow.vue Changed status of '主管审批' from 'ready' to 'doing', indicating it is now in progress.
examples/sites/demos/pc/app/wizard/time-line-flow-composition-api.vue Updated status of '主管审批' from 'ready' to 'doing', indicating active engagement.
packages/theme/src/mixins/wizard.less Modified wizard-icon-color mixin to accept an additional @bordercolor parameter for enhanced styling flexibility.
packages/theme/src/wizard/index.less Introduced new variable @button-prefix-cls and updated several properties to use CSS variables, enhancing maintainability and layout adjustments.
packages/theme/src/wizard/smb-theme.js New file created to export tinyWizardSmbTheme object for theme configuration, utilizing CSS variables for dynamic styling.
packages/theme/src/wizard/vars.less Added multiple new CSS custom properties for various visual attributes related to the wizard component's states and layout.
packages/theme/src/user-contact/index.less Changed margin-left property to use a CSS variable for dynamic adjustment in user contact theme styling.
packages/theme/src/user-contact/smb-theme.js New file created to export tinyUserContactSmbTheme object for user contact theme configuration, utilizing CSS variables for styling.
packages/theme/src/user-contact/vars.less Introduced a new CSS variable for the left margin of the user contact role description, enhancing layout control.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant VueComponent
    participant ThemeManager

    User->>VueComponent: Interacts with wizard
    VueComponent->>ThemeManager: Request updated styling
    ThemeManager-->>VueComponent: Provide new theme variables
    VueComponent->>User: Render updated wizard interface
Loading

🐇 In the meadow, changes bloom,
A wizard's dance dispels the gloom.
Status shifts like clouds above,
With colors bright, we celebrate love.
CSS variables, oh what a sight!
In this code, our joy takes flight! 🌼


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>.
    • 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 generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @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.

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

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between ff46d88 and f38d8a8.

Files selected for processing (7)
  • examples/sites/demos/pc/app/wizard/vertical-composition-api.vue (1 hunks)
  • examples/sites/demos/pc/app/wizard/vertical.vue (1 hunks)
  • packages/theme/src/mixins/wizard.less (1 hunks)
  • packages/theme/src/upload-list/smb-theme.js (1 hunks)
  • packages/theme/src/wizard/index.less (10 hunks)
  • packages/theme/src/wizard/smb-theme.js (1 hunks)
  • packages/theme/src/wizard/vars.less (2 hunks)
Additional comments not posted (29)
packages/theme/src/mixins/wizard.less (1)

13-16: LGTM!

The addition of the @bordercolor parameter enhances the flexibility of the mixin, allowing for more precise styling of wizard components.

The code changes are approved.

examples/sites/demos/pc/app/wizard/vertical-composition-api.vue (2)

31-33: LGTM!

The changes correctly reflect the shift in the workflow, and the addition of the content property enhances the information provided for '一级审批'.

The code changes are approved.


37-37: LGTM!

The changes correctly reflect the shift in the workflow, indicating that '完成' is now pending.

The code changes are approved.

examples/sites/demos/pc/app/wizard/vertical.vue (2)

36-38: LGTM!

The changes correctly reflect the shift in the workflow, and the addition of the content property enhances the information provided for '一级审批'.

The code changes are approved.


42-42: LGTM!

The changes correctly reflect the shift in the workflow, indicating that '完成' is now pending.

The code changes are approved.

packages/theme/src/upload-list/smb-theme.js (2)

16-16: LGTM!

The CSS variable for text color is correctly defined.

The code changes are approved.


17-17: LGTM!

The new CSS variable for icon color is correctly defined.

The code changes are approved.

packages/theme/src/wizard/smb-theme.js (1)

1-32: LGTM!

The new theme object for the wizard component is correctly defined with various CSS variables.

The code changes are approved.

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

Line range hint 18-91: LGTM!

The CSS custom properties for the wizard component are correctly defined.

The code changes are approved.

packages/theme/src/wizard/index.less (20)

18-18: LGTM!

The introduction of @button-prefix-cls enhances modularity and maintainability.

The code changes are approved.


30-31: Verify the visual impact of alignment change.

Changing the alignment from center to flex-start will affect the visual layout of the wizard interface. Ensure this change aligns with the intended design.

Please verify the visual impact of this change.


32-43: LGTM!

The addition of nested selectors for &-item enhances the visual distinction of the first and last children within the wizard steps.

The code changes are approved.


52-55: LGTM!

Utilizing CSS variables instead of hardcoded values enhances flexibility and maintainability.

The code changes are approved.


64-69: LGTM!

Utilizing CSS variables instead of hardcoded values enhances flexibility and maintainability.

The code changes are approved.


83-85: LGTM!

Utilizing CSS variables instead of hardcoded values enhances flexibility and maintainability.

The code changes are approved.


107-109: LGTM!

Utilizing CSS variables instead of hardcoded values enhances flexibility and maintainability.

The code changes are approved.


111-113: LGTM!

Utilizing CSS variables instead of hardcoded values enhances flexibility and maintainability.

The code changes are approved.


117-119: LGTM!

Utilizing CSS variables instead of hardcoded values enhances flexibility and maintainability.

The code changes are approved.


125-132: LGTM!

Utilizing CSS variables instead of hardcoded values enhances flexibility and maintainability.

The code changes are approved.


133-136: LGTM!

Utilizing CSS variables instead of hardcoded values enhances flexibility and maintainability.

The code changes are approved.


139-142: LGTM!

Utilizing CSS variables instead of hardcoded values enhances flexibility and maintainability.

The code changes are approved.


147-149: LGTM!

Utilizing CSS variables instead of hardcoded values enhances flexibility and maintainability.

The code changes are approved.


214-221: LGTM!

Utilizing CSS variables instead of hardcoded values enhances flexibility and maintainability.

The code changes are approved.


226-226: LGTM!

Utilizing CSS variables instead of hardcoded values enhances flexibility and maintainability.

The code changes are approved.


241-245: LGTM!

Utilizing CSS variables instead of hardcoded values enhances flexibility and maintainability.

The code changes are approved.


263-265: LGTM!

Utilizing CSS variables instead of hardcoded values enhances flexibility and maintainability.

The code changes are approved.


268-272: LGTM!

Utilizing CSS variables instead of hardcoded values enhances flexibility and maintainability.

The code changes are approved.


325-335: LGTM!

Utilizing CSS variables instead of hardcoded values enhances flexibility and maintainability.

The code changes are approved.


352-362: LGTM!

Utilizing CSS variables instead of hardcoded values enhances flexibility and maintainability.

The code changes are approved.

@chenxi-20 chenxi-20 force-pushed the fix/wizard-20240824 branch from f38d8a8 to 3d5eb5b Compare August 28, 2024 09:16
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

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between f38d8a8 and 3d5eb5b.

Files selected for processing (5)
  • examples/sites/demos/pc/app/wizard/vertical-composition-api.vue (1 hunks)
  • examples/sites/demos/pc/app/wizard/vertical.vue (1 hunks)
  • packages/theme/src/wizard/index.less (10 hunks)
  • packages/theme/src/wizard/smb-theme.js (1 hunks)
  • packages/theme/src/wizard/vars.less (2 hunks)
Files skipped from review due to trivial changes (1)
  • packages/theme/src/wizard/smb-theme.js
Files skipped from review as they are similar to previous changes (4)
  • examples/sites/demos/pc/app/wizard/vertical-composition-api.vue
  • examples/sites/demos/pc/app/wizard/vertical.vue
  • packages/theme/src/wizard/index.less
  • packages/theme/src/wizard/vars.less

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

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 3d5eb5b and 44bc6bc.

Files selected for processing (8)
  • examples/sites/demos/pc/app/wizard/page-guide.vue (1 hunks)
  • examples/sites/demos/pc/app/wizard/time-line-flow.vue (1 hunks)
  • packages/theme/src/user-contact/index.less (1 hunks)
  • packages/theme/src/user-contact/smb-theme.js (1 hunks)
  • packages/theme/src/user-contact/vars.less (1 hunks)
  • packages/theme/src/wizard/index.less (11 hunks)
  • packages/theme/src/wizard/smb-theme.js (1 hunks)
  • packages/theme/src/wizard/vars.less (2 hunks)
Files skipped from review due to trivial changes (4)
  • examples/sites/demos/pc/app/wizard/time-line-flow.vue
  • packages/theme/src/user-contact/index.less
  • packages/theme/src/user-contact/smb-theme.js
  • packages/theme/src/user-contact/vars.less
Files skipped from review as they are similar to previous changes (3)
  • packages/theme/src/wizard/index.less
  • packages/theme/src/wizard/smb-theme.js
  • packages/theme/src/wizard/vars.less
Additional comments not posted (1)
examples/sites/demos/pc/app/wizard/page-guide.vue (1)

16-16: Verify the intention behind the duplicated string.

The name property has been modified from '出差信息填写' to '出差信息填写出差信息填写'. Ensure that this change is intentional and verify its impact on any functionality that relies on the name property.

Please confirm if this change is intentional and if it affects any functionality.

@chenxi-20 chenxi-20 force-pushed the fix/wizard-20240824 branch from 44bc6bc to d555630 Compare August 29, 2024 08:00
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

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 44bc6bc and d555630.

Files selected for processing (8)
  • examples/sites/demos/pc/app/wizard/time-line-flow-composition-api.vue (1 hunks)
  • examples/sites/demos/pc/app/wizard/time-line-flow.vue (1 hunks)
  • packages/theme/src/user-contact/index.less (1 hunks)
  • packages/theme/src/user-contact/smb-theme.js (1 hunks)
  • packages/theme/src/user-contact/vars.less (1 hunks)
  • packages/theme/src/wizard/index.less (11 hunks)
  • packages/theme/src/wizard/smb-theme.js (1 hunks)
  • packages/theme/src/wizard/vars.less (2 hunks)
Files skipped from review due to trivial changes (1)
  • packages/theme/src/user-contact/smb-theme.js
Files skipped from review as they are similar to previous changes (6)
  • examples/sites/demos/pc/app/wizard/time-line-flow.vue
  • packages/theme/src/user-contact/index.less
  • packages/theme/src/user-contact/vars.less
  • packages/theme/src/wizard/index.less
  • packages/theme/src/wizard/smb-theme.js
  • packages/theme/src/wizard/vars.less
Additional comments not posted (1)
examples/sites/demos/pc/app/wizard/time-line-flow-composition-api.vue (1)

40-40: LGTM! But verify the status usage in the codebase.

The status change from 'ready' to 'doing' for the object with the name '主管审批' is correctly implemented. However, ensure that all parts of the application that depend on this status are updated accordingly.

The code changes are approved.

Run the following script to verify the status usage:

Verification successful

Status Change Verified: No Issues Found

The change from 'ready' to 'doing' in the file examples/sites/demos/pc/app/wizard/time-line-flow-composition-api.vue is consistent with the usage of these status values across the codebase. There are no dependencies or logic that are negatively impacted by this change.

  • The status 'doing' is used in multiple files, indicating it is a standard status value.
  • No issues were found related to this status change.
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify all occurrences of the status 'ready' and 'doing' in the codebase.

# Test: Search for the status usage. Expect: Only occurrences of the new status.
rg --type vue --type js --type jsx --type ts --type tsx -A 5 $'status: \'ready\''
rg --type vue --type js --type jsx --type ts --type tsx -A 5 $'status: \'doing\''

Length of output: 229


Script:

#!/bin/bash
# Description: Verify all occurrences of the status 'ready' and 'doing' in the codebase.

# Test: Search for the status usage without specifying the vue file type.
rg -A 5 $'status: \'ready\''
rg -A 5 $'status: \'doing\''

Length of output: 42644

@chenxi-20 chenxi-20 force-pushed the fix/wizard-20240824 branch from d555630 to 5e8d581 Compare August 29, 2024 08:13
@chenxi-20 chenxi-20 force-pushed the fix/wizard-20240824 branch from 5e8d581 to ff2e1c6 Compare August 29, 2024 08:37
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

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between d555630 and ff2e1c6.

Files selected for processing (7)
  • examples/sites/demos/pc/app/wizard/vertical.spec.ts (1 hunks)
  • packages/theme/src/user-contact/index.less (1 hunks)
  • packages/theme/src/user-contact/smb-theme.js (1 hunks)
  • packages/theme/src/user-contact/vars.less (1 hunks)
  • packages/theme/src/wizard/index.less (11 hunks)
  • packages/theme/src/wizard/smb-theme.js (1 hunks)
  • packages/theme/src/wizard/vars.less (2 hunks)
Files skipped from review due to trivial changes (2)
  • examples/sites/demos/pc/app/wizard/vertical.spec.ts
  • packages/theme/src/wizard/smb-theme.js
Files skipped from review as they are similar to previous changes (4)
  • packages/theme/src/user-contact/index.less
  • packages/theme/src/user-contact/smb-theme.js
  • packages/theme/src/user-contact/vars.less
  • packages/theme/src/wizard/vars.less
Additional comments not posted (30)
packages/theme/src/wizard/index.less (30)

18-18: LGTM!

The introduction of @button-prefix-cls enhances modularity and maintainability.


30-31: Verify the visual impact of alignment change.

The align-items property is changed from center to flex-start. Ensure that the visual layout of the wizard steps is as expected.


32-37: LGTM!

The nested selector for &-item:first-child introduces specific styles for the first child, enhancing visual distinction.


39-43: LGTM!

The nested selector for &-item:last-child introduces specific styles for the last child, enhancing visual distinction.


52-55: LGTM!

The margin-top property is changed to use a CSS variable, enhancing flexibility and maintainability.


64-66: LGTM!

The margin-top property is changed to use a CSS variable, enhancing flexibility and maintainability.


67-69: LGTM!

The margin-left property is changed to use a CSS variable, enhancing flexibility and maintainability.


79-81: LGTM!

The wizard-line-color property is changed to use a CSS variable, enhancing flexibility and maintainability.


83-85: LGTM!

The font-weight property is changed to use a CSS variable, enhancing flexibility and maintainability.


90-91: LGTM!

The wizard-icon-color property is changed to use CSS variables, enhancing flexibility and maintainability.


214-216: LGTM!

The background property is changed to use a CSS variable, enhancing flexibility and maintainability.


220-221: LGTM!

The height property is changed to use a CSS variable, enhancing flexibility and maintainability.


221-222: LGTM!

The top property is changed to use a CSS variable, enhancing flexibility and maintainability.


224-226: LGTM!

The wizard-line-color property is changed to use a CSS variable, enhancing flexibility and maintainability.


137-138: LGTM!

The top property is changed to use a CSS variable, enhancing flexibility and maintainability.


140-141: LGTM!

The color property is changed to use a CSS variable, enhancing flexibility and maintainability.


145-146: LGTM!

The color property is changed to use a CSS variable, enhancing flexibility and maintainability.


146-147: LGTM!

The font-size property is changed to use a CSS variable, enhancing flexibility and maintainability.


147-148: LGTM!

The margin-top property is changed to use a CSS variable, enhancing flexibility and maintainability.


153-155: LGTM!

The position property is changed to use a CSS variable, enhancing flexibility and maintainability.


164-167: LGTM!

The fill property is changed to use a CSS variable, enhancing flexibility and maintainability.


167-168: LGTM!

The width property is changed to use a CSS variable, enhancing flexibility and maintainability.


168-169: LGTM!

The height property is changed to use a CSS variable, enhancing flexibility and maintainability.


172-173: LGTM!

The background property is changed to use a CSS variable, enhancing flexibility and maintainability.


177-178: LGTM!

The width property is changed to use a CSS variable, enhancing flexibility and maintainability.


178-179: LGTM!

The height property is changed to use a CSS variable, enhancing flexibility and maintainability.


117-118: LGTM!

The height property is changed to use a CSS variable, enhancing flexibility and maintainability.


118-119: LGTM!

The width property is changed to use a CSS variable, enhancing flexibility and maintainability.


119-120: LGTM!

The top property is changed to use a CSS variable, enhancing flexibility and maintainability.


Line range hint 427-429: LGTM!

The fill and background properties are changed to use CSS variables, enhancing flexibility and maintainability.

@zzcr zzcr merged commit 9c10a1b into dev Aug 29, 2024
3 checks passed
@kagol kagol deleted the fix/wizard-20240824 branch November 4, 2024 03:56
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.

2 participants