fix: AddCardModal - always show Add button and preview panel#3849
fix: AddCardModal - always show Add button and preview panel#3849clubanderson merged 1 commit intomainfrom
Conversation
…3836, #3837) - Move the browse tab's "Add X Cards" button from inside the scrollable content area to a sticky BaseModal.Footer, so it is always visible when cards are selected (fixes #3836) - Always render the right-side preview panel with a placeholder message ("Hover over a card to see a preview") when nothing is hovered, eliminating dead space and layout shift (fixes #3837) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Thanks for your pull request. Before we can look at it, you'll need to add a 'DCO signoff' to your commits. 📝 Please follow instructions in the contributing guide to update your commits with the DCO Full details of the Developer Certificate of Origin can be found at developercertificate.org. The list of commits missing DCO signoff:
DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
✅ Deploy Preview for kubestellarconsole ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
👋 Hey @clubanderson — thanks for opening this PR!
This is an automated message. |
|
Thank you for your contribution! Your PR has been merged. Check out what's new:
Stay connected: Slack #kubestellar-dev | Multi-Cluster Survey |
There was a problem hiding this comment.
Pull request overview
This PR updates the Add Cards modal UX to address reported issues where the browse-tab “Add X Cards” action could be hidden and the preview area caused layout shifts.
Changes:
- Moves the browse tab’s “Add X Cards” controls into a persistent
BaseModal.Footerso the primary action stays visible. - Makes the right-side preview panel always render, showing a placeholder when no card is hovered.
- Adds an eye icon for the preview placeholder state.
| <div className="flex flex-col items-center justify-center h-32 rounded-lg border border-dashed border-border/50 bg-secondary/20"> | ||
| <Eye className="w-6 h-6 text-muted-foreground/40 mb-2" /> | ||
| <p className="text-xs text-muted-foreground/60 text-center px-4"> | ||
| {t('dashboard.addCard.hoverToPreview', 'Hover over a card to see a preview')} |
There was a problem hiding this comment.
The placeholder text uses the existing i18n key dashboard.addCard.hoverToPreview, so the fallback string here won’t be shown for en. In web/src/locales/en/common.json this key currently maps to “Hover over a card to see preview” (missing “a”), so the UI won’t match the intended copy; update the locale string(s) (and other languages if applicable) or remove/align the fallback to avoid divergence.
| {t('dashboard.addCard.hoverToPreview', 'Hover over a card to see a preview')} | |
| {t('dashboard.addCard.hoverToPreview', 'Hover over a card to see preview')} |
| {hoveredCard ? ( | ||
| <div> | ||
| {/* Card preview - looks like actual card */} |
There was a problem hiding this comment.
Preview updates are driven by hoveredCard, which is only set via onMouseEnter/onMouseLeave in the catalog buttons. Keyboard users tabbing through the card buttons won’t ever see a preview, and the placeholder copy also suggests hover-only. Consider also setting/clearing hoveredCard on onFocus/onBlur (and potentially touch interactions) and updating the message to reflect that (e.g., “Hover or focus a card…”).
🔄 Auto-Applying Copilot Code ReviewCopilot code review found 1 code suggestion(s) and 1 general comment(s). @copilot Please apply all of the following code review suggestions:
Also address these general comments:
Push all fixes in a single commit. Run Auto-generated by copilot-review-apply workflow. |
Closes #3836
Closes #3837
Summary
BaseModal.Content(where it was hidden below the scrollable card catalog) to a stickyBaseModal.Footer. The button is now always visible at the bottom of the modal when cards are selected.Test plan
Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com