Fix PR #175 — RoleSelector/ChannelSelector Review Comments#179
Fix PR #175 — RoleSelector/ChannelSelector Review Comments#179BillChirico merged 1 commit intofeat/selector-implementation-v2from
Conversation
- Fix all 42 label accessibility issues in config-editor.tsx - Replace hardcoded htmlFor='admin-role' with unique IDs - Add corresponding id attributes to form elements - Ensure labels are properly associated with controls - Add id prop support to RoleSelector and ChannelSelector - Both components now accept and forward id to the button element - Enables proper label association for accessibility - Remove unused zustand store (discord-entities.ts) - Store was added but never integrated - Remove zustand dependency from package.json - Fix formatting issues - Format form.tsx ariaDescribedBy block - Fix trailing comma in web/package.json - Install missing swagger-jsdoc dependency All lint checks pass. All 2812 tests pass.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ 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 |
|
| Filename | Overview |
|---|---|
| web/package.json | Removed unused zustand dependency |
| web/src/components/dashboard/config-editor.tsx | Fixed 42 label accessibility issues with unique htmlFor/id pairs |
| web/src/components/ui/channel-selector.tsx | Added id prop to interface and forwarded to Button element |
| web/src/components/ui/role-selector.tsx | Added id prop to interface and forwarded to Button element |
Last reviewed commit: b2be17f
Summary
Fixes all 8 review comment threads from PR #175.
Issues Fixed
1. ✅ CRITICAL — Label accessibility (CI-blocking)
Files: , ,
noLabelWithoutControlthat was failing CIhtmlFor="admin-role"now use unique IDsidattributes to all form elementshtmlFormatchingid2. ✅ RoleSelector doesn't accept
idpropFile:
config-editor.tsx:837,role-selector.tsx,channel-selector.tsxidprop to bothRoleSelectorandChannelSelectorTypeScript interfacesidto the underlying Button element3. ✅ Zustand store unused
File:
web/src/stores/discord-entities.ts:69discord-entities.tsstore filezustanddependency fromweb/package.json4. ✅ Formatter drift
File:
web/src/components/ui/form.tsx:115ariaDescribedByblockweb/package.jsonbiome formatchecks5.⚠️ Missing ChannelSelector migrations
File:
config-editor.tsxStatus: Not implemented in this PR
The following fields currently use plain text inputs:
welcome.rulesChannelwelcome.introChannelstarboard.channelIdchallenges.channelIdgithub.feed.channelIdRationale: Converting these to ChannelSelector would be a significant UX change that goes beyond "fixing review comments." The current text input approach works and is consistent with other ID fields in the config editor. If ChannelSelector is desired for these fields, it should be done in a follow-up feature PR with proper testing and consideration of the UX implications.
Test Results
pnpm lint— All checks pass (123 files)pnpm format— No driftpnpm test— All 2812 tests passFiles Changed
web/src/components/ui/role-selector.tsx— Addedidprop supportweb/src/components/ui/channel-selector.tsx— Addedidprop supportweb/src/components/dashboard/config-editor.tsx— Fixed 42 label accessibility issuesweb/src/components/dashboard/config-sections/ModerationSection.tsx— Added id to ChannelSelectorweb/src/components/dashboard/config-sections/TriageSection.tsx— Added id to ChannelSelectorweb/src/components/ui/form.tsx— Fixed formattingweb/package.json— Removed zustand, fixed trailing commaweb/src/stores/discord-entities.ts— Removed (unused)pnpm-lock.yaml— Updated dependenciesCommit SHA
b2be17f