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: add ellipsis-text component #4019

Merged
merged 23 commits into from
Aug 9, 2024
Merged

Conversation

wangjue666
Copy link
Collaborator

@wangjue666 wangjue666 commented Aug 3, 2024

添加组件路由

Summary by CodeRabbit

  • New Features

    • Added localization support for component titles in both English and Chinese, enhancing accessibility.
    • Introduced a new routing module for a component-based page in the application.
    • Added routes for component demos, improving application organization and user experience.
    • Established a new component for visually representing password strength, enhancing user experience in secure password input.
    • Introduced a tooltip component for customizable content display, improving user interaction.
    • Added an ellipsis text component to manage text overflow and enhance UI clarity.
    • Enhanced tooltip customization options with new style properties.
    • Added a new longText data constant to showcase project features.
    • Released a new component for managing text overflow with an optional tooltip, significantly improving user experience.
  • Improvements

    • Enhanced the formatting and organization of localization JSON files for better readability.

Copy link

changeset-bot bot commented Aug 3, 2024

⚠️ No Changeset found

Latest commit: 6d80142

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

coderabbitai bot commented Aug 3, 2024

Walkthrough

The recent updates enhance the application's localization, user experience, and modularity. New sections for examples in both English and Chinese improve JSON clarity. A routing module enables access to components, including a password strength meter and ellipsis text demos. Additionally, customizable tooltip and text overflow components enhance user interaction, collectively expanding the application's capabilities and accessibility.

Changes

File Path Change Summary
.../locales/langs/en-US.json, .../locales/langs/zh-CN.json Reformatted for readability; added "examples" sections for localization in both English and Chinese.
.../router/routes/modules/examples.ts New routing module for "Examples" page with child route for "Ellipsis Demo."
.../views/examples/strength-meter/index.vue, .../views/examples/ellipsis/index.vue Introduced components for password strength meter and ellipsis text features, enhancing interactivity.
.../components/EllipsisText/Tooltip.vue, .../components/EllipsisText/ellipsis-text.vue New tooltip component and text overflow handler with customizable features for improved user experience.
.../components/EllipsisText/index.ts Module exports for EllipsisText component enhancing modularity.
.../views/examples/ellipsis/data.ts Added longText constant describing the "Vben Admin" project.
.../@core/ui-kit/shadcn-ui/src/components/tooltip/tooltip.vue Introduced optional contentStyle prop for tooltip customization.

Poem

🐇 In fields of code, where bunnies play,
New titles bloom, brightening the way.
With routes now clear and styles so neat,
We hop with glee, oh what a treat!
Let’s celebrate change with a joyful cheer,
For each little update brings us near! 🌼


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 as 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.

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

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
Contributor

@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

Outside diff range, codebase verification and nitpick comments (1)
apps/web-antd/src/locales/langs/zh-CN.json (1)

60-61: The new key "comp" is not utilized in the codebase.

The key "comp" defined in the localization files (zh-CN.json and en-US.json) is not referenced in any JavaScript or TypeScript files.

  • Ensure that the new key "comp" is properly integrated and utilized in the codebase.
Analysis chain

LGTM! Verify the usage of the new key in the codebase.

The new key-value pair for component routing is correctly formatted and consistent with the existing structure.

However, ensure that the new key "comp" is properly utilized in the codebase.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the usage of the new key "comp" in the codebase.

# Test: Search for the key usage. Expect: Occurrences of the new key in the codebase.
rg --type json -A 5 $'"comp"'

Length of output: 562


Script:

#!/bin/bash
# Description: Verify the usage of the new key "comp" in JavaScript and TypeScript files.

# Test: Search for the key usage. Expect: Occurrences of the new key in the codebase.
rg --type js,ts 'comp'

Length of output: 52


Script:

#!/bin/bash
# Description: Verify the usage of the new key "comp" in JavaScript files.

# Test: Search for the key usage. Expect: Occurrences of the new key in the codebase.
rg --type js 'comp'

Length of output: 51307


Script:

#!/bin/bash
# Description: Verify the usage of the new key "comp" in TypeScript files.

# Test: Search for the key usage. Expect: Occurrences of the new key in the codebase.
rg --type ts 'comp'

Length of output: 20878

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between d3ed675 and b3780c1.

Files selected for processing (3)
  • apps/web-antd/src/locales/langs/en-US.json (2 hunks)
  • apps/web-antd/src/locales/langs/zh-CN.json (1 hunks)
  • apps/web-antd/src/router/routes/modules/comp.ts (1 hunks)
Files skipped from review due to trivial changes (2)
  • apps/web-antd/src/locales/langs/en-US.json
  • apps/web-antd/src/router/routes/modules/comp.ts

@wangjue666 wangjue666 marked this pull request as draft August 3, 2024 04:28
@wangjue666 wangjue666 marked this pull request as ready for review August 3, 2024 06:13
Copy link
Contributor

@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 b3780c1 and 3c24632.

Files selected for processing (3)
  • apps/web-antd/src/locales/langs/en-US.json (2 hunks)
  • apps/web-antd/src/locales/langs/zh-CN.json (1 hunks)
  • apps/web-antd/src/router/routes/modules/demos.ts (1 hunks)
Files skipped from review due to trivial changes (2)
  • apps/web-antd/src/locales/langs/en-US.json
  • apps/web-antd/src/locales/langs/zh-CN.json
Additional comments not posted (2)
apps/web-antd/src/router/routes/modules/demos.ts (2)

170-179: LGTM! The new route entry is correctly defined.

The new route entry for component demos is consistent with the existing routing structure.


170-179: Verify the existence of the localized title key.

Ensure that the key page.demos.comp.title exists in the localization files to avoid runtime errors.

@likui628 likui628 requested review from likui628 and removed request for likui628 August 3, 2024 06:55
likui628
likui628 previously approved these changes Aug 3, 2024
@likui628 likui628 requested review from likui628 and removed request for likui628 August 3, 2024 07:12
@anncwb
Copy link
Collaborator

anncwb commented Aug 4, 2024

加个菜单:示例(examples),跟演示同级。把这些组件相关的都放里面去应该好点。演示下面后面菜单层级应该会挺多

Copy link
Contributor

@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 3c24632 and ffe11de.

Files selected for processing (3)
  • apps/web-antd/src/locales/langs/en-US.json (2 hunks)
  • apps/web-antd/src/locales/langs/zh-CN.json (1 hunks)
  • apps/web-antd/src/router/routes/modules/examples.ts (1 hunks)
Files skipped from review as they are similar to previous changes (2)
  • apps/web-antd/src/locales/langs/en-US.json
  • apps/web-antd/src/locales/langs/zh-CN.json
Additional comments not posted (3)
apps/web-antd/src/router/routes/modules/examples.ts (3)

1-5: Imports are correct and necessary.

The import statements for RouteRecordRaw, BasicLayout, and $t are appropriate and required for the route configuration.


6-19: Route configuration looks good.

The route configuration for the "Examples" section is correctly set up with the BasicLayout component, appropriate metadata, name, and path. The empty children array is fine for now but consider adding sub-routes if needed in the future.


21-21: Export statement is correct.

The export statement correctly exports the routes array as the default export.

likui628
likui628 previously approved these changes Aug 5, 2024
@vince292007 vince292007 closed this Aug 5, 2024
@vince292007 vince292007 reopened this Aug 5, 2024
vince292007
vince292007 previously approved these changes Aug 5, 2024
@vince292007
Copy link
Collaborator

@wangjue666 等你加个具体的菜单在一起合并,目前合并会有空菜单

@wangjue666
Copy link
Collaborator Author

@wangjue666 等你加个具体的菜单在一起合并,目前合并会有空菜单

好的

@wangjue666 wangjue666 marked this pull request as draft August 7, 2024 03:08
@wangjue666 wangjue666 marked this pull request as ready for review August 7, 2024 07:41
Copy link
Contributor

@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 6bf7112 and 127fa2c.

Files selected for processing (5)
  • apps/web-antd/src/views/examples/ellipsis/index.vue (1 hunks)
  • packages/@core/ui-kit/shadcn-ui/src/components/tooltip/tooltip.vue (2 hunks)
  • packages/effects/common-ui/src/ellipsis-text/ellipsis-text.vue (1 hunks)
  • packages/effects/common-ui/src/ellipsis-text/index.ts (1 hunks)
  • packages/effects/common-ui/src/index.ts (1 hunks)
Files skipped from review due to trivial changes (1)
  • packages/effects/common-ui/src/ellipsis-text/index.ts
Files skipped from review as they are similar to previous changes (1)
  • apps/web-antd/src/views/examples/ellipsis/index.vue
Additional comments not posted (6)
packages/effects/common-ui/src/index.ts (1)

4-4: LGTM! Export statement for ellipsis-text is correct.

The new export statement is consistent with the existing structure and correctly expands the public API.

packages/@core/ui-kit/shadcn-ui/src/components/tooltip/tooltip.vue (2)

15-15: LGTM! New property contentStyle in Props interface is correct.

The new property enhances the customization capabilities of the component and is consistent with the existing structure.


35-35: LGTM! Integration of contentStyle into the template rendering is correct.

The integration correctly binds the new property to the :style attribute, enhancing the flexibility of the tooltip's presentation.

packages/effects/common-ui/src/ellipsis-text/ellipsis-text.vue (3)

1-67: LGTM! The script section is well-implemented.

The script section correctly defines the properties, emits, and methods, adhering to best practices.


68-102: LGTM! The template section is well-implemented.

The template section correctly integrates the properties and methods, adhering to best practices.


104-119: LGTM! The style sections are well-implemented.

The style sections correctly define the necessary styles for the component, adhering to best practices.

@wangjue666
Copy link
Collaborator Author

cc @vince292007 @anncwb 看看有需要调整的地方吗

@anncwb anncwb added the feature label Aug 7, 2024
Copy link
Contributor

@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 127fa2c and 0dbe66f.

Files selected for processing (1)
  • packages/@core/ui-kit/shadcn-ui/src/components/tooltip/tooltip.vue (2 hunks)
Files skipped from review as they are similar to previous changes (1)
  • packages/@core/ui-kit/shadcn-ui/src/components/tooltip/tooltip.vue

Copy link
Contributor

@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 0dbe66f and 5f6db64.

Files selected for processing (1)
  • packages/effects/common-ui/src/ellipsis-text/ellipsis-text.vue (1 hunks)
Files skipped from review as they are similar to previous changes (1)
  • packages/effects/common-ui/src/ellipsis-text/ellipsis-text.vue

@wangjue666 wangjue666 requested a review from anncwb August 8, 2024 01:22
Copy link
Contributor

@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 5f6db64 and 6d80142.

Files selected for processing (1)
  • packages/effects/common-ui/src/ellipsis-text/ellipsis-text.vue (1 hunks)
Files skipped from review as they are similar to previous changes (1)
  • packages/effects/common-ui/src/ellipsis-text/ellipsis-text.vue

@vince292007 vince292007 merged commit f1e0278 into main Aug 9, 2024
16 checks passed
@vince292007 vince292007 deleted the wangjue-define-comp-router branch August 9, 2024 02:57
@anncwb anncwb changed the title chore: define examples router & add ellipsis comp feat: define examples router & add ellipsis comp Aug 11, 2024
@anncwb anncwb changed the title feat: define examples router & add ellipsis comp feat: add ellipsis-text component Aug 11, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Sep 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants