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(steps): resolve text overflow no tooltip #1629

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

Huangyilin19
Copy link
Collaborator

@Huangyilin19 Huangyilin19 commented May 17, 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

    • Introduced tooltips for step labels to provide additional information.
  • Bug Fixes

    • Corrected step statuses and names for better clarity and accuracy.
  • Style

    • Updated step label styling for improved text truncation and alignment.
  • Refactor

    • Enhanced the structure and rendering logic of step labels and status indicators.
  • Chores

    • Added a new custom property for horizontal margin in step labels for better layout control.

Copy link

coderabbitai bot commented May 17, 2024

Walkthrough

The recent updates focus on enhancing the user experience in the step components across multiple files. Key changes include renaming steps for clarity, updating statuses, improving label styling with flexbox and text truncation, and integrating tooltips for better information display. Additionally, a new custom property for label margins has been introduced to ensure consistent spacing.

Changes

File Path Change Summary
...advanced-steps-composition-api.vue Renamed a step from 'BOQ Info' to 'BOQ Info. So long that overflow' while maintaining its 'done' status.
...advanced-steps.vue Updated step names and statuses, including a longer description and status change from 'done' to 'doing'.
.../theme/src/steps/index.less Adjusted label styling with flexbox properties, added text truncation, and commented out absolute positioning for the dot indicator.
.../theme/src/steps/vars.less Introduced a new custom property --ti-steps-label-margin-horizontal for horizontal margin of step labels.
.../steps/src/pc/pc-standard.vue Refactored label and status indicator rendering, added TinyTooltip component for tooltips, and conditional status icon rendering.

🐇
In the realm of code so fine,
Steps now align with flexbox's line.
Tooltips dance with grace anew,
Labels trimmed, clear in view.
With margins set just right,
Our steps shine bright, a coder’s delight.
🌟


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.

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 as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration 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

[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

Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between 3f8001a and 83de0f9.
Files selected for processing (5)
  • examples/sites/demos/pc/app/steps/advanced-steps-composition-api.vue (1 hunks)
  • examples/sites/demos/pc/app/steps/advanced-steps.vue (1 hunks)
  • packages/theme/src/steps/index.less (3 hunks)
  • packages/theme/src/steps/vars.less (1 hunks)
  • packages/vue/src/steps/src/pc/pc-standard.vue (2 hunks)
Files skipped from review due to trivial changes (4)
  • examples/sites/demos/pc/app/steps/advanced-steps-composition-api.vue
  • examples/sites/demos/pc/app/steps/advanced-steps.vue
  • packages/theme/src/steps/index.less
  • packages/theme/src/steps/vars.less
Additional comments not posted (2)
packages/vue/src/steps/src/pc/pc-standard.vue (2)

15-22: The integration of tiny-tooltip for handling text overflow is well implemented.


36-36: The import of ToolTip is correctly added to support the new tooltip functionality.

import { iconRefres, iconYes } from '@opentiny/vue-icon'

export default defineComponent({
emits: ['click'],
components: {
TinyTooltip: ToolTip,
Copy link

Choose a reason for hiding this comment

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

Correct the registration of IconRefres and IconYes components.

-    IconRefres: iconRefres(),
-    IconYes: iconYes()
+    IconRefres: iconRefres,
+    IconYes: iconYes

This change ensures that the components are correctly registered without invoking them as functions.


Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
TinyTooltip: ToolTip,
TinyTooltip: ToolTip,
IconRefres: iconRefres,
IconYes: iconYes

@GaoNeng-wWw GaoNeng-wWw added the bug Something isn't working label May 18, 2024
Comment on lines +1045 to +1048
// padding: 0;
// right: 0;
// top: 50%;
// transform: translateY(-50%);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
// padding: 0;
// right: 0;
// top: 50%;
// transform: translateY(-50%);

这一段也许删掉会更好

display: flex;
position: absolute;
// position: absolute;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
// position: absolute;

这一段也许删掉会更好

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.

None yet

2 participants