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(vue-renderless): [autocomplete,base-select,amount,anchor,area] fix site: Optimize site documentation typesetting #2695

Merged
merged 9 commits into from
Dec 26, 2024

Conversation

dufu1991
Copy link
Contributor

@dufu1991 dufu1991 commented Dec 25, 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

    • Added spaces between words in various scenario labels and option values for improved readability across multiple components.
  • Bug Fixes

    • Updated expected values in tests to match new formatting with spaces in option names and scenario labels.
  • Documentation

    • Improved comments in test cases for clarity regarding formatting changes.

Copy link

coderabbitai bot commented Dec 25, 2024

Walkthrough

This pull request encompasses a series of minor formatting and cosmetic changes across multiple files in the examples directory. The modifications primarily involve adding spaces between words in company names, test case names, and notification messages. These changes do not alter the fundamental functionality of the components but improve readability and consistency in text presentation. The updates span various Vue components, test specifications, and documentation files related to autocomplete, area selection, and anchor link demonstrations.

Changes

File Path Change Summary
examples/sites/demos/pc/app/anchor/change.spec.ts Updated test case name from 'change事件' to 'change 事件'
examples/sites/demos/pc/app/anchor/webdoc/anchor.js Modified Chinese description to include a space in 'change 事件'
examples/sites/demos/pc/app/area/* Updated notification messages to use Chinese colon and added spaces in company names
examples/sites/demos/pc/app/autocomplete/* Consistently added spaces in company names across multiple components and test files
examples/sites/demos/pc/app/base-select/* Added spaces in scenario labels and option values across various components

Suggested labels

documentation

Suggested reviewers

  • zzcr

Poem

🐰 Spaces dancing between words so neat,
A rabbit's touch makes text look sweet
Commas and characters now align
With precision, almost divine
Code formatting, a playful art! 🌟


📜 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 b57dc9e and a085874.

📒 Files selected for processing (2)
  • examples/sites/demos/pc/app/base-select/optimization-composition-api.vue (1 hunks)
  • examples/sites/demos/pc/app/base-select/optimization.vue (1 hunks)
✅ Files skipped from review due to trivial changes (2)
  • examples/sites/demos/pc/app/base-select/optimization-composition-api.vue
  • examples/sites/demos/pc/app/base-select/optimization.vue

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>, 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. (Beta)
  • @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 bug Something isn't working label Dec 25, 2024
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 (1)
examples/sites/demos/pc/app/autocomplete/select-event.spec.ts (1)

7-8: Prettier formatting suggestion
Static analysis flags a formatting style preference for multi-line calls to accommodate readability.

You could consider formatting this line as follows:

-  await expect(page.locator('div').filter({ hasText: '当前选择:{"value":"GFD 科技 YX 公司","address":"福州"}' }).nth(1)).toBeVisible()
+  await expect(
+    page.locator('div')
+      .filter({ hasText: '当前选择:{"value":"GFD 科技 YX 公司","address":"福州"}' })
+      .nth(1)
+  ).toBeVisible()
🧰 Tools
🪛 eslint

[error] 8-8: Replace page.locator('div').filter({·hasText:·'当前选择:{"value":"GFD·科技·YX·公司","address":"福州"}'·}).nth(1) with ⏎····page.locator('div').filter({·hasText:·'当前选择:{"value":"GFD·科技·YX·公司","address":"福州"}'·}).nth(1)⏎··

(prettier/prettier)

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 4d51590 and add7ed0.

📒 Files selected for processing (46)
  • examples/sites/demos/pc/app/anchor/change.spec.ts (1 hunks)
  • examples/sites/demos/pc/app/anchor/webdoc/anchor.js (1 hunks)
  • examples/sites/demos/pc/app/area/area-events-composition-api.vue (1 hunks)
  • examples/sites/demos/pc/app/area/area-events.vue (1 hunks)
  • examples/sites/demos/pc/app/area/custom-service-composition-api.vue (2 hunks)
  • examples/sites/demos/pc/app/area/custom-service.spec.ts (1 hunks)
  • examples/sites/demos/pc/app/area/custom-service.vue (2 hunks)
  • examples/sites/demos/pc/app/area/webdoc/area.js (1 hunks)
  • examples/sites/demos/pc/app/autocomplete/basic-usage-composition-api.vue (1 hunks)
  • examples/sites/demos/pc/app/autocomplete/basic-usage.spec.ts (1 hunks)
  • examples/sites/demos/pc/app/autocomplete/basic-usage.vue (1 hunks)
  • examples/sites/demos/pc/app/autocomplete/clearable-composition-api.vue (1 hunks)
  • examples/sites/demos/pc/app/autocomplete/clearable.spec.ts (1 hunks)
  • examples/sites/demos/pc/app/autocomplete/clearable.vue (1 hunks)
  • examples/sites/demos/pc/app/autocomplete/custom-icon-composition-api.vue (1 hunks)
  • examples/sites/demos/pc/app/autocomplete/custom-icon.vue (1 hunks)
  • examples/sites/demos/pc/app/autocomplete/debounce-composition-api.vue (1 hunks)
  • examples/sites/demos/pc/app/autocomplete/debounce.spec.ts (1 hunks)
  • examples/sites/demos/pc/app/autocomplete/debounce.vue (1 hunks)
  • examples/sites/demos/pc/app/autocomplete/display-only-composition-api.vue (1 hunks)
  • examples/sites/demos/pc/app/autocomplete/display-only.vue (1 hunks)
  • examples/sites/demos/pc/app/autocomplete/hide-loading-composition-api.vue (2 hunks)
  • examples/sites/demos/pc/app/autocomplete/hide-loading.vue (2 hunks)
  • examples/sites/demos/pc/app/autocomplete/highlight-first-item-composition-api.vue (1 hunks)
  • examples/sites/demos/pc/app/autocomplete/highlight-first-item.spec.ts (1 hunks)
  • examples/sites/demos/pc/app/autocomplete/highlight-first-item.vue (1 hunks)
  • examples/sites/demos/pc/app/autocomplete/no-trigger-on-focus-composition-api.vue (1 hunks)
  • examples/sites/demos/pc/app/autocomplete/no-trigger-on-focus.vue (1 hunks)
  • examples/sites/demos/pc/app/autocomplete/placement-composition-api.vue (1 hunks)
  • examples/sites/demos/pc/app/autocomplete/placement.vue (1 hunks)
  • examples/sites/demos/pc/app/autocomplete/popper-class-composition-api.vue (1 hunks)
  • examples/sites/demos/pc/app/autocomplete/popper-class.vue (1 hunks)
  • examples/sites/demos/pc/app/autocomplete/remote-search-composition-api.vue (1 hunks)
  • examples/sites/demos/pc/app/autocomplete/remote-search.spec.ts (1 hunks)
  • examples/sites/demos/pc/app/autocomplete/remote-search.vue (1 hunks)
  • examples/sites/demos/pc/app/autocomplete/select-event-composition-api.vue (1 hunks)
  • examples/sites/demos/pc/app/autocomplete/select-event.spec.ts (1 hunks)
  • examples/sites/demos/pc/app/autocomplete/select-event.vue (1 hunks)
  • examples/sites/demos/pc/app/autocomplete/size-composition-api.vue (1 hunks)
  • examples/sites/demos/pc/app/autocomplete/size.vue (1 hunks)
  • examples/sites/demos/pc/app/autocomplete/slot-composition-api.vue (1 hunks)
  • examples/sites/demos/pc/app/autocomplete/slot.spec.ts (1 hunks)
  • examples/sites/demos/pc/app/autocomplete/slot.vue (1 hunks)
  • examples/sites/demos/pc/app/autocomplete/value-key-composition-api.vue (1 hunks)
  • examples/sites/demos/pc/app/autocomplete/value-key.spec.ts (1 hunks)
  • examples/sites/demos/pc/app/autocomplete/value-key.vue (1 hunks)
✅ Files skipped from review due to trivial changes (30)
  • examples/sites/demos/pc/app/area/area-events-composition-api.vue
  • examples/sites/demos/pc/app/area/webdoc/area.js
  • examples/sites/demos/pc/app/area/custom-service.vue
  • examples/sites/demos/pc/app/area/area-events.vue
  • examples/sites/demos/pc/app/autocomplete/highlight-first-item.vue
  • examples/sites/demos/pc/app/autocomplete/placement.vue
  • examples/sites/demos/pc/app/autocomplete/select-event.vue
  • examples/sites/demos/pc/app/autocomplete/placement-composition-api.vue
  • examples/sites/demos/pc/app/autocomplete/no-trigger-on-focus.vue
  • examples/sites/demos/pc/app/autocomplete/size-composition-api.vue
  • examples/sites/demos/pc/app/anchor/webdoc/anchor.js
  • examples/sites/demos/pc/app/autocomplete/value-key.vue
  • examples/sites/demos/pc/app/autocomplete/basic-usage-composition-api.vue
  • examples/sites/demos/pc/app/anchor/change.spec.ts
  • examples/sites/demos/pc/app/autocomplete/display-only.vue
  • examples/sites/demos/pc/app/autocomplete/remote-search-composition-api.vue
  • examples/sites/demos/pc/app/autocomplete/select-event-composition-api.vue
  • examples/sites/demos/pc/app/autocomplete/clearable.vue
  • examples/sites/demos/pc/app/autocomplete/display-only-composition-api.vue
  • examples/sites/demos/pc/app/autocomplete/clearable-composition-api.vue
  • examples/sites/demos/pc/app/autocomplete/debounce.vue
  • examples/sites/demos/pc/app/area/custom-service-composition-api.vue
  • examples/sites/demos/pc/app/autocomplete/popper-class-composition-api.vue
  • examples/sites/demos/pc/app/autocomplete/value-key-composition-api.vue
  • examples/sites/demos/pc/app/autocomplete/highlight-first-item-composition-api.vue
  • examples/sites/demos/pc/app/autocomplete/remote-search.vue
  • examples/sites/demos/pc/app/autocomplete/debounce-composition-api.vue
  • examples/sites/demos/pc/app/autocomplete/popper-class.vue
  • examples/sites/demos/pc/app/autocomplete/hide-loading-composition-api.vue
  • examples/sites/demos/pc/app/autocomplete/hide-loading.vue
🧰 Additional context used
🪛 eslint
examples/sites/demos/pc/app/autocomplete/select-event.spec.ts

[error] 8-8: Replace page.locator('div').filter({·hasText:·'当前选择:{"value":"GFD·科技·YX·公司","address":"福州"}'·}).nth(1) with ⏎····page.locator('div').filter({·hasText:·'当前选择:{"value":"GFD·科技·YX·公司","address":"福州"}'·}).nth(1)⏎··

(prettier/prettier)

🔇 Additional comments (22)
examples/sites/demos/pc/app/autocomplete/slot-composition-api.vue (6)

52-52: Consistency improvement in the value field.

Adding spaced wording for the company name clarifies the text and aligns well with the PR's goal of enhancing documentation readability.


56-56: Enhanced readability in the value field.

This minor change boosts clarity for the displayed string. Looks good for documentation purposes.


60-60: Improved string spacing for RFV entry.

Maintaining consistent spacing aids the user in distinguishing words at a glance. No issues found.


64-64: Refined formatting for TGBYX 公司.

The insertion of space helps distinguish brand abbreviations more clearly. Approved as is.


68-68: Readable naming convention update.

Adding spaces not only clarifies the text but also maintains alignment with similar changes in the codebase.


72-72: Spacing enhancement for 康康物业 YX 公司.

This final adjustment fosters consistency throughout the code and the documentation.

examples/sites/demos/pc/app/autocomplete/remote-search.spec.ts (1)

7-7: Looks good!
The newly inserted spaces improve readability without altering the core functionality of the test.

examples/sites/demos/pc/app/autocomplete/value-key.spec.ts (1)

7-8: Well done!
The update to include spaces in the company name ensures visual consistency, and the test continues to function as expected.

examples/sites/demos/pc/app/autocomplete/highlight-first-item.spec.ts (1)

7-7: Nice improvement
Adding a space here aligns with the overall effort to enhance readability.

examples/sites/demos/pc/app/autocomplete/basic-usage.spec.ts (2)

10-10: Use of standardized naming conventions
The updated text for the company name now follows a clearer spaced format. This change is appropriate and consistent across the files.


12-12: Correct synchronization of test assertions
Ensuring the textbox value matches the newly formatted company name helps maintain consistency throughout the test suite. Nicely done.

examples/sites/demos/pc/app/autocomplete/clearable.spec.ts (1)

9-9: Consistent naming across the test suite
The addition of spaces in the option name aligns with the standardized format. The click action and subsequent clear action remain valid.

examples/sites/demos/pc/app/autocomplete/debounce.spec.ts (2)

8-8: Accurate visibility checks
Verifying that 'WWWW 科技 YX 公司' is initially not visible after a quick click matches the intended debounce logic. This is correct.


10-10: Ensuring visibility after delay
Confirming the option becomes visible with the updated naming convention demonstrates the debounce feature is functioning correctly.

examples/sites/demos/pc/app/autocomplete/slot.spec.ts (1)

16-16: Proper reflection of updated name formats
Adjusting the displayed company name to include spaces maintains consistency with the standardized naming convention in other tests.

examples/sites/demos/pc/app/autocomplete/no-trigger-on-focus-composition-api.vue (1)

37-37: Improved readability through consistent spacing in company names.
These changes help maintain a consistent naming format. No functional impact is introduced, so the update is approved.

Also applies to: 41-41, 45-45, 49-49, 53-53, 57-57

examples/sites/demos/pc/app/autocomplete/custom-icon-composition-api.vue (1)

41-41: Consistent spacing in company names.
All instances maintain uniform formatting for better readability. This does not affect the underlying functionality.

Also applies to: 45-45, 49-49, 53-53, 57-57, 61-61

examples/sites/demos/pc/app/autocomplete/basic-usage.vue (1)

33-33: Enhanced spacing for company names.
These modifications ensure consistency and clarity for displayed text. No logical changes are introduced.

Also applies to: 37-37, 41-41, 45-45, 49-49, 53-53

examples/sites/demos/pc/app/area/custom-service.spec.ts (1)

37-37: Assertion value updated for better clarity.
Using “A 公司销售服务部” instead of “A公司销售服务部” maintains consistency with the spaced format across the application.

examples/sites/demos/pc/app/autocomplete/size.vue (1)

64-64: Spacing updates improve readability

The addition of spaces in the value keys (e.g., 'GFD科技YX公司''GFD 科技 YX 公司') enhances clarity without changing functionality. These changes align with the PR’s goal of improving documentation typesetting.

Also applies to: 68-68, 72-72, 76-76, 80-80, 84-84

examples/sites/demos/pc/app/autocomplete/slot.vue (1)

54-54: Consistent formatting across entries

Likewise, adding spaces to company names improves the display of text elements, making the entries more readable in the autocomplete suggestions. No additional adjustments seem necessary.

Also applies to: 58-58, 62-62, 66-66, 70-70, 74-74

examples/sites/demos/pc/app/autocomplete/custom-icon.vue (1)

43-43: Maintained functionality with refined display

The spacing enhancements are consistent with the changes in other files, ensuring uniform naming conventions. Since these adjustments are purely presentational, they pose no functional risks.

Also applies to: 47-47, 51-51, 55-55, 59-59, 63-63

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

🧹 Nitpick comments (3)
examples/sites/demos/pc/app/base-select/filter-method.vue (2)

Line range hint 58-71: Consider optimizing the custom filter implementation

The current implementation iterates through options twice and mutates state directly. Consider using a more functional approach.

 customFilterMethod(searchValue) {
   const customFilterRef = this.$refs.customFilterRef
-  if (searchValue) {
-    customFilterRef.state.cachedOptions.forEach((item) => {
-      item.state.visible = item.label.includes(searchValue)
-    })
-  } else {
-    customFilterRef.state.cachedOptions.forEach((item) => {
-      item.state.visible = true
-    })
-  }
+  customFilterRef.state.cachedOptions.forEach((item) => {
+    item.state.visible = !searchValue || item.label.includes(searchValue)
+  })
 }

Line range hint 4-24: Consider maintaining language consistency

The demo mixes Chinese text (场景, 选项) with English text ("No Match"). Consider using consistent language throughout the demo.

examples/sites/demos/pc/app/base-select/manual-focus-blur.vue (1)

Line range hint 59-74: Consider reducing code duplication in focus/blur handlers

The focus and blur handlers are duplicated for each scenario. Consider refactoring to use a single pair of handlers.

 methods: {
-  handleFocus1() {
-    this.$refs.drop1.focus()
-  },
-  handleBlur1() {
-    this.$refs.drop1.blur()
-  },
-  handleFocus2() {
-    this.$refs.drop2.focus()
-  },
-  handleBlur2() {
-    this.$refs.drop2.blur()
-  },
-  handleFocus3() {
-    this.$refs.drop3.focus()
-  },
-  handleBlur3() {
-    this.$refs.drop3.blur()
-  }
+  handleFocus(ref) {
+    this.$refs[ref].focus()
+  },
+  handleBlur(ref) {
+    this.$refs[ref].blur()
+  }
 }

Then update the template:

-      <tiny-button @click="handleFocus1"> 点击获取焦点 </tiny-button>
-      <tiny-button @click="handleBlur1"> 点击失去焦点 </tiny-button>
+      <tiny-button @click="handleFocus('drop1')"> 点击获取焦点 </tiny-button>
+      <tiny-button @click="handleBlur('drop1')"> 点击失去焦点 </tiny-button>
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between add7ed0 and e4797cf.

📒 Files selected for processing (82)
  • examples/sites/demos/pc/app/base-select/all-text-composition-api.vue (1 hunks)
  • examples/sites/demos/pc/app/base-select/all-text.vue (1 hunks)
  • examples/sites/demos/pc/app/base-select/allow-create-composition-api.vue (2 hunks)
  • examples/sites/demos/pc/app/base-select/allow-create.spec.ts (1 hunks)
  • examples/sites/demos/pc/app/base-select/allow-create.vue (2 hunks)
  • examples/sites/demos/pc/app/base-select/automatic-dropdown-composition-api.vue (2 hunks)
  • examples/sites/demos/pc/app/base-select/automatic-dropdown.vue (2 hunks)
  • examples/sites/demos/pc/app/base-select/basic-usage-composition-api.vue (2 hunks)
  • examples/sites/demos/pc/app/base-select/basic-usage.vue (2 hunks)
  • examples/sites/demos/pc/app/base-select/binding-obj-composition-api.vue (1 hunks)
  • examples/sites/demos/pc/app/base-select/binding-obj.spec.ts (1 hunks)
  • examples/sites/demos/pc/app/base-select/binding-obj.vue (1 hunks)
  • examples/sites/demos/pc/app/base-select/cache-usage-composition-api.vue (1 hunks)
  • examples/sites/demos/pc/app/base-select/cache-usage.spec.ts (1 hunks)
  • examples/sites/demos/pc/app/base-select/cache-usage.vue (1 hunks)
  • examples/sites/demos/pc/app/base-select/clear-no-match-value-composition-api.vue (2 hunks)
  • examples/sites/demos/pc/app/base-select/clear-no-match-value.spec.ts (1 hunks)
  • examples/sites/demos/pc/app/base-select/clear-no-match-value.vue (2 hunks)
  • examples/sites/demos/pc/app/base-select/clearable-composition-api.vue (1 hunks)
  • examples/sites/demos/pc/app/base-select/clearable.vue (1 hunks)
  • examples/sites/demos/pc/app/base-select/collapse-tags-composition-api.vue (2 hunks)
  • examples/sites/demos/pc/app/base-select/collapse-tags.spec.ts (1 hunks)
  • examples/sites/demos/pc/app/base-select/collapse-tags.vue (2 hunks)
  • examples/sites/demos/pc/app/base-select/copy-multi-composition-api.vue (2 hunks)
  • examples/sites/demos/pc/app/base-select/copy-multi.spec.ts (1 hunks)
  • examples/sites/demos/pc/app/base-select/copy-multi.vue (2 hunks)
  • examples/sites/demos/pc/app/base-select/copy-single-composition-api.vue (3 hunks)
  • examples/sites/demos/pc/app/base-select/copy-single.vue (3 hunks)
  • examples/sites/demos/pc/app/base-select/disabled-composition-api.vue (5 hunks)
  • examples/sites/demos/pc/app/base-select/disabled.spec.ts (1 hunks)
  • examples/sites/demos/pc/app/base-select/disabled.vue (5 hunks)
  • examples/sites/demos/pc/app/base-select/events-composition-api.vue (1 hunks)
  • examples/sites/demos/pc/app/base-select/events.vue (1 hunks)
  • examples/sites/demos/pc/app/base-select/filter-method-composition-api.vue (3 hunks)
  • examples/sites/demos/pc/app/base-select/filter-method.vue (3 hunks)
  • examples/sites/demos/pc/app/base-select/filter-mode-composition-api.vue (3 hunks)
  • examples/sites/demos/pc/app/base-select/filter-mode.vue (3 hunks)
  • examples/sites/demos/pc/app/base-select/hide-drop-composition-api.vue (1 hunks)
  • examples/sites/demos/pc/app/base-select/hide-drop.vue (1 hunks)
  • examples/sites/demos/pc/app/base-select/input-box-type-composition-api.vue (2 hunks)
  • examples/sites/demos/pc/app/base-select/input-box-type.vue (2 hunks)
  • examples/sites/demos/pc/app/base-select/is-drop-inherit-width-composition-api.vue (2 hunks)
  • examples/sites/demos/pc/app/base-select/is-drop-inherit-width.vue (2 hunks)
  • examples/sites/demos/pc/app/base-select/manual-focus-blur-composition-api.vue (4 hunks)
  • examples/sites/demos/pc/app/base-select/manual-focus-blur.spec.ts (1 hunks)
  • examples/sites/demos/pc/app/base-select/manual-focus-blur.vue (4 hunks)
  • examples/sites/demos/pc/app/base-select/map-field-composition-api.vue (2 hunks)
  • examples/sites/demos/pc/app/base-select/map-field.vue (3 hunks)
  • examples/sites/demos/pc/app/base-select/memoize-usage-composition-api.vue (1 hunks)
  • examples/sites/demos/pc/app/base-select/memoize-usage.spec.ts (1 hunks)
  • examples/sites/demos/pc/app/base-select/memoize-usage.vue (2 hunks)
  • examples/sites/demos/pc/app/base-select/multiple-composition-api.vue (3 hunks)
  • examples/sites/demos/pc/app/base-select/multiple-mix-composition-api.vue (2 hunks)
  • examples/sites/demos/pc/app/base-select/multiple-mix.vue (1 hunks)
  • examples/sites/demos/pc/app/base-select/multiple.vue (3 hunks)
  • examples/sites/demos/pc/app/base-select/native-properties-composition-api.vue (1 hunks)
  • examples/sites/demos/pc/app/base-select/native-properties.vue (1 hunks)
  • examples/sites/demos/pc/app/base-select/no-data-text-composition-api.vue (1 hunks)
  • examples/sites/demos/pc/app/base-select/no-data-text.vue (1 hunks)
  • examples/sites/demos/pc/app/base-select/optimization.spec.ts (2 hunks)
  • examples/sites/demos/pc/app/base-select/option-group-composition-api.vue (4 hunks)
  • examples/sites/demos/pc/app/base-select/option-group.vue (4 hunks)
  • examples/sites/demos/pc/app/base-select/popup-style-position-composition-api.vue (1 hunks)
  • examples/sites/demos/pc/app/base-select/popup-style-position.vue (1 hunks)
  • examples/sites/demos/pc/app/base-select/remote-method-composition-api.vue (6 hunks)
  • examples/sites/demos/pc/app/base-select/remote-method.vue (6 hunks)
  • examples/sites/demos/pc/app/base-select/searchable-composition-api.vue (2 hunks)
  • examples/sites/demos/pc/app/base-select/searchable.vue (2 hunks)
  • examples/sites/demos/pc/app/base-select/show-alloption-composition-api.vue (1 hunks)
  • examples/sites/demos/pc/app/base-select/show-alloption.vue (1 hunks)
  • examples/sites/demos/pc/app/base-select/show-tip-composition-api.vue (1 hunks)
  • examples/sites/demos/pc/app/base-select/show-tip.vue (1 hunks)
  • examples/sites/demos/pc/app/base-select/size-composition-api.vue (1 hunks)
  • examples/sites/demos/pc/app/base-select/size.vue (1 hunks)
  • examples/sites/demos/pc/app/base-select/slot-default-composition-api.vue (3 hunks)
  • examples/sites/demos/pc/app/base-select/slot-default.vue (3 hunks)
  • examples/sites/demos/pc/app/base-select/slot-footer-composition-api.vue (1 hunks)
  • examples/sites/demos/pc/app/base-select/slot-footer.vue (1 hunks)
  • examples/sites/demos/pc/app/base-select/slot-label-composition-api.vue (1 hunks)
  • examples/sites/demos/pc/app/base-select/slot-label.vue (1 hunks)
  • examples/sites/demos/pc/app/base-select/slot-panel-composition-api.vue (3 hunks)
  • examples/sites/demos/pc/app/base-select/slot-panel.vue (3 hunks)
⛔ Files not processed due to max files limit (7)
  • examples/sites/demos/pc/app/base-select/slot-prefix-composition-api.vue
  • examples/sites/demos/pc/app/base-select/slot-prefix.vue
  • examples/sites/demos/pc/app/base-select/slot-reference-composition-api.vue
  • examples/sites/demos/pc/app/base-select/slot-reference.vue
  • examples/sites/demos/pc/app/base-select/tag-type-composition-api.vue
  • examples/sites/demos/pc/app/base-select/tag-type.vue
  • examples/sites/demos/pc/app/base-select/webdoc/base-select.js
✅ Files skipped from review due to trivial changes (50)
  • examples/sites/demos/pc/app/base-select/show-tip.vue
  • examples/sites/demos/pc/app/base-select/collapse-tags.spec.ts
  • examples/sites/demos/pc/app/base-select/popup-style-position.vue
  • examples/sites/demos/pc/app/base-select/popup-style-position-composition-api.vue
  • examples/sites/demos/pc/app/base-select/remote-method-composition-api.vue
  • examples/sites/demos/pc/app/base-select/is-drop-inherit-width-composition-api.vue
  • examples/sites/demos/pc/app/base-select/input-box-type-composition-api.vue
  • examples/sites/demos/pc/app/base-select/basic-usage.vue
  • examples/sites/demos/pc/app/base-select/slot-footer-composition-api.vue
  • examples/sites/demos/pc/app/base-select/no-data-text-composition-api.vue
  • examples/sites/demos/pc/app/base-select/size.vue
  • examples/sites/demos/pc/app/base-select/native-properties.vue
  • examples/sites/demos/pc/app/base-select/basic-usage-composition-api.vue
  • examples/sites/demos/pc/app/base-select/automatic-dropdown-composition-api.vue
  • examples/sites/demos/pc/app/base-select/map-field.vue
  • examples/sites/demos/pc/app/base-select/no-data-text.vue
  • examples/sites/demos/pc/app/base-select/collapse-tags.vue
  • examples/sites/demos/pc/app/base-select/multiple.vue
  • examples/sites/demos/pc/app/base-select/allow-create-composition-api.vue
  • examples/sites/demos/pc/app/base-select/cache-usage.vue
  • examples/sites/demos/pc/app/base-select/hide-drop.vue
  • examples/sites/demos/pc/app/base-select/allow-create.vue
  • examples/sites/demos/pc/app/base-select/manual-focus-blur.spec.ts
  • examples/sites/demos/pc/app/base-select/slot-panel.vue
  • examples/sites/demos/pc/app/base-select/option-group-composition-api.vue
  • examples/sites/demos/pc/app/base-select/manual-focus-blur-composition-api.vue
  • examples/sites/demos/pc/app/base-select/show-tip-composition-api.vue
  • examples/sites/demos/pc/app/base-select/remote-method.vue
  • examples/sites/demos/pc/app/base-select/copy-single-composition-api.vue
  • examples/sites/demos/pc/app/base-select/searchable-composition-api.vue
  • examples/sites/demos/pc/app/base-select/memoize-usage-composition-api.vue
  • examples/sites/demos/pc/app/base-select/collapse-tags-composition-api.vue
  • examples/sites/demos/pc/app/base-select/slot-panel-composition-api.vue
  • examples/sites/demos/pc/app/base-select/events.vue
  • examples/sites/demos/pc/app/base-select/filter-mode-composition-api.vue
  • examples/sites/demos/pc/app/base-select/is-drop-inherit-width.vue
  • examples/sites/demos/pc/app/base-select/filter-mode.vue
  • examples/sites/demos/pc/app/base-select/input-box-type.vue
  • examples/sites/demos/pc/app/base-select/clear-no-match-value-composition-api.vue
  • examples/sites/demos/pc/app/base-select/filter-method-composition-api.vue
  • examples/sites/demos/pc/app/base-select/map-field-composition-api.vue
  • examples/sites/demos/pc/app/base-select/disabled.vue
  • examples/sites/demos/pc/app/base-select/copy-single.vue
  • examples/sites/demos/pc/app/base-select/copy-multi-composition-api.vue
  • examples/sites/demos/pc/app/base-select/copy-multi.vue
  • examples/sites/demos/pc/app/base-select/option-group.vue
  • examples/sites/demos/pc/app/base-select/disabled.spec.ts
  • examples/sites/demos/pc/app/base-select/disabled-composition-api.vue
  • examples/sites/demos/pc/app/base-select/multiple-composition-api.vue
  • examples/sites/demos/pc/app/base-select/show-alloption.vue
🔇 Additional comments (73)
examples/sites/demos/pc/app/base-select/memoize-usage.spec.ts (2)

14-14: Streamlined spacing for readability.

Changing ['选项1'] to ['选项 1'] aligns with the newly updated documentation text and ensures that the text displayed in the test matches the application's output.


18-18: Maintains consistency in spacing.

This mirrored adjustment from ['选项2'] to ['选项 2'] keeps the test expectations consistent with the revised spacing format.

examples/sites/demos/pc/app/base-select/copy-multi.spec.ts (1)

48-48: Ensure punctuation consistency for better readability.

Line 48 uses a Chinese comma () instead of an ASCII comma (,). Please confirm that this is intentional, and that other references to "北京,上海" in related tests or documentation consistently use the same punctuation. Also note that the test remains commented out; once the flakiness issue is resolved, consider re-enabling the test to maintain coverage.

examples/sites/demos/pc/app/base-select/optimization.spec.ts (6)

15-15: No issues with the new text spacing.

Changing '北京17' to '北京 17' aligns with the updated formatting and helps maintain consistency in test assertions.


18-18: Visibility check logic seems correct.

Ensuring '北京 17' is expected to be visible aligns with the updated preloading behavior. The inline comment provides helpful context.


32-33: Maintaining consistent spacing within test filters.

Both '北京 17' and '北京 16' now adhere to the spaced format, reflecting the updated naming convention and ensuring clarity for test assertions.


38-39: Visibility checks for '北京 16' and '北京 17' are valid.

These lines confirm that the updated items become visible upon scrolling, which correctly tests the virtual scrolling functionality.


40-41: Accurate test of selected item state.

Clicking '北京 17' and verifying the tag text ensures the component behaves correctly with the updated spacing.


43-43: Multi-tag selection logic appears consistent.

With '北京 16' selected, checking the updated tag count verifies correct multi-select behavior under the new spacing convention.

examples/sites/demos/pc/app/base-select/clearable-composition-api.vue (2)

12-16: Consistent formatting of option values.

These modifications introduce a space within the option values (e.g., from '选项1' to '选项 1') to unify visual style across the UI. This does not affect the functionality and looks good.


18-18: Updated default value to match new spacing convention.

Changing the initial value from '选项3' to '选项 3' maintains consistency with the revised option labels above.

examples/sites/demos/pc/app/base-select/hide-drop-composition-api.vue (1)

12-16: Aligned the option values with the new spacing convention.

Adding a space within each '选项 X' ensures consistency with other demos and does not introduce any logic changes.

examples/sites/demos/pc/app/base-select/show-alloption-composition-api.vue (1)

12-16: Adoption of consistent spacing in option values.

Similar to other files in this PR, each '选项X' is updated to '选项 X' for better readability. No issues identified.

examples/sites/demos/pc/app/base-select/all-text-composition-api.vue (1)

14-18: Minor textual updates for clarity.

These changes follow the project-wide update to add spaces in the '选项' labels, enhancing visual consistency. Looks good.

examples/sites/demos/pc/app/base-select/cache-usage.spec.ts (2)

14-14: Good improvement in text spacing.

Adding a space in the expected text ensures consistency and clarity when matching UI text.


18-18: Consistent formatting maintained.

The space addition aligns with the new formatting pattern across the codebase.

examples/sites/demos/pc/app/base-select/clearable.vue (2)

18-22: Uniform labeling approach.

These changes effectively standardize the spacing in option labels, enhancing readability across the UI.


24-24: Value property consistency.

Matching the data's default value with the newly spaced options helps keep the Vue model synchronized.

examples/sites/demos/pc/app/base-select/all-text.vue (1)

21-25: Enhancing visual clarity of values.

The introduction of spaced labels maintains a uniform representation of option names, aligning with the overall design intention.

examples/sites/demos/pc/app/base-select/binding-obj.spec.ts (2)

15-15: Accurate test alignment with revised labels.

Ensuring the test mirrors the updated spacing prevents false negatives and maintains clarity.


20-20: Test consistency with code changes.

Verifying the final text with the new spacing ensures the UI and tests remain in sync.

examples/sites/demos/pc/app/base-select/binding-obj-composition-api.vue (2)

17-21: Consistent Spacing in Options
Great job standardizing the spacing for each option label (e.g., '选项 1', '选项 2'). This keeps the UI consistent with the rest of the PR's formatting updates.


23-23: Aligned Initial Value
The initial value now matches the new spaced format ('选项 3'). This is consistent with the updated options array and prevents any mismatch issues in the UI.

examples/sites/demos/pc/app/base-select/clear-no-match-value.spec.ts (1)

23-23: Updated Test Expectation
The test’s expectation now reflects the correct spaced format ('[ "选项 2" ]'). This minor textual update aligns with the renamed options in other files and helps prevent confusion in your test suite.

examples/sites/demos/pc/app/base-select/cache-usage-composition-api.vue (2)

25-29: Improved Option Labels
Switching to '选项 1', '选项 2', etc. ensures consistent labeling and matches the rest of the spacing fixes. This helps maintain uniformly formatted user-facing text.


31-31: Refined Default Value
The default value is updated to '选项 3', matching the newly spaced option labels and providing a uniform user experience.

examples/sites/demos/pc/app/base-select/binding-obj.vue (2)

23-27: Standardized Object Labels
All 'val' fields in the options are now spaced (e.g., '选项 1', '选项 2'). This retains clarity and language consistency across your Vue components.


29-29: Updated Bound Value
The default value has been spaced as well ('选项 3'), ensuring no mismatch between selected options and the displayed text.

examples/sites/demos/pc/app/base-select/size-composition-api.vue (2)

19-23: Formatting changes look consistent.
These entries have been updated to include a space in the option values (e.g., '选项 1'). This improves clarity without altering functionality.


25-28: Consistent option value spacing.
All reactive variables now match the updated option values (e.g., '选项 1'). This maintains consistency across the component’s data structure.

examples/sites/demos/pc/app/base-select/clear-no-match-value.vue (4)

4-4: Improved labeling clarity.
Adding a space before the number in "场景 1" enhances readability.


11-11: Consistent scenario naming.
Using "场景 2" aligns with the format established above.


30-34: Option value spacing.
These changes (e.g., '选项 1') match the overall effort to add spacing.


37-37: Multi-value consistency.
multiVal includes '选项 2' with new spacing, matching the updated option labels.

examples/sites/demos/pc/app/base-select/memoize-usage.vue (2)

26-30: Spacing adjustments for option values.
Using a space (e.g., '选项 1') keeps the label formatting consistent across files.


41-41: Consistent default value.
The default value references '选项 3' (with spacing), aligning with the updated option keys.

examples/sites/demos/pc/app/base-select/allow-create.spec.ts (3)

14-14: Test input text updated for readability.
The space in '测试 allow-create' ensures the test input aligns with the new format.


18-20: Assertion matching updated string.
Adjusting the expected input and dropdown item to '测试 allow-create' ensures tests accurately reflect the new format.


24-24: Dropdown item selection check.
Confirming '测试 allow-create' is already selected maintains consistency in the test logic.

examples/sites/demos/pc/app/base-select/slot-label-composition-api.vue (2)

28-28: Improved readability with spacing between characters
Changing '选项1' to '选项 1', etc., helps align the UI labels with a consistent and clearer presentation.

Also applies to: 33-33, 38-38, 43-43, 48-48


54-55: Updated initial values for consistency
Reflecting the spaced labeling in value1 and value2 ensures the component state matches the new options array labels.

examples/sites/demos/pc/app/base-select/events-composition-api.vue (1)

39-43: Consistent labeling for option values
Adding spaces in '选项1''选项 1', etc., maintains a unified style across the component’s display.

examples/sites/demos/pc/app/base-select/slot-label.vue (2)

33-33: Spacing changes enhance readability
Switching to '选项 1', '选项 2', etc., provides clearer visual separation and consistency.

Also applies to: 38-38, 43-43, 48-48, 53-53


58-59: Synchronizing default values
Updating value1 and value2 to use spaced labels ensures a cohesive user experience.

examples/sites/demos/pc/app/base-select/slot-default-composition-api.vue (5)

3-3: Clearer scenario label
Changing "场景1" to "场景 1" promotes visual clarity and matches the revised style.


21-21: Improved heading readability
Adding a space yields "场景 2," ensuring parallel formatting with prior scenario labels.


41-45: Consistent label spacing for options1
These changes unify the display of each city option.


49-53: Consistent label spacing for options2
Adjusting '选项5''选项 5', etc., standardizes formatting across all subnets.


56-57: Aligned reactive variable defaults
Initializing value1 and value2 with spaced option labels ensures a matching interface from the start.

examples/sites/demos/pc/app/base-select/slot-default.vue (5)

3-3: Consistent spacing for UI clarity.

Inserting a space in "场景 1" improves readability and consistency across the interface.


21-21: Consistent spacing for UI clarity.

Same observation for "场景 2." This follows the same pattern of spacing for improved clarity in the UI.


49-53: Values updated for clarity and uniformity.

Adding spaces in "选项 1" through "选项 5" aligns with the updated format across the codebase. This is a non-breaking change and helps maintain uniform labeling.


56-60: Values updated to match the new spaced format.

Retaining the consistent approach, now "选项 1" through "选项 5" reflect improved readability.


62-63: Aligned var defaults with revised option values.

Ensuring that value1 and value2 match the newly spaced strings is important for accurate initialization.

examples/sites/demos/pc/app/base-select/multiple-mix-composition-api.vue (8)

91-91: Refined option values for better presentation.

Adding a space in the value ensures consistency with the rest of the application’s options.


95-95: Refined option values for better presentation.

Same reasoning applies here, properly spacing “选项 2.”


99-99: Refined option values for better presentation.

Continuing the uniform approach to spacing with “选项 3.”


103-103: Refined option values for better presentation.

Maintaining consistency with “选项 4.”


107-107: Refined option values for better presentation.

Ensuring “选项 5” has consistent spacing.


111-111: Refined option values for better presentation.

Same approach for “选项 6.”


115-115: Refined option values for better presentation.

The final item “选项 7” similarly incorporates spacing.


125-125: Synchronized selected values with updated option strings.

By using the newly spaced values in select1, the selected items accurately reflect the revised labels.

examples/sites/demos/pc/app/base-select/multiple-mix.vue (2)

104-120: Option values updated to match spaced format.

These changes ensure consistency in the presentation of each option (选项 1 through 选项 7).


133-133: Synced array contents with revised option values.

By updating select1 to contain spaced option strings, the displayed selections remain coherent.

examples/sites/demos/pc/app/base-select/native-properties-composition-api.vue (1)

12-16: Improved readability with spacing in option values.

Updating the values to “选项 1” through “选项 5” clarifies labeling without changing functionality.

examples/sites/demos/pc/app/base-select/slot-footer.vue (1)

24-28: LGTM! Consistent spacing improvements

The spacing changes in the options array are consistent and align with the documentation typesetting objectives.

examples/sites/demos/pc/app/base-select/automatic-dropdown.vue (2)

3-3: LGTM! Consistent scenario text formatting

The spacing improvements in scenario descriptions are consistent and enhance readability.

Also applies to: 8-8


28-32: LGTM! Consistent options formatting

The spacing changes in the options array match the established pattern.

examples/sites/demos/pc/app/base-select/searchable.vue (2)

3-3: LGTM! Consistent scenario text formatting

The spacing improvements in scenario descriptions maintain consistency with other files.

Also applies to: 10-10, 17-17


36-42: LGTM! Consistent options formatting

The spacing changes in the options array follow the established pattern across all files.

examples/sites/demos/pc/app/base-select/filter-method.vue (2)

3-3: LGTM: Improved text formatting

The addition of spaces in scenario labels improves readability.

Also applies to: 14-14


46-50: LGTM: Consistent option formatting

The addition of spaces in option values maintains consistency with the scenario labels.

examples/sites/demos/pc/app/base-select/manual-focus-blur.vue (1)

50-54: LGTM: Consistent option formatting

The addition of spaces in option values improves readability and maintains consistency.

@dufu1991 dufu1991 changed the title fix(vue-renderless): [amount, anchor, area, autocomplete] fix site: Optimize site documentation typesetting fix(vue-renderless): [amount, anchor, area, autocomplete, base-select] fix site: Optimize site documentation typesetting Dec 25, 2024
@zzcr zzcr changed the title fix(vue-renderless): [amount, anchor, area, autocomplete, base-select] fix site: Optimize site documentation typesetting fix(vue-renderless): [amount,anchor,area,autocomplete,base-select] fix site: Optimize site documentation typesetting Dec 25, 2024
@zzcr zzcr changed the title fix(vue-renderless): [amount,anchor,area,autocomplete,base-select] fix site: Optimize site documentation typesetting fix(vue-renderless): [autocomplete,base-select,amount,anchor,area] fix site: Optimize site documentation typesetting Dec 26, 2024
@zzcr
Copy link
Member

zzcr commented Dec 26, 2024

你好,感谢您的mr,有两个E2E测试用例没有过哈~~麻烦看一下

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


Hello, thank you for your Mr., there are two E2E test cases that I have not passed~~Please take a look.

@dufu1991
Copy link
Contributor Author

你好,感谢您的mr,有两个E2E测试用例没有过哈~~麻烦看一下

有些文案中文和动态数字组合的时候没有加空格,但是文案加了就过不了。比如 北京${index} ,实际文案是 北京 1,中间这个空格就不好处理,会有遗漏。

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


Hello, thank you Mr., there are two E2E test cases that I have not passed~~ Please take a look.

Some copywriting does not include spaces when combining Chinese and dynamic numbers, but the copywriting cannot pass if it is added. For example, Beijing ${index}, the actual copy is Beijing 1, the space in the middle is difficult to deal with, and there will be omissions.

@dufu1991
Copy link
Contributor Author

@zzcr 我看测试没过,这个 API 浏览器中有,Node 环境中好像没有吧,不是很懂。

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


@zzcr I don’t think it has passed the test. This API is available in the browser but not in the Node environment. I don’t understand it very well.

@zzcr zzcr merged commit 10ca9ef into opentiny:dev Dec 26, 2024
8 of 10 checks passed
@zzcr
Copy link
Member

zzcr commented Dec 26, 2024

那个是单元测试,我们新加的git-actions,这个不要紧,不是你修改带来的

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


That's the unit test, the new git-actions we added. It doesn't matter, it's not caused by your modification.

@dufu1991
Copy link
Contributor Author

@all-contributors please add @dufu1991 for

Copy link
Contributor

@dufu1991

I couldn't determine any contributions to add, did you specify any contributions?
Please make sure to use valid contribution names.

@dufu1991
Copy link
Contributor Author

@all-contributors please add @dufu1991 for doc.

Copy link
Contributor

@dufu1991

I've put up a pull request to add @dufu1991! 🎉

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.

3 participants