-
Notifications
You must be signed in to change notification settings - Fork 8.4k
chore: 更新表单描述显示样式 #6938
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
base: main
Are you sure you want to change the base?
chore: 更新表单描述显示样式 #6938
Conversation
|
WalkthroughCSS class ordering adjustments to form field input styling and form description layout, including replacement of margin-left with smaller text sizing, and addition of a new example form item with description in the playground. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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)
packages/@core/ui-kit/form-ui/src/form-render/form-field.vue (1)
385-387: Approved: Description styling updated to align with design system.The changes reduce text size and remove left margin, improving alignment with Ant Design's form description styling as stated in the PR objectives. The repositioning after the suffix block maintains proper layout flow.
Consider verifying that the
text-xssize (12px) meets accessibility guidelines for supplementary text, especially for users with visual impairments. WCAG recommends a minimum of 14px for body text, though smaller sizes are acceptable for supplementary content.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
packages/@core/ui-kit/form-ui/src/form-render/form-field.vue(3 hunks)playground/src/views/examples/form/basic.vue(1 hunks)
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2024-12-09T04:41:58.914Z
Learnt from: mynetfan
Repo: vbenjs/vue-vben-admin PR: 5075
File: packages/effects/common-ui/src/components/api-select/api-select.vue:61-62
Timestamp: 2024-12-09T04:41:58.914Z
Learning: 在文件 `packages/effects/common-ui/src/components/api-select/api-select.vue` 的组件 `ApiSelect` 中,`childrenField` 的默认值设置为空字符串是有意的,因为并非所有组件都使用树形数据。
Applied to files:
playground/src/views/examples/form/basic.vue
📚 Learning: 2024-12-04T04:43:22.179Z
Learnt from: mynetfan
Repo: vbenjs/vue-vben-admin PR: 5013
File: docs/src/components/layout-ui/page.md:23-24
Timestamp: 2024-12-04T04:43:22.179Z
Learning: 在 `docs/src/components/layout-ui/page.md` 的 `Page` 组件中,`title` 和 `description` 属性有意使用 `string|slot` 类型表示法,表示它们可以接受字符串或插槽。
Applied to files:
playground/src/views/examples/form/basic.vue
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: post-update (ubuntu-latest)
- GitHub Check: post-update (windows-latest)
🔇 Additional comments (3)
packages/@core/ui-kit/form-ui/src/form-render/form-field.vue (2)
342-343: LGTM! Class ordering follows convention.Reordering hover before focus improves readability and follows common CSS pseudo-class conventions. Since these are different pseudo-classes, this doesn't affect Tailwind's behavior.
370-371: LGTM! Consistent class ordering.The class reordering maintains visual consistency while improving code organization.
playground/src/views/examples/form/basic.vue (1)
70-76: LGTM! Good example addition.The new form field effectively demonstrates the updated description feature, providing a clear example for developers to reference. The placement and minimal configuration make it easy to understand.
|
或者自定义 useVbenForm 属性 wrapperClass,可以达到类似效果 自定义描述字体大小: |
|
Nice |
Description
close: #6778
修改表单描述的显示样式,与 antv 尽可能保持一致
请注意,当包含描述时,label 对齐是针对组件和描述的总高度居中,而不是仅针对组件进行居中,这点与 antv 不一致,如需修改,请维护人员直接推送到此分支即可
修改前:
修改后:
Type of change
Please delete options that are not relevant.
Checklist
pnpm run docs:devcommand.pnpm test.feat:,fix:,perf:,docs:, orchore:.Summary by CodeRabbit
Style
Documentation