-
Notifications
You must be signed in to change notification settings - Fork 330
docs: add feature list #3135
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
docs: add feature list #3135
Conversation
WalkthroughThis update adds two new configuration properties, Changes
Sequence Diagram(s)sequenceDiagram
participant U as User
participant R as Router
participant L as Layout
participant F as FeaturesComponent
U->>R: Navigate to "/:context/zh-CN/:theme/features"
R->>L: Load Layout component
L->>F: Dynamically import and render Features component
F->>F: Process and display component features data
F-->>L: Return rendered view
L-->>U: Display complete Features page
Suggested labels
Suggested reviewers
Poem
Warning There were issues while running some tools. Please review the errors and either fix the tool’s configuration or disable the tool if it’s a critical failure. 🔧 ESLint
examples/sites/src/views/features.vueOops! Something went wrong! :( ESLint: 8.57.1 ESLint couldn't find the plugin "eslint-plugin-vue". (The package "eslint-plugin-vue" was not found when loaded as a Node module from the directory "".) It's likely that the plugin isn't installed correctly. Try reinstalling by running the following: The plugin "eslint-plugin-vue" was referenced from the config file in ".eslintrc.js » @antfu/eslint-config » @antfu/eslint-config-vue". If you still can't figure out the problem, please stop by https://eslint.org/chat/help to chat with the team. Tip ⚡🧪 Multi-step agentic review comment chat (experimental)
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Walkthrough此PR为多个组件的文档添加了特性列表,主要包括展示和规范内组件的标识。还引入了一个新的路由和视图来显示组件特性。 Changes
|
|
[e2e-test-warn] 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 |
| if (!arr || arr.length === 0) return | ||
| if (arr.length <= step) return [arr] | ||
| return arr.reduce((x, y) => { | ||
| return Array.isArray(x) ? (x[x.length - 1].push(y) === step ? [...x, []] : x) : [[x, y]] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reduce function here might not work as intended. The logic seems to be trying to group elements, but the condition x[x.length - 1].push(y) === step might not correctly form groups of step size. Consider revising this logic to ensure proper grouping.
WalkthroughThis PR adds a feature list to the documentation of multiple components, mainly including the identification of components within the display and specification. A new route and view is also introduced to display component features. Changes
|
There was a problem hiding this 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/src/views/features.vue (1)
73-79: Consider simplifying the group function.The
groupfunction for organizing features is creative but somewhat complex. Consider a more straightforward implementation for better maintainability.-const group = (arr, step = 3) => { - if (!arr || arr.length === 0) return - if (arr.length <= step) return [arr] - return arr.reduce((x, y) => { - return Array.isArray(x) ? (x[x.length - 1].push(y) === step ? [...x, []] : x) : [[x, y]] - }) -} +const group = (arr, step = 3) => { + if (!arr || arr.length === 0) return [] + if (arr.length <= step) return [arr] + const result = [] + for (let i = 0; i < arr.length; i += step) { + result.push(arr.slice(i, i + step)) + } + return result +}
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (92)
examples/sites/demos/pc/app/action-menu/webdoc/action-menu.js(1 hunks)examples/sites/demos/pc/app/alert/webdoc/alert.js(1 hunks)examples/sites/demos/pc/app/anchor/webdoc/anchor.js(1 hunks)examples/sites/demos/pc/app/autocomplete/webdoc/autocomplete.js(1 hunks)examples/sites/demos/pc/app/badge/webdoc/badge.js(1 hunks)examples/sites/demos/pc/app/base-select/webdoc/base-select.js(1 hunks)examples/sites/demos/pc/app/breadcrumb/webdoc/breadcrumb.js(1 hunks)examples/sites/demos/pc/app/bulletin-board/webdoc/bulletin-board.js(1 hunks)examples/sites/demos/pc/app/button-group/webdoc/button-group.js(1 hunks)examples/sites/demos/pc/app/button/webdoc/button.js(1 hunks)examples/sites/demos/pc/app/calendar-view/webdoc/calendar-view.js(1 hunks)examples/sites/demos/pc/app/calendar/webdoc/calendar.js(1 hunks)examples/sites/demos/pc/app/card/webdoc/card.js(1 hunks)examples/sites/demos/pc/app/carousel/webdoc/carousel.js(1 hunks)examples/sites/demos/pc/app/cascader-panel/webdoc/cascader-panel.js(1 hunks)examples/sites/demos/pc/app/cascader/webdoc/cascader.js(1 hunks)examples/sites/demos/pc/app/checkbox/webdoc/checkbox.js(1 hunks)examples/sites/demos/pc/app/collapse/webdoc/collapse.js(1 hunks)examples/sites/demos/pc/app/color-picker/webdoc/color-picker.js(1 hunks)examples/sites/demos/pc/app/color-select-panel/webdoc/color-select-panel.js(1 hunks)examples/sites/demos/pc/app/config-provider/webdoc/config-provider.js(1 hunks)examples/sites/demos/pc/app/container/webdoc/container.js(1 hunks)examples/sites/demos/pc/app/crop/webdoc/crop.js(1 hunks)examples/sites/demos/pc/app/date-picker/webdoc/date-picker.js(1 hunks)examples/sites/demos/pc/app/dialog-box/webdoc/dialog-box.js(1 hunks)examples/sites/demos/pc/app/dialog-select/webdoc/dialog-select.js(1 hunks)examples/sites/demos/pc/app/divider/webdoc/divider.js(1 hunks)examples/sites/demos/pc/app/drawer/webdoc/drawer.js(1 hunks)examples/sites/demos/pc/app/drop-times/webdoc/drop-times.js(1 hunks)examples/sites/demos/pc/app/dropdown/webdoc/dropdown.js(1 hunks)examples/sites/demos/pc/app/file-upload/webdoc/file-upload.js(1 hunks)examples/sites/demos/pc/app/filter-panel/webdoc/filter-panel.js(1 hunks)examples/sites/demos/pc/app/floatbar/webdoc/floatbar.js(1 hunks)examples/sites/demos/pc/app/flowchart/webdoc/flowchart.js(1 hunks)examples/sites/demos/pc/app/fluent-editor/webdoc/fluent-editor.js(1 hunks)examples/sites/demos/pc/app/form/webdoc/form.js(1 hunks)examples/sites/demos/pc/app/fullscreen/webdoc/fullscreen.js(1 hunks)examples/sites/demos/pc/app/grid/webdoc/grid.js(1 hunks)examples/sites/demos/pc/app/guide/webdoc/guide.js(1 hunks)examples/sites/demos/pc/app/icon/webdoc/icon.js(1 hunks)examples/sites/demos/pc/app/image/webdoc/image.js(1 hunks)examples/sites/demos/pc/app/infinite-scroll/webdoc/infinite-scroll.js(1 hunks)examples/sites/demos/pc/app/input/webdoc/input.js(1 hunks)examples/sites/demos/pc/app/ip-address/webdoc/ip-address.js(1 hunks)examples/sites/demos/pc/app/layout/webdoc/layout.js(1 hunks)examples/sites/demos/pc/app/link/webdoc/link.js(1 hunks)examples/sites/demos/pc/app/loading/webdoc/loading.js(1 hunks)examples/sites/demos/pc/app/milestone/webdoc/milestone.js(1 hunks)examples/sites/demos/pc/app/mind-map/webdoc/mind-map.js(1 hunks)examples/sites/demos/pc/app/modal/webdoc/modal.js(1 hunks)examples/sites/demos/pc/app/nav-menu/webdoc/nav-menu.js(1 hunks)examples/sites/demos/pc/app/notify/webdoc/notify.js(1 hunks)examples/sites/demos/pc/app/numeric/webdoc/numeric.js(1 hunks)examples/sites/demos/pc/app/pager/webdoc/pager.js(1 hunks)examples/sites/demos/pc/app/pop-upload/webdoc/pop-upload.js(1 hunks)examples/sites/demos/pc/app/popconfirm/webdoc/popconfirm.js(1 hunks)examples/sites/demos/pc/app/popeditor/webdoc/popeditor.js(1 hunks)examples/sites/demos/pc/app/popover/webdoc/popover.js(1 hunks)examples/sites/demos/pc/app/progress/webdoc/progress.js(1 hunks)examples/sites/demos/pc/app/qr-code/webdoc/qr-code.js(1 hunks)examples/sites/demos/pc/app/radio/webdoc/radio.js(1 hunks)examples/sites/demos/pc/app/rate/webdoc/rate.js(1 hunks)examples/sites/demos/pc/app/scroll-text/webdoc/scroll-text.js(1 hunks)examples/sites/demos/pc/app/search/webdoc/search.js(1 hunks)examples/sites/demos/pc/app/select/webdoc/select.js(1 hunks)examples/sites/demos/pc/app/skeleton/webdoc/skeleton.js(1 hunks)examples/sites/demos/pc/app/slider/webdoc/slider.js(1 hunks)examples/sites/demos/pc/app/split/webdoc/split.js(1 hunks)examples/sites/demos/pc/app/statistic/webdoc/statistic.js(1 hunks)examples/sites/demos/pc/app/steps/webdoc/steps.js(1 hunks)examples/sites/demos/pc/app/sticky/webdoc/sticky.js(1 hunks)examples/sites/demos/pc/app/switch/webdoc/switch.js(1 hunks)examples/sites/demos/pc/app/tabs/webdoc/tabs.js(1 hunks)examples/sites/demos/pc/app/tag-group/webdoc/tag-group.js(1 hunks)examples/sites/demos/pc/app/tag/webdoc/tag.js(1 hunks)examples/sites/demos/pc/app/text-popup/webdoc/text-popup.js(1 hunks)examples/sites/demos/pc/app/time-line/webdoc/time-line.js(1 hunks)examples/sites/demos/pc/app/time-picker/webdoc/time-picker.js(1 hunks)examples/sites/demos/pc/app/time-select/webdoc/time-select.js(1 hunks)examples/sites/demos/pc/app/tooltip/webdoc/tooltip.js(1 hunks)examples/sites/demos/pc/app/transfer/webdoc/transfer.js(1 hunks)examples/sites/demos/pc/app/tree-menu/webdoc/tree-menu.js(1 hunks)examples/sites/demos/pc/app/tree-select/webdoc/tree-select.js(1 hunks)examples/sites/demos/pc/app/tree/webdoc/tree.js(1 hunks)examples/sites/demos/pc/app/user-contact/webdoc/user-contact.js(1 hunks)examples/sites/demos/pc/app/user-head/webdoc/user-head.js(1 hunks)examples/sites/demos/pc/app/virtual-scroll-box/webdoc/virtual-scroll-box.js(1 hunks)examples/sites/demos/pc/app/virtual-tree/webdoc/virtual-tree.js(1 hunks)examples/sites/demos/pc/app/watermark/webdoc/watermark.js(1 hunks)examples/sites/demos/pc/app/wizard/webdoc/wizard.js(1 hunks)examples/sites/src/router.js(2 hunks)examples/sites/src/views/features.vue(1 hunks)
🔇 Additional comments (97)
examples/sites/demos/pc/app/calendar/webdoc/calendar.js (1)
4-5: Configuration properties added for component visibility and cloud supportThese new properties enhance the configurability of the Calendar component:
show: truecontrols whether the component is visible in documentation or feature listscloud: falseindicates this component doesn't have cloud-related functionalityThese changes align with the PR goal of adding feature list capabilities to the TinyVue documentation.
examples/sites/demos/pc/app/container/webdoc/container.js (1)
4-5: Configuration properties added for component visibility and cloud supportThese new properties enhance the configurability of the Container component:
show: truecontrols whether the component is visible in documentation or feature listscloud: falseindicates this component doesn't have cloud-related functionalityThese changes align with the PR goal of adding feature list capabilities to the TinyVue documentation.
examples/sites/demos/pc/app/nav-menu/webdoc/nav-menu.js (1)
4-5: Configuration properties added for component visibility and cloud supportThese new properties enhance the configurability of the NavMenu component:
show: truecontrols whether the component is visible in documentation or feature listscloud: falseindicates this component doesn't have cloud-related functionalityThese changes align with the PR goal of adding feature list capabilities to the TinyVue documentation.
examples/sites/demos/pc/app/floatbar/webdoc/floatbar.js (1)
4-5: Configuration properties added for component visibility and cloud supportThese new properties enhance the configurability of the Floatbar component:
show: truecontrols whether the component is visible in documentation or feature listscloud: falseindicates this component doesn't have cloud-related functionalityThese changes align with the PR goal of adding feature list capabilities to the TinyVue documentation.
examples/sites/demos/pc/app/tag/webdoc/tag.js (1)
4-5: Adding configuration for component visibility and cloud integrationThese new properties enhance the component configuration:
show: true- Controls whether the tag component should be displayed in documentation/UIcloud: true- Indicates the component is available for cloud environmentsThis aligns with the PR's goal of adding feature list support to the documentation.
examples/sites/demos/pc/app/dialog-box/webdoc/dialog-box.js (1)
4-5: Adding configuration for component visibility and cloud integrationThese new properties enhance the component configuration:
show: true- Controls whether the dialog-box component should be displayed in documentation/UIcloud: true- Indicates the component is available for cloud environmentsThis aligns with the PR's goal of adding feature list support to the documentation.
examples/sites/demos/pc/app/slider/webdoc/slider.js (1)
4-5: Adding configuration for component visibility and cloud integrationThese new properties enhance the component configuration:
show: true- Controls whether the slider component should be displayed in documentation/UIcloud: true- Indicates the component is available for cloud environmentsThis aligns with the PR's goal of adding feature list support to the documentation.
examples/sites/demos/pc/app/badge/webdoc/badge.js (1)
4-5: Adding configuration for component visibility and cloud integrationThese new properties enhance the component configuration:
show: true- Controls whether the badge component should be displayed in documentation/UIcloud: true- Indicates the component is available for cloud environmentsThis aligns with the PR's goal of adding feature list support to the documentation.
examples/sites/demos/pc/app/tree-menu/webdoc/tree-menu.js (1)
4-5: Adding configuration properties for component display and cloud functionality.These new properties enhance the component's configurability, allowing control over visibility and cloud-related features.
examples/sites/demos/pc/app/pager/webdoc/pager.js (1)
4-5: Adding configuration properties for component display and cloud functionality.These new properties enhance the component's configurability by enabling visibility control (
show: true) and cloud feature integration (cloud: true).examples/sites/demos/pc/app/icon/webdoc/icon.js (1)
4-5: Adding configuration properties for component display and cloud functionality.The new properties
showandcloudenable control over the component's visibility and cloud feature integration.examples/sites/demos/pc/app/card/webdoc/card.js (1)
4-5: Adding configuration properties for component display and cloud functionality.These new properties align with the pattern added to other components in this PR, providing consistent configuration options for visibility and cloud feature integration across the component library.
examples/sites/demos/pc/app/qr-code/webdoc/qr-code.js (1)
4-5: The show and cloud configuration properties look good.These new properties (
show: true,cloud: false) align with the documentation enhancement by allowing control over component visibility and cloud-related functionality. The QR code component is properly configured to be shown in the documentation but excluded from cloud features.examples/sites/demos/pc/app/link/webdoc/link.js (1)
4-5: Configuration properties are properly set.The added properties (
show: true,cloud: true) ensure the Link component is displayed in both the documentation and cloud environment, which is consistent with the component's nature as a fundamental UI element.examples/sites/demos/pc/app/divider/webdoc/divider.js (1)
4-5: Consistent configuration added.The
showandcloudproperties are correctly set totrue, ensuring this component is visible in both normal and cloud documentation contexts. This maintains consistency with other UI components in the library.examples/sites/demos/pc/app/date-picker/webdoc/date-picker.js (1)
4-5: Configuration properties properly implemented.The DatePicker component now correctly includes the standard visibility and cloud-related configuration properties. This is consistent with other components and supports the documentation enhancement purpose of this PR.
examples/sites/demos/pc/app/drawer/webdoc/drawer.js (1)
4-5: LGTM: Configuration properties for component visibility and cloud integration.Adding the
showandcloudproperties enables controlling component visibility and cloud-related functionality in the documentation. This change is part of a consistent pattern applied across multiple components to support feature listing.examples/sites/demos/pc/app/radio/webdoc/radio.js (1)
4-5: LGTM: Consistent configuration properties added.The
showandcloudproperties align with the pattern applied to other components, ensuring uniform configuration capabilities across the component library.examples/sites/demos/pc/app/skeleton/webdoc/skeleton.js (1)
4-5: LGTM: Standard configuration properties maintained.The addition of
showandcloudproperties follows the established pattern, enabling this component to be properly included in feature listings and documentation views.examples/sites/demos/pc/app/carousel/webdoc/carousel.js (1)
4-5: LGTM: Configuration consistent with other components.The added
showandcloudproperties maintain consistency with other component configurations, supporting the feature listing functionality described in the PR objectives.examples/sites/demos/pc/app/tag-group/webdoc/tag-group.js (1)
4-5: Documentation configuration properties addedThe addition of
show: trueandcloud: trueenhances the component configuration to control visibility in documentation and indicate cloud compatibility. These properties will likely be used by a feature list component to filter and display components based on these settings.examples/sites/demos/pc/app/layout/webdoc/layout.js (1)
4-5: Documentation visibility configured with cloud feature disabledThe configuration sets
show: trueto display this component in the documentation, whilecloud: falseindicates this component is not available or relevant for cloud-related features. This helps maintain consistency with the documentation feature list being implemented.examples/sites/demos/pc/app/sticky/webdoc/sticky.js (1)
4-5: Documentation visibility configured with cloud feature disabledThe addition of
show: truemakes this component visible in the documentation, whilecloud: falseindicates it's not available for cloud-related features. This configuration supports the new feature list functionality in the documentation.examples/sites/demos/pc/app/grid/webdoc/grid.js (1)
4-5: Documentation configuration properties added with cloud supportThe grid component is configured with both
show: trueandcloud: true, making it visible in the documentation and indicating it's compatible with cloud features. This aligns with the PR's goal of adding a feature list to the documentation.examples/sites/demos/pc/app/time-picker/webdoc/time-picker.js (1)
4-5: Configuration added for feature list visibility and cloud support.The addition of
show: trueandcloud: trueproperties enables this component to be displayed in the feature list and marks it as having cloud functionality.examples/sites/demos/pc/app/input/webdoc/input.js (1)
4-5: Configuration added for feature list visibility and cloud support.The addition of
show: trueandcloud: trueproperties enables this component to be displayed in the feature list and marks it as having cloud functionality.examples/sites/demos/pc/app/alert/webdoc/alert.js (1)
4-5: Configuration added for feature list visibility and cloud support.The addition of
show: trueandcloud: trueproperties enables this component to be displayed in the feature list and marks it as having cloud functionality.examples/sites/demos/pc/app/collapse/webdoc/collapse.js (1)
4-5: Configuration added for feature list visibility and cloud support.The addition of
show: trueandcloud: trueproperties enables this component to be displayed in the feature list and marks it as having cloud functionality.examples/sites/demos/pc/app/guide/webdoc/guide.js (1)
4-5: Component visibility configuration addedThe addition of
show: trueandcloud: trueproperties appears to be part of a broader documentation enhancement to control component visibility and cloud feature availability in a feature list. These properties will likely be used by the new feature list component mentioned in the PR objectives.examples/sites/demos/pc/app/wizard/webdoc/wizard.js (1)
4-5: Component visibility configuration added with cloud disabledThe addition of
show: trueindicates this component should be visible in the feature list, whilecloud: falsesuggests this component doesn't support cloud functionality. This is consistent with the pattern applied across multiple components in this PR.examples/sites/demos/pc/app/pop-upload/webdoc/pop-upload.js (1)
4-5: Component visibility configuration added with cloud disabledThe visibility configuration (
show: true) will include this component in the feature list, whilecloud: falseindicates this upload component doesn't have cloud-specific functionality. This makes sense for a component that may handle local file uploads.examples/sites/demos/pc/app/watermark/webdoc/watermark.js (1)
4-5: Component visibility configuration added with cloud disabledThe addition of
show: trueandcloud: falseis consistent with the pattern across other components. This watermark component will be visible in the feature list but doesn't offer cloud-specific functionality, which aligns with the typical use case for watermarks.examples/sites/demos/pc/app/time-line/webdoc/time-line.js (1)
4-5: Configuration properties added for feature visibility and cloud functionality.The added
showandcloudproperties will enable control over component visibility in documentation and cloud-related functionality. This is consistent with similar changes across other components.examples/sites/demos/pc/app/anchor/webdoc/anchor.js (1)
4-5: Configuration properties added for feature visibility and cloud functionality.The added
showandcloudproperties will enable control over component visibility in documentation and cloud-related functionality. This is consistent with similar changes across other components.examples/sites/demos/pc/app/rate/webdoc/rate.js (1)
4-5: Configuration added with cloud functionality disabled for Rate component.The added
show: trueenables visibility in documentation, whilecloud: falsespecifically disables cloud functionality for this component, unlike most other components where it's enabled. This distinction is likely intentional based on component requirements.examples/sites/demos/pc/app/numeric/webdoc/numeric.js (1)
4-5: Configuration properties added for feature visibility and cloud functionality.The added
showandcloudproperties will enable control over component visibility in documentation and cloud-related functionality. This is consistent with similar changes across other components.examples/sites/demos/pc/app/search/webdoc/search.js (1)
4-5: Added configuration properties to control component visibility and cloud integration.The addition of
show: trueandcloud: trueproperties to the search component configuration aligns with the PR objective to enhance documentation by adding a feature list. These properties will allow the application to control whether this component should be displayed in the feature list and whether it supports cloud functionality.examples/sites/demos/pc/app/tabs/webdoc/tabs.js (1)
4-5: Added configuration properties to control component visibility and cloud integration.The addition of
show: trueandcloud: trueproperties to the tabs component configuration is consistent with the changes made to other components. These properties will enable the component to be properly categorized and displayed in the feature list being implemented.examples/sites/demos/pc/app/notify/webdoc/notify.js (1)
4-5: Added configuration properties withcloudset to false for notify component.Added
show: trueto include this component in the feature list, butcloud: falseindicates that this component doesn't support cloud functionality. This distinction is important for accurately representing component capabilities in the documentation.examples/sites/demos/pc/app/mind-map/webdoc/mind-map.js (1)
4-5: Added configuration properties withcloudset to false for mind-map component.The addition of
show: trueandcloud: falseproperties properly categorizes the mind-map component for the feature list. Settingcloud: falsecorrectly indicates that this more complex visualization component doesn't have cloud integration support.examples/sites/demos/pc/app/time-select/webdoc/time-select.js (1)
4-5: Configuration looks good for time-select componentAdding the
showandcloudproperties to control component visibility and cloud feature flags is consistent with the documentation enhancement for feature listing.examples/sites/demos/pc/app/crop/webdoc/crop.js (1)
4-5: Configuration looks good for crop componentAdding the
showandcloudproperties to control component visibility and cloud feature flags is consistent with the documentation enhancement for feature listing.examples/sites/demos/pc/app/switch/webdoc/switch.js (1)
4-5: Configuration looks good for switch componentAdding the
showandcloudproperties to control component visibility and cloud feature flags is consistent with the documentation enhancement for feature listing. Note that unlike some other components, switch hascloud: true.examples/sites/demos/pc/app/flowchart/webdoc/flowchart.js (1)
4-5: Configuration looks good for flowchart componentAdding the
showandcloudproperties to control component visibility and cloud feature flags is consistent with the documentation enhancement for feature listing.examples/sites/demos/pc/app/breadcrumb/webdoc/breadcrumb.js (1)
4-5: Good addition of configuration flags.Adding the
showandcloudproperties helps with controlling component visibility and indicating cloud compatibility in the documentation feature list.examples/sites/demos/pc/app/text-popup/webdoc/text-popup.js (1)
4-5: Appropriate configuration for text-popup component.Setting
show: truewhile keepingcloud: falsecorrectly indicates this component should be displayed in documentation but might not be fully supported in cloud environments.examples/sites/demos/pc/app/base-select/webdoc/base-select.js (1)
4-5: Correct implementation of display flags.The configuration for visibility (
show: true) and cloud compatibility (cloud: true) aligns with the documentation feature list implementation pattern.examples/sites/demos/pc/app/checkbox/webdoc/checkbox.js (1)
4-5: Consistent implementation of feature flags.The addition of
show: trueandcloud: truemaintains consistency with other components and properly configures this component for the documentation feature list.examples/sites/demos/pc/app/steps/webdoc/steps.js (1)
4-5: Configuration properties added consistently with documentation updateThese new configuration properties (
showandcloud) align with the PR objective of adding a feature list to the documentation. Theshow: trueproperty likely controls component visibility in the documentation, whilecloud: trueindicates cloud functionality support.examples/sites/demos/pc/app/split/webdoc/split.js (1)
4-5: Configuration properties added for documentation feature listThe addition of
show: trueandcloud: falseproperties is consistent with the feature list enhancement mentioned in the PR objectives. Unlike some other components, this one hascloud: false, indicating it doesn't support cloud functionality.examples/sites/demos/pc/app/popeditor/webdoc/popeditor.js (1)
4-5: Configuration properties added for component visibility and cloud supportThe new
show: trueandcloud: falseproperties are part of the systematic update to add feature list documentation. This component is marked as visible but without cloud functionality support.examples/sites/demos/pc/app/autocomplete/webdoc/autocomplete.js (1)
4-5: Configuration properties added for documentation featuresThe addition of
show: trueandcloud: trueproperties aligns with the PR's documentation enhancement goal. This component is configured to be visible and supporting cloud functionality.examples/sites/demos/pc/app/image/webdoc/image.js (1)
4-5: Standardized component configuration with visibility and cloud flags.The addition of
showandcloudproperties enhances the component configuration, providing control over whether this component should be displayed in the documentation and whether it supports cloud functionality.examples/sites/demos/pc/app/loading/webdoc/loading.js (1)
4-5: Standardized component configuration with visibility and cloud flags.The addition of
showandcloudproperties enhances the component configuration, providing control over whether this component should be displayed in the documentation and whether it supports cloud functionality.examples/sites/demos/pc/app/cascader-panel/webdoc/cascader-panel.js (1)
4-5: Standardized component configuration with visibility and cloud flags.The addition of
showandcloudproperties enhances the component configuration, providing control over whether this component should be displayed in the documentation and whether it supports cloud functionality.examples/sites/demos/pc/app/tree-select/webdoc/tree-select.js (1)
4-5: Standardized component configuration with visibility and cloud flags.The addition of
showandcloudproperties enhances the component configuration, providing control over whether this component should be displayed in the documentation and whether it supports cloud functionality.examples/sites/demos/pc/app/popconfirm/webdoc/popconfirm.js (1)
4-5: Added configuration properties for component visibility and cloud compatibility.These new properties appear to be part of a systematic update across components to control visibility in documentation and indicate cloud compatibility.
examples/sites/demos/pc/app/bulletin-board/webdoc/bulletin-board.js (1)
4-5: Component flagged as visible but not cloud-compatible.The
show: trueproperty enables visibility in documentation, whilecloud: falseindicates this component isn't available in cloud environments.examples/sites/demos/pc/app/drop-times/webdoc/drop-times.js (1)
4-5: Component configured for documentation display but not for cloud.This configuration matches other time-related components that are visible in documentation but not supported in cloud deployments.
examples/sites/demos/pc/app/dialog-select/webdoc/dialog-select.js (1)
4-5: Dialog-select component marked as visible but not cloud-compatible.This configuration is consistent with other dialog/selection components in the codebase, maintaining documentation visibility but indicating cloud limitations.
examples/sites/demos/pc/app/form/webdoc/form.js (1)
4-5: Configuration flags added for component visibility and cloud support.The addition of
show: trueandcloud: trueproperties standardizes the configuration for component visibility and cloud functionality support. This aligns with the broader implementation across other components in the documentation.examples/sites/demos/pc/app/transfer/webdoc/transfer.js (1)
4-5: Configuration flags added for component visibility and cloud support.The addition of
show: trueandcloud: trueproperties standardizes the configuration for component visibility and cloud functionality support. This matches the implementation in other components and enables consistent handling in the documentation system.examples/sites/demos/pc/app/button-group/webdoc/button-group.js (1)
4-5: Configuration flags added for component visibility and cloud support.The addition of
show: trueandcloud: trueproperties standardizes the configuration for component visibility and cloud functionality support. This matches the implementation in other components and enables consistent handling in the documentation system.examples/sites/demos/pc/app/user-head/webdoc/user-head.js (1)
4-5: Configuration flags added with cloud functionality disabled.The addition of
show: trueandcloud: falseproperties indicates that this component should be visible in the documentation but is not supported in cloud implementations. This differs from most other components where cloud support is typically enabled.examples/sites/demos/pc/app/tree/webdoc/tree.js (1)
4-5: Configuration properties added for component visibility and cloud features.These new properties allow controlling the component's visibility in documentation (
show: true) and indicate cloud feature support (cloud: true).examples/sites/demos/pc/app/dropdown/webdoc/dropdown.js (1)
4-5: Configuration properties added for component visibility and cloud features.Added consistent properties to control component visibility (
show: true) and indicate cloud feature support (cloud: true).examples/sites/demos/pc/app/color-picker/webdoc/color-picker.js (1)
4-5: Configuration properties added with cloud features disabled.Added properties to control component visibility (
show: true) while specifying that cloud features are not supported for this component (cloud: false).examples/sites/demos/pc/app/select/webdoc/select.js (1)
4-5: Configuration properties added for component visibility and cloud features.Added consistent properties to control component visibility (
show: true) and indicate cloud feature support (cloud: true).examples/sites/demos/pc/app/filter-panel/webdoc/filter-panel.js (1)
4-5: Added configuration properties for component visibility and cloud functionality.These new properties enhance component configuration by indicating whether the component should be displayed (
show: true) and whether it has cloud functionality (cloud: false).examples/sites/demos/pc/app/modal/webdoc/modal.js (1)
4-5: Added display and cloud configuration properties.The additions of
show: trueandcloud: trueproperly configure the modal component for visibility and cloud integration. This aligns with the pattern applied across other components in this PR.examples/sites/demos/pc/app/milestone/webdoc/milestone.js (1)
4-5: Added component visibility and cloud support configuration.The addition of
show: trueenables the component to be visible in the documentation, whilecloud: falseindicates this component doesn't have cloud functionality.examples/sites/demos/pc/app/action-menu/webdoc/action-menu.js (1)
4-5: Added display and cloud support configuration properties.The additions of
show: trueandcloud: trueproperly configure this component to be visible in the documentation and indicate it has cloud-related functionality.examples/sites/demos/pc/app/fluent-editor/webdoc/fluent-editor.js (1)
4-5: Added component configuration flags for documentation visibility.The new
showandcloudproperties will control whether this component appears in the feature list documentation and whether it has cloud functionality support.examples/sites/demos/pc/app/tooltip/webdoc/tooltip.js (1)
4-5: Added component configuration flags for feature list.The new
showandcloudproperties are correctly configured to include this component in the feature list documentation with cloud functionality support enabled.examples/sites/demos/pc/app/scroll-text/webdoc/scroll-text.js (1)
4-5: Added component documentation visibility flags.The new properties will allow this component to be shown in the feature list documentation (
show: true) while indicating it doesn't support cloud functionality (cloud: false).examples/sites/demos/pc/app/fullscreen/webdoc/fullscreen.js (1)
4-5: Added component documentation configuration flags.The new
showandcloudproperties correctly configure this component to appear in the feature list with cloud functionality support enabled.examples/sites/demos/pc/app/calendar-view/webdoc/calendar-view.js (1)
4-5: Component visibility and cloud integration configuration added.The addition of
show: trueandcloud: falseproperties enables control over component visibility and cloud integration functionality. This is part of a larger effort to standardize component configurations across the TinyVue library, likely to support the new feature list implementation mentioned in the PR.examples/sites/demos/pc/app/ip-address/webdoc/ip-address.js (1)
4-5: Component visibility and cloud integration configuration added.The addition of
show: trueandcloud: trueproperties enables control over component visibility and cloud integration functionality. Settingcloud: trueindicates this component is enabled for cloud-related features, unlike some other components in the codebase.examples/sites/demos/pc/app/user-contact/webdoc/user-contact.js (1)
4-5: Component visibility and cloud integration configuration added.The addition of
show: trueandcloud: falseproperties enables control over component visibility and disables cloud integration functionality for this component. This configuration is consistent with the standardization effort across the component library to support the new feature list.examples/sites/demos/pc/app/popover/webdoc/popover.js (1)
4-5: Component visibility and cloud integration configuration added.The addition of
show: trueandcloud: trueproperties enables control over component visibility and cloud integration functionality. This popover component is enabled for cloud features, consistent with the configuration pattern being applied across the component library.examples/sites/demos/pc/app/virtual-scroll-box/webdoc/virtual-scroll-box.js (1)
4-5: Property additions for component visibility and cloud supportThese new properties help control the component's visibility (
show: true) in the feature list while indicating it doesn't support cloud functionality (cloud: false). This aligns with the PR objective of adding a feature list.examples/sites/demos/pc/app/statistic/webdoc/statistic.js (1)
4-5: Property additions for component visibility and cloud supportThese new properties help control the component's visibility (
show: true) in the feature list while indicating it doesn't support cloud functionality (cloud: false). This aligns with the PR objective of adding a feature list.examples/sites/demos/pc/app/cascader/webdoc/cascader.js (1)
4-5: Property additions for component visibility and cloud supportThese new properties help control the component's visibility (
show: true) in the feature list while indicating it supports cloud functionality (cloud: true). This aligns with the PR objective of adding a feature list.examples/sites/demos/pc/app/file-upload/webdoc/file-upload.js (1)
4-5: Property additions for component visibility and cloud supportThese new properties help control the component's visibility (
show: true) in the feature list while indicating it supports cloud functionality (cloud: true). This fits with the file-upload component which typically would integrate with cloud storage services.examples/sites/demos/pc/app/progress/webdoc/progress.js (1)
4-5: Documentation configuration properties added.These new properties enhance the component's metadata for documentation purposes:
show: trueindicates this component should be visible in the feature listcloud: truemarks this component as having cloud environment supportThese additions align with the PR objective of adding a feature list to the documentation.
examples/sites/demos/pc/app/color-select-panel/webdoc/color-select-panel.js (1)
4-5: Documentation configuration properties added.These new properties enhance the component's metadata for documentation purposes:
show: trueindicates this component should be visible in the feature listcloud: falseexplicitly marks this component as not having cloud environment supportThe difference in cloud support configuration compared to other components is appropriate for documentation clarity.
examples/sites/demos/pc/app/config-provider/webdoc/config-provider.js (1)
4-5: Documentation configuration properties added.These new properties enhance the component's metadata for documentation purposes:
show: trueindicates this component should be visible in the feature listcloud: truemarks this component as having cloud environment supportThese additions are consistent with the pattern applied to other components in this PR.
examples/sites/demos/pc/app/virtual-tree/webdoc/virtual-tree.js (1)
4-5: Documentation configuration properties added.These new properties enhance the component's metadata for documentation purposes:
show: trueindicates this component should be visible in the feature listcloud: falseexplicitly marks this component as not having cloud environment supportThis configuration aligns with the component's capabilities and the PR's documentation objectives.
examples/sites/demos/pc/app/infinite-scroll/webdoc/infinite-scroll.js (1)
4-5: Good addition of configuration properties.Adding the
showandcloudproperties provides clear indicators for documentation display and cloud compatibility. This aligns with the overall documentation improvement objectives of the PR.examples/sites/src/router.js (2)
8-8: Proper import for the new Features component.The dynamic import is consistent with the pattern used for other view components in the router.
34-40: Well-structured route configuration for the features page.The route configuration follows the established pattern in the codebase. The comment indicating this is an internal feature is helpful for other developers.
examples/sites/demos/pc/app/button/webdoc/button.js (2)
147-148: Good addition of visibility and compatibility flags.The
showandcloudproperties clearly indicate that this component should be visible in documentation and is compliant with cloud specifications.
149-270: Well-structured and comprehensive feature documentation.The
featuresarray provides detailed information about each button feature, including:
- Clear identification with IDs and names
- Support status
- Descriptive explanations
- Cloud compatibility details with helpful remarks
- Related API references
- Demo cross-references
This structured approach will greatly enhance the documentation and make it easier for developers to understand the component's capabilities.
examples/sites/src/views/features.vue (4)
1-37: Well-designed feature list component template.The template provides a clear and organized view of components and their features:
- The header shows meaningful metrics (component and feature counts)
- The filter toggle for cloud components adds useful functionality
- The component listing with feature counts is visually informative
- The grid layout for features ensures good organization
The component naming convention transformation to UpperCamelCase improves readability.
39-71: Effective data loading and component initialization.The script effectively:
- Imports necessary dependencies
- Sets up reactive state variables
- Uses the glob import pattern to dynamically load component documentation
- Calculates metrics for components and features
- Properly filters components based on the
showpropertyThis implementation supports the PR's goal of adding a feature list while maintaining good performance.
81-85: Good utility function for formatting component names.The
toUpperCamelCasefunction correctly transforms kebab-case component names to UpperCamelCase format for display purposes, following a common convention in Vue documentation.
88-115: Clean and effective component styling.The styles are well-organized with appropriate naming conventions. The use of flexbox for alignment and the styling for component count badges creates a visually pleasing interface.
There was a problem hiding this 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
♻️ Duplicate comments (1)
examples/sites/src/views/features.vue (1)
73-79:⚠️ Potential issueFix the group function implementation
The
reducefunction here doesn't work as intended. The logic tries to group elements, but the conditionx[x.length - 1].push(y) === stepwill not correctly form groups ofstepsize becausepushreturns the new array length, not the pushed element.const group = (arr, step = 3) => { if (!arr || arr.length === 0) return if (arr.length <= step) return [arr] - return arr.reduce((x, y) => { - return Array.isArray(x) ? (x[x.length - 1].push(y) === step ? [...x, []] : x) : [[x, y]] - }) + const result = [] + for (let i = 0; i < arr.length; i += step) { + result.push(arr.slice(i, i + step)) + } + return result }
🧹 Nitpick comments (4)
examples/sites/src/views/features.vue (4)
14-17: Consider using a computed property for filtered componentsMoving the filtering logic from the template to a computed property would improve readability and performance by avoiding unnecessary re-computations during renders.
<script setup> import { TinyLayout, TinyRow, TinyCol, TinySwitch } from '@opentiny/vue' -import { onMounted, ref } from 'vue' +import { computed, onMounted, ref } from 'vue' const componentCount = ref(0) const featureCount = ref(0) const components = ref([]) const isCloud = ref(false) +const filteredComponents = computed(() => { + return isCloud.value ? components.value.filter((item) => item.config.cloud) : components.value +}) </script> // Then in template <div - v-for="(component, componentIndex) of isCloud ? components.filter((item) => item.config.cloud) : components" + v-for="(component, componentIndex) of filteredComponents" :key="component.name" >
48-71: Add error handling for component importsThe current implementation doesn't handle potential errors when importing component documentation, which could cause the entire component to fail silently.
onMounted(async () => { const componentDocs = import.meta.glob(`@demos/app/**/webdoc/*.js`) for (const item in componentDocs) { - const componentName = item.split('/')[4] - const componentConfig = (await componentDocs[item]()).default - - if (componentConfig.show) { - componentCount.value++ - components.value.push({ - name: componentName, - config: componentConfig - }) - - const features = componentConfig.features - - if (features) { - for (const feature in features) { - featureCount.value++ - } - } - } + try { + const componentName = item.split('/')[4] + const componentConfig = (await componentDocs[item]()).default + + if (componentConfig?.show) { + componentCount.value++ + components.value.push({ + name: componentName, + config: componentConfig + }) + + const features = componentConfig.features + + if (Array.isArray(features)) { + featureCount.value += features.length + } + } + } catch (error) { + console.error(`Failed to load documentation for component: ${item}`, error) + } } })
81-85: Add validation to toUpperCamelCase functionThe function doesn't validate input, which could cause errors if
stris undefined or null.-const toUpperCamelCase = (str) => +const toUpperCamelCase = (str) => { + if (!str) return '' + return str .split('-') .map((word) => word.charAt(0).toUpperCase() + word.slice(1)) .join('') +}
10-10: Consider internationalizing the textIf the application supports multiple languages, consider extracting the static text to an internationalization system.
| if (features) { | ||
| for (const feature in features) { | ||
| featureCount.value++ | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix feature counting logic
The current code uses a for...in loop to iterate over features, which iterates over object keys rather than array elements. If features is an array (as suggested by the usage of features?.length elsewhere), this counting logic is incorrect.
if (features) {
- for (const feature in features) {
- featureCount.value++
- }
+ featureCount.value += features.length
}📝 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. Thoroughly test & benchmark the code to ensure it meets the requirements.
| if (features) { | |
| for (const feature in features) { | |
| featureCount.value++ | |
| } | |
| } | |
| if (features) { | |
| featureCount.value += features.length | |
| } |
PR
效果如下:

PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: N/A
What is the new behavior?
Does this PR introduce a breaking change?
Other information
Summary by CodeRabbit