-
-
Notifications
You must be signed in to change notification settings - Fork 375
feat(ITableEditDialogOption): add LabelWidth parameter #7621
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
Conversation
table编辑弹窗中增加控制label宽度参数,另label对齐参数看组件内的那个名称有但是好像对应另一种编辑模式,没敢动
|
Thanks for your PR, @Tony-ST0754. Someone from the team will get assigned to your PR shortly and we'll get it reviewed. |
Reviewer's GuideAdds configurable label width support for table edit dialogs and propagates the new parameter through table, dialog, and option types, wiring it into the underlying form components. Sequence diagram for label width propagation in table edit dialogsequenceDiagram
actor User
participant TableComponent as Table
participant EditOption as TableEditDialogOption
participant Ext as TableEditDialogOptionExtensions
participant Dialog as EditDialog_TModel
participant ValidateForm
participant EditorForm
User->>TableComponent: triggerEdit(row)
TableComponent->>EditOption: createOption()
TableComponent->>EditOption: set ItemsPerRow, DisableAutoSubmitFormByEnter, LabelWidth = EditDialogLabelWidth
TableComponent->>Ext: ToDialogParameters(EditOption)
Ext-->>Dialog: create EditDialog with LabelWidth = option.LabelWidth
Dialog->>ValidateForm: render ValidateForm(Model, OnValidSubmitAsync, LabelWidth, DisableAutoSubmitFormByEnter)
Dialog->>EditorForm: render EditorForm(Items, ItemsPerRow, LabelAlign, ShowLabel, ShowUnsetGroupItemsOnTop, LabelWidth)
User->>ValidateForm: interactWithForm()
ValidateForm->>EditorForm: layoutFieldsUsing(LabelWidth)
ValidateForm-->>User: showFormWithConfiguredLabelWidth()
Updated class diagram for table edit dialog label width configurationclassDiagram
class Table {
+bool IsHideFooterWhenNoData
+int EditDialogItemsPerRow
+Alignment EditDialogLabelAlign
+int? EditDialogLabelWidth
+void AppendOptions(ITableEditDialogOption_TItem option, ItemChangedType itemChangedType)
}
class ITableEditDialogOption_TModel {
+bool? DisableAutoSubmitFormByEnter
+int? LabelWidth
+RenderFragment DialogFooterTemplate
}
class TableEditDrawerOption {
+TableEditDrawerOption()
+bool? DisableAutoSubmitFormByEnter
+int? LabelWidth
}
class EditDialog_TModel {
+bool? DisableAutoSubmitFormByEnter
+int? LabelWidth
+int ItemsPerRow
+Alignment LabelAlign
+bool ShowLabel
+bool ShowUnsetGroupItemsOnTop
+Task OnValidSubmitAsync(EditContext context)
}
class EditDialogOption {
+EditDialogOption()
+bool? DisableAutoSubmitFormByEnter
+int? LabelWidth
}
class TableEditDialogOptionExtensions {
+IDictionary~string,object~ ToDialogParameters(EditDialogOption option)
}
class ValidateForm {
+object Model
+Func~EditContext,Task~ OnValidSubmit
+bool? DisableAutoSubmitFormByEnter
+int? LabelWidth
}
class EditorForm {
+int ItemsPerRow
+Alignment LabelAlign
+bool ShowLabel
+bool ShowUnsetGroupItemsOnTop
+int? LabelWidth
}
Table ..> ITableEditDialogOption_TModel : configures
Table ..> EditDialogOption : uses
TableEditDrawerOption ..|> ITableEditDialogOption_TModel : implements
EditDialog_TModel ..> ValidateForm : renders
EditDialog_TModel ..> EditorForm : renders
EditDialogOption --> EditDialog_TModel : configures
TableEditDialogOptionExtensions ..> EditDialogOption : extends
TableEditDialogOptionExtensions ..> EditDialog_TModel : maps properties
ITableEditDialogOption_TModel --> EditDialogOption : base configuration
EditDialog_TModel --> EditorForm : passes LabelWidth
EditDialog_TModel --> ValidateForm : passes LabelWidth
Table --> EditDialog_TModel : opens edit dialog with LabelWidth
File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
Hey - I've left some high level feedback:
- The default label width value
120is now hard‑coded in several places (EditDialogLabelWidth,EditDialog.LabelWidth,EditDialogOption.LabelWidth,TableEditDrawerOption.LabelWidth); consider centralizing this as a shared constant or config to avoid divergence in future changes. TableEditDrawerOption.LabelWidthhas been added but there’s no corresponding wiring like inAppendOptionsfor dialogs; if drawer edit UIs are also expected to honor the label width, consider passing this through in the drawer path as well for consistent behavior.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The default label width value `120` is now hard‑coded in several places (`EditDialogLabelWidth`, `EditDialog.LabelWidth`, `EditDialogOption.LabelWidth`, `TableEditDrawerOption.LabelWidth`); consider centralizing this as a shared constant or config to avoid divergence in future changes.
- `TableEditDrawerOption.LabelWidth` has been added but there’s no corresponding wiring like in `AppendOptions` for dialogs; if drawer edit UIs are also expected to honor the label width, consider passing this through in the drawer path as well for consistent behavior.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7621 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 749 749
Lines 33015 33017 +2
Branches 4581 4581
=========================================
+ Hits 33015 33017 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
table编辑弹窗中增加控制label宽度参数,另label对齐参数看组件内的那个名称有但是好像对应另一种编辑模式,没敢动
Link issues
fixes #7620
Summary By Copilot
Regression?
Risk
Verification
Packaging changes reviewed?
☑️ Self Check before Merge
Summary by Sourcery
Add configurable label width support for table edit dialogs and wire it through to the underlying edit dialog and form components.
New Features:
Enhancements: