EDM-4160: Better UX when a single repository type can be chosen#698
EDM-4160: Better UX when a single repository type can be chosen#698celdrake wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Enterprise Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (6)
WalkthroughAdds an ChangesEnforced Repo Type Message — Full Stack
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 14 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (14 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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
`@libs/ui-components/src/components/Repository/CreateRepository/CreateRepositoryForm.tsx`:
- Around line 213-215: The icon-only Button component that serves as the trigger
for the Popover in CreateRepositoryForm has no accessible label, making it
inaccessible to assistive technologies. Add an aria-label prop to the Button
element with a descriptive label that explains the button's purpose (e.g.,
indicating it provides information about repository type enforcement). This will
provide assistive technology users with a clear understanding of what the button
does and make the help content discoverable.
🪄 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: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Enterprise
Run ID: 77e59335-6bdf-4f4d-8c87-228c66026c6d
⛔ Files ignored due to path filters (1)
libs/i18n/locales/en/translation.jsonis excluded by!libs/i18n/locales/en/translation.json
📒 Files selected for processing (6)
libs/ui-components/src/components/Device/EditDeviceWizard/steps/ConfigWithRepositoryTemplateForm.tsxlibs/ui-components/src/components/ImageBuilds/CreateImageBuildWizard/steps/OutputImageStep.tsxlibs/ui-components/src/components/ImageBuilds/CreateImageBuildWizard/steps/SourceImageStep.tsxlibs/ui-components/src/components/Repository/CreateRepository/CreateRepositoryForm.tsxlibs/ui-components/src/components/form/RepositorySelect.tsxlibs/ui-components/src/components/modals/CreateRepositoryModal/CreateRepositoryModal.tsx
312047d to
7088157
Compare
Made-with: Cursor
7088157 to
1dd54dc
Compare
jkilzi
left a comment
There was a problem hiding this comment.
Good UX improvement. Showing a plain text label + info popover when a single repo type is pre-selected is much clearer than disabled radio buttons with no explanation.
Nit — comment wording: the inline comment // When we don't want to hide the repository type, but a single repoType can be chosen... is a bit ambiguous. Consider: // When exactly one repo type is allowed, render it as read-only text with an optional explanation popover instead of showing disabled radio buttons.
Watch — merge conflict with #702: both this PR and #702 add const { t } = useTranslation() to ConfigWithRepositoryTemplateForm.tsx. Whoever merges second will hit a conflict on that line — a one-line fix, but needs attention. Suggested merge order: #692 → this PR → #702.
|
Will fix conflicts after #692 since they touch the same component. |
When the UI shows the "Create repository" modal and a single repository type can be chosen, we now show the type as a read-only field with an explanation about why the type is restricted.
Fixes also a bug when clicking on "Create repository", that the dropdown would stay open and display on top of the already open modal.
A) In the Image builder section

B) In the fleet/device wizard, for Git/Http configurations

Summary
This PR improves the “Create repository” UX when the system allows only one repository type by rendering the repository type as a read-only value with a help popover explaining the restriction. It also fixes a UI layering bug where clicking “Create repository” could leave the dropdown open and show it on top of the already-open create modal.
Areas affected
translation.json)Key changes
Shared UI component enhancements (cross-app)
libs/ui-components/src/components/form/RepositorySelect.tsxoptions.enforcedRepoTypeMessage?: string.addActionpassed intoFormSelect(removing the previous inlineMenuFooter/button rendering), which prevents the dropdown/menu from remaining open and overlaying the create modal.libs/ui-components/src/components/Repository/CreateRepository/CreateRepositoryForm.tsxenforcedRepoTypeMessagethrough the create-repository flow and updates the repository type UI to:enforcedRepoTypeMessage.libs/ui-components/src/components/modals/CreateRepositoryModal/CreateRepositoryModal.tsxoptions.enforcedRepoTypeMessageand forwards it intoCreateRepositoryForm.Context-specific integrations
Image builder
libs/ui-components/src/components/ImageBuilds/CreateImageBuildWizard/steps/SourceImageStep.tsxlibs/ui-components/src/components/ImageBuilds/CreateImageBuildWizard/steps/OutputImageStep.tsxenforcedRepoTypeMessageso the destination registry type is restricted to OCI registries.Fleet/device wizard (Git/HTTP configs)
libs/ui-components/src/components/Device/EditDeviceWizard/steps/ConfigWithRepositoryTemplateForm.tsxenforcedRepoTypeMessageso the repository type is restricted with an i18n message (e.g., Git vs HTTP) consistent with the current wizard context.i18n
libs/i18n/locales/en/translation.json