fix(table): improve property modal ui#901
Conversation
🦋 Changeset detectedLatest commit: 5b851cc The changes in this PR will be included in the next version bump. This PR includes changesets to release 8 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
📝 WalkthroughWalkthroughTable property and cell property modals are resized from 300px to 360px width. Modal DOM is restructured to render text-align options as button controls. Border color i18n labels added. Modal styling updated with refined control layouts and spacing. Tests align interactions and assertions with the new button-driven UI. ChangesTable Property Modal Refactor
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 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.
Actionable comments posted: 1
🧹 Nitpick comments (1)
.changeset/polite-tables-dress.md (1)
5-5: 💤 Low valueConsider adding more detail to the changeset description.
The description is valid but could be more informative for users reviewing the changelog. Consider mentioning key changes such as the replacement of select controls with icon buttons for text alignment and the addition of border color localization.
Example:
-Improve table and cell property modal controls. +Improve table and cell property modal controls. + +- Replace text-alignment select with icon-based segmented buttons +- Add border color i18n entries +- Increase modal width from 300px to 360px🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.changeset/polite-tables-dress.md at line 5, Update the changeset description for "polite-tables-dress" to be more informative: explicitly mention that text-alignment select controls were replaced with icon-button controls, note the addition of border-color localization support, and briefly list any user-visible behavior or UI changes (e.g., where the new icon buttons appear and how localization affects border color options) so the changelog entry clearly communicates the key improvements.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/table-module/src/assets/index.less`:
- Line 270: The CSS keyword casing violates Stylelint: locate the declaration
"fill: currentColor;" (in assets/index.less) and change the keyword to lowercase
("fill: currentcolor;") so it satisfies the keyword-case rule; ensure you only
modify the keyword casing for the "fill" declaration.
---
Nitpick comments:
In @.changeset/polite-tables-dress.md:
- Line 5: Update the changeset description for "polite-tables-dress" to be more
informative: explicitly mention that text-alignment select controls were
replaced with icon-button controls, note the addition of border-color
localization support, and briefly list any user-visible behavior or UI changes
(e.g., where the new icon buttons appear and how localization affects border
color options) so the changelog entry clearly communicates the key improvements.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 808f8635-b354-4a88-8925-a0500e2b18c9
📒 Files selected for processing (7)
.changeset/polite-tables-dress.mdpackages/table-module/__tests__/menu/property-menu.test.tspackages/table-module/src/assets/index.lesspackages/table-module/src/locale/en.tspackages/table-module/src/locale/zh-CN.tspackages/table-module/src/module/menu/CellProperty.tspackages/table-module/src/module/menu/TableProperty.ts
| svg { | ||
| width: 15px; | ||
| height: 15px; | ||
| fill: currentColor; |
There was a problem hiding this comment.
Fix currentColor keyword casing to satisfy Stylelint.
fill: currentColor; at Line 270 violates the configured keyword-case rule and can fail linting.
Proposed fix
- fill: currentColor;
+ fill: currentcolor;As per coding guidelines, style/lint violations should be fixed in changed segments.
📝 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.
| fill: currentColor; | |
| fill: currentcolor; |
🧰 Tools
🪛 Stylelint (17.12.0)
[error] 270-270: Expected "currentColor" to be "currentcolor" (value-keyword-case)
(value-keyword-case)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@packages/table-module/src/assets/index.less` at line 270, The CSS keyword
casing violates Stylelint: locate the declaration "fill: currentColor;" (in
assets/index.less) and change the keyword to lowercase ("fill: currentcolor;")
so it satisfies the keyword-case rule; ensure you only modify the keyword casing
for the "fill" declaration.
Sources: Coding guidelines, Linters/SAST tools
Summary
textAligndata field.@wangeditor-next/table-module.Verification
pnpm --filter @wangeditor-next/table-module testpnpm --filter @wangeditor-next/table-module buildpnpm eslint --quiet --no-error-on-unmatched-pattern packages/table-module/src/module/menu/TableProperty.ts packages/table-module/src/module/menu/CellProperty.ts packages/table-module/__tests__/menu/property-menu.test.tsgit diff --checkpnpm buildSummary by CodeRabbit
Release Notes
New Features
Improvements