-
Notifications
You must be signed in to change notification settings - Fork 271
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Properties Panel Table Columns #661
base: refactor/develop
Are you sure you want to change the base?
feat: Properties Panel Table Columns #661
Conversation
WalkthroughRecent updates enhance the user interface and styling across multiple files. Key changes include the addition of a Changes
Poem
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? 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 as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
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: 3
Outside diff range, codebase verification and nitpick comments (3)
packages/configurator/src/slot-configurator/SlotConfigurator.vue (1)
Line range hint
15-29
: Vue Component Logic ReviewThe component handles dynamic slot configurations and user interactions effectively. The use of Vue's reactivity system with
ref
andwatchEffect
is appropriate for the functionality. However, consider adding error handling or user feedback mechanisms if the operations intoggleSlot
(like API calls or state changes) fail or have significant latency.packages/settings/props/src/composable/useProperties.js (1)
Line range hint
1-123
: General Code Review ofuseProperties.js
The module is well-structured and follows best practices for modularity and reusability. The use of Vue composition API functions like
ref
andwatchEffect
is appropriate. Consider adding more detailed JSDoc comments, especially for exported functions, to improve maintainability and developer understanding.packages/configurator/src/js-slot-configurator/JsSlotConfigurator.vue (1)
Line range hint
33-68
: Refactoring and Style AdjustmentsThe refactoring of imports and the addition of new styles are well-executed. However, ensure that the removal of the
Tooltip
component does not remove necessary user guidance or information that was previously available.
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (4)
packages/design-core/assets/delete.svg
is excluded by!**/*.svg
packages/design-core/assets/drag.svg
is excluded by!**/*.svg
packages/design-core/assets/edit-code.svg
is excluded by!**/*.svg
packages/design-core/assets/edit.svg
is excluded by!**/*.svg
Files selected for processing (13)
- designer-demo/public/mock/bundle.json (67 hunks)
- packages/common/component/ConfigItem.vue (2 hunks)
- packages/common/component/MetaCodeEditor.vue (2 hunks)
- packages/common/component/MetaList.vue (2 hunks)
- packages/common/component/MetaListActions.vue (2 hunks)
- packages/common/component/MetaListItem.vue (7 hunks)
- packages/configurator/src/array-item-configurator/ArrayItemConfigurator.vue (2 hunks)
- packages/configurator/src/js-slot-configurator/JsSlotConfigurator.vue (8 hunks)
- packages/configurator/src/slot-configurator/SlotConfigurator.vue (1 hunks)
- packages/settings/props/src/composable/useProperties.js (3 hunks)
- packages/theme/common/global.less (1 hunks)
- packages/theme/light/metaComponent.less (1 hunks)
- packages/theme/light/variable.less (1 hunks)
Files skipped from review due to trivial changes (2)
- packages/common/component/ConfigItem.vue
- packages/theme/light/variable.less
Additional comments not posted (24)
packages/common/component/MetaList.vue (1)
11-13
: Verify the UI impact of moving the actions div.The
actions
div has been moved within the template. Ensure this change aligns with the intended layout and does not disrupt user interactions or accessibility.packages/configurator/src/slot-configurator/SlotConfigurator.vue (1)
172-172
: CSS Property Changes in.e__switch-core
The
width
of the.e__switch-core
class has been reduced from40px
to38px
, and the background color has been changed. These changes are minor but should be verified visually to ensure they align with the desired UI aesthetics and do not affect the usability or visibility of the switch element.Also applies to: 178-178
packages/settings/props/src/composable/useProperties.js (1)
36-36
: Addition oflabelPosition
PropertyThe
labelPosition
property has been uniformly added to several property configurations (className
,id
,ref
). This addition is consistent and should help in aligning labels as per the new UI requirements. Ensure that the consuming components or templates are updated to respect this new property.Also applies to: 53-53, 70-70
packages/configurator/src/js-slot-configurator/JsSlotConfigurator.vue (1)
25-25
: Comprehensive Review of Changes inJsSlotConfigurator.vue
The changes in this file include updates to component imports, adjustments to styling, and modifications to component behavior. The removal of the tooltip and the addition of new styles and properties should be verified to ensure they align with the intended functionality and do not affect other parts of the application adversely.
Also applies to: 33-33, 42-42, 68-68, 168-168, 188-188, 191-194, 213-219, 239-247
Verification successful
Comprehensive Review of Changes in
JsSlotConfigurator.vue
The changes in this file include updates to component imports, adjustments to styling, and modifications to component behavior. The removal of the tooltip and the addition of new styles and properties have been verified and do not affect other parts of the application directly, as
JsSlotConfigurator
is not referenced in other.vue
files.
- No further action is required based on the current context.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify if the changes in JsSlotConfigurator.vue affect other components. # Test: Search for the usage of modified classes and components in other Vue components. rg --type vue 'JsSlotConfigurator'Length of output: 62
Script:
#!/bin/bash # Description: Verify if the changes in JsSlotConfigurator.vue affect other components. # Test: Search for the usage of modified classes and components in other Vue components. rg 'JsSlotConfigurator' --glob '*.vue'Length of output: 38
packages/common/component/MetaListItem.vue (2)
Line range hint
19-47
: Adjustments to Popover and Icon UsageThe adjustments to the popover width and the replacement of icons are significant changes. Ensure that these changes enhance the user experience and are consistent with the design guidelines of the application.
5-5
: Comprehensive Review of Changes inMetaListItem.vue
The changes in this file include the replacement of icons, adjustments to popover width, and modifications to component behavior and styling. These changes should be verified to ensure they align with the intended functionality and do not affect other parts of the application adversely.
Also applies to: 19-19, 40-40, 46-47, 80-81, 240-254, 286-294
packages/common/component/MetaCodeEditor.vue (1)
9-10
: Enhanced button design with new SVG icon and label.The addition of an SVG icon and a label within the
tiny-button
component enhances the visual appeal and user experience. Ensure that accessibility features such asaria-labels
are considered if not already handled by thesvg-icon
component.packages/theme/common/global.less (1)
343-347
: Adjusted positioning and styling for.fixed-left
.The changes to the
.fixed-left
class improve the layout and user experience by adjusting the positioning and overflow handling. Ensure these changes are tested across different screen sizes and devices to maintain responsiveness.designer-demo/public/mock/bundle.json (12)
2774-2775
: Consistent addition of "labelPosition" property.The addition of
"labelPosition": "left"
is consistent with the PR's objective to enhance UI elements by specifying label positions. This change is correctly formatted as a JSON property.
2794-2795
: Consistent addition of "labelPosition" property.This change is consistent and correctly formatted within the JSON structure.
2825-2826
: Consistent addition of "labelPosition" property.The addition is consistent with other similar changes, enhancing the UI's consistency.
2987-2988
: Consistent addition of "labelPosition" property.The addition is correctly formatted and consistent with the intended UI enhancements.
3018-3019
: Consistent addition of "labelPosition" property.This change is consistent and correctly formatted within the JSON structure.
3038-3039
: Consistent addition of "labelPosition" property.The addition is consistent with other similar changes, enhancing the UI's consistency.
3058-3059
: Consistent addition of "labelPosition" property.This change is consistent and correctly formatted within the JSON structure.
3127-3128
: Consistent addition of "labelPosition" property.The addition is correctly formatted and consistent with the intended UI enhancements.
3162-3163
: Consistent addition of "labelPosition" property.This change is consistent and correctly formatted within the JSON structure.
4689-4690
: Consistent addition of "labelPosition" property.The addition is consistent with other similar changes, enhancing the UI's consistency.
4844-4845
: Consistent addition of "labelPosition" property.This change is consistent and correctly formatted within the JSON structure.
4880-4881
: Consistent addition of "labelPosition" property.The addition is correctly formatted and consistent with the intended UI enhancements.
packages/common/component/MetaListActions.vue (2)
39-49
: CSS Enhancements ApprovedThe changes to the CSS, including the new
.actions-title
class and modifications to.tiny-svg
, are well-implemented. Using CSS variables likevar(--ti-lowcode-add-table-column-color)
enhances maintainability and theming capabilities.
6-6
: Optional chaining usage in templateThe use of optional chaining (
?.
) in<span class="actions-title">{{ actionsItem?.add }}</span>
is good for defensive programming. However, ensure that this is consistent with the error handling strategy used throughout the project.Verification successful
Optional chaining usage in template
The use of optional chaining (
?.
) in<span class="actions-title">{{ actionsItem?.add }}</span>
is consistent with the error handling strategy used throughout the project. The pattern is widely used in various.vue
files.
- Examples of consistent usage:
item?.collapsed ? collapseBar.push(item) : rightBar.push(item)
props.renderPanel && lastPlugin?.confirm
pluginRef.value?.[lastPlugin.confirm](confirmCallback)
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the consistent use of optional chaining in Vue templates. # Test: Search for optional chaining usage in Vue templates. Expect: Consistent usage across the project. rg --type vue '?.'Length of output: 98
Script:
#!/bin/bash # Description: Verify the consistent use of optional chaining in Vue templates. # Test: Search for optional chaining usage in Vue templates. Expect: Consistent usage across the project. rg --type vue '\?\.'Length of output: 50
Script:
#!/bin/bash # Description: Verify the consistent use of optional chaining in Vue templates. # Find all .vue files and search for optional chaining usage. fd -e vue -x rg '\?\.' {}Length of output: 34282
packages/theme/light/metaComponent.less (1)
26-26
: Update to color variableThe change in the variable
--ti-lowcode-meta-config-item-label-color
tovar(--ti-lowcode-base-text-color-1)
seems appropriate for theming consistency. However, verify that this change does not affect other elements that might be using the same variable.Verification successful
Update to color variable
The change in the variable
--ti-lowcode-meta-config-item-label-color
tovar(--ti-lowcode-base-text-color-1)
is verified to be appropriate for theming consistency. The variable is used in both light and dark themes and in a Vue component, and the change does not introduce any unintended side effects.
packages/theme/light/metaComponent.less
packages/theme/dark/metaComponent.less
packages/common/component/ConfigItem.vue
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the impact of the color variable change on other components. # Test: Search for the usage of `--ti-lowcode-meta-config-item-label-color`. Expect: No unintended changes in other components. rg '--ti-lowcode-meta-config-item-label-color' -A 5Length of output: 495
Script:
#!/bin/bash # Description: Verify the impact of the color variable change on other components. # Test: Search for the usage of `--ti-lowcode-meta-config-item-label-color`. Expect: No unintended changes in other components. rg '--ti-lowcode-meta-config-item-label-color' -A 5Length of output: 495
Script:
#!/bin/bash # Description: Verify the impact of the color variable change on other components. # Test: Search for the usage of `--ti-lowcode-meta-config-item-label-color`. Expect: No unintended changes in other components. rg -e '--ti-lowcode-meta-config-item-label-color' -A 5Length of output: 1778
packages/configurator/src/array-item-configurator/ArrayItemConfigurator.vue (1)
29-29
: Enhancements in ArrayItemConfiguratorThe addition of the click event handler in
<span @click="editItem({ index })">
is a good UX improvement, allowing users to interact directly with items. The addition of theadd
property ('新增一列'
) to theactions
array enhances functionality by providing descriptive text for UI elements.Also applies to: 91-91
packages/configurator/src/array-item-configurator/ArrayItemConfigurator.vue
Outdated
Show resolved
Hide resolved
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
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (4)
- designer-demo/public/mock/bundle.json (67 hunks)
- packages/common/component/MetaCodeEditor.vue (2 hunks)
- packages/common/component/MetaListActions.vue (2 hunks)
- packages/configurator/src/array-item-configurator/ArrayItemConfigurator.vue (2 hunks)
Additional comments not posted (45)
packages/common/component/MetaListActions.vue (3)
6-6
: Good addition of the title display with optional chaining.The addition of the
<span>
element to display the title ofactionsItem
is a good enhancement. The use of optional chaining ensures safety.
39-40
: Simplified hover effect improves interaction design.The simplification of the hover effect for the
.actionsItem
class improves the interaction design by removing unnecessary border styling.
43-49
: Good use of CSS variables and addition of.actions-title
class.The use of CSS variables for colors in the
.tiny-svg
class ensures consistency with the visual theme. The addition of the.actions-title
class integrates well with the existing layout.packages/configurator/src/array-item-configurator/ArrayItemConfigurator.vue (2)
29-29
: Enhanced user interactivity with click event handler.The addition of the click event handler to the span element enhances user interactivity by allowing users to directly edit an item by clicking on its displayed text.
88-88
: Improved clarity with updated action title.The update to the title of an action within the
actionsOptions
object provides a more descriptive label, improving clarity for users regarding the action's purpose.packages/common/component/MetaCodeEditor.vue (3)
9-10
: Enhanced visual representation with SVG icon.The addition of the SVG icon (
edit-code
) to thetiny-button
element enhances the visual representation of the button, providing a clearer indication of its function.
266-270
: Improved alignment and visual appeal with updated icon styles.The updates to the
.icon-edit-code
class, including new margin and font size properties, improve the alignment and visual appeal of the icon.
259-273
: Consistent styling with CSS variables and full-width button.The use of CSS variables for colors in the
.edit-btn
class ensures consistency across the application. Setting the button's width to 100% may affect its layout within the parent container.However, verify the impact of the full-width button on the layout.
designer-demo/public/mock/bundle.json (37)
2774-2775
: LGTM!The addition of the
labelPosition
property is correctly formatted and consistent.
2794-2795
: LGTM!The addition of the
labelPosition
property is correctly formatted and consistent.
2825-2826
: LGTM!The addition of the
labelPosition
property is correctly formatted and consistent.
2926-2927
: LGTM!The addition of the
labelPosition
property is correctly formatted and consistent.
2987-2988
: LGTM!The addition of the
labelPosition
property is correctly formatted and consistent.
3018-3019
: LGTM!The addition of the
labelPosition
property is correctly formatted and consistent.
3038-3039
: LGTM!The addition of the
labelPosition
property is correctly formatted and consistent.
3058-3059
: LGTM!The addition of the
labelPosition
property is correctly formatted and consistent.
3127-3128
: LGTM!The addition of the
labelPosition
property is correctly formatted and consistent.
3162-3163
: LGTM!The addition of the
labelPosition
property is correctly formatted and consistent.
4689-4690
: LGTM!The addition of the
labelPosition
property is correctly formatted and consistent.
4844-4845
: LGTM!The addition of the
labelPosition
property is correctly formatted and consistent.
4880-4881
: LGTM!The addition of the
labelPosition
property is correctly formatted and consistent.
5042-5043
: LGTM!The addition of the
labelPosition
property is correctly formatted and consistent.
5077-5078
: LGTM!The addition of the
labelPosition
property is correctly formatted and consistent.
5105-5106
: LGTM!The addition of the
labelPosition
property is correctly formatted and consistent.
5476-5477
: LGTM!The addition of the
labelPosition
property is correctly formatted and consistent.
5499-5500
: LGTM!The addition of the
labelPosition
property is correctly formatted and consistent.
5521-5522
: LGTM!The addition of the
labelPosition
property is correctly formatted and consistent.
5544-5545
: LGTM!The addition of the
labelPosition
property is correctly formatted and consistent.
5567-5568
: LGTM!The addition of the
labelPosition
property is correctly formatted and consistent.
5590-5591
: LGTM!The addition of the
labelPosition
property is correctly formatted and consistent.
5613-5614
: LGTM!The addition of the
labelPosition
property is correctly formatted and consistent.
5636-5637
: LGTM!The addition of the
labelPosition
property is correctly formatted and consistent.
5659-5660
: LGTM!The addition of the
labelPosition
property is correctly formatted and consistent.
5747-5748
: LGTM!The addition of the
labelPosition
property is correctly formatted and consistent.
5789-5790
: LGTM!The addition of the
labelPosition
property is correctly formatted and consistent.
5924-5925
: LGTM!The addition of the
labelPosition
property is correctly formatted and consistent.
6118-6119
: LGTM!The addition of the
labelPosition
property is correctly formatted and consistent.
6133-6134
: LGTM!The addition of the
labelPosition
property is correctly formatted and consistent.
6227-6228
: LGTM!The addition of the
labelPosition
property is correctly formatted and consistent.
6505-6506
: LGTM!The addition of the
labelPosition
property is correctly formatted and consistent.
6524-6525
: LGTM!The addition of the
labelPosition
property is correctly formatted and consistent.
6544-6545
: LGTM!The addition of the
labelPosition
property is correctly formatted and consistent.
6612-6613
: LGTM!The addition of the
labelPosition
property is correctly formatted and consistent.
6632-6633
: LGTM!The addition of the
labelPosition
property is correctly formatted and consistent.
7177-7178
: LGTM!The addition of the `labelPosition
English | 简体中文
PR
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
Background and solution
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
New Features
labelPosition
property set to "left" across various UI components for consistent label placement.Enhancements
Bug Fixes