Skip to content

fix: AddCardModal - always show Add button and preview panel#3849

Merged
clubanderson merged 1 commit intomainfrom
fix/issue-3836-3837-addcardmodal-ux
Mar 29, 2026
Merged

fix: AddCardModal - always show Add button and preview panel#3849
clubanderson merged 1 commit intomainfrom
fix/issue-3836-3837-addcardmodal-ux

Conversation

@clubanderson
Copy link
Copy Markdown
Collaborator

Closes #3836
Closes #3837

Summary

  • No way to add cards #3836 fix: Moved the browse tab's "Add X Cards" button from inside BaseModal.Content (where it was hidden below the scrollable card catalog) to a sticky BaseModal.Footer. The button is now always visible at the bottom of the modal when cards are selected.
  • Bad UI in AddCardModal #3837 fix: The right-side preview panel is now always rendered. When no card is hovered, it shows a placeholder with an eye icon and the message "Hover over a card to see a preview". This eliminates dead space at the bottom and removes the layout shift caused by the panel appearing/disappearing on hover.

Test plan

  • Open the Add Cards modal, select cards by clicking -- the "Add X Cards" button should always be visible in the footer
  • Verify the preview panel is always visible on the right side with placeholder text
  • Hover over different cards and confirm the preview updates in the right panel
  • Stop hovering and confirm the placeholder returns
  • Verify AI tab footer still works correctly

Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com

…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>
Copilot AI review requested due to automatic review settings March 29, 2026 05:52
@kubestellar-prow kubestellar-prow bot added the dco-signoff: no Indicates the PR's author has not signed the DCO. label Mar 29, 2026
@kubestellar-prow
Copy link
Copy Markdown
Contributor

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:

Details

Instructions 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.

@clubanderson clubanderson merged commit e6217ef into main Mar 29, 2026
@kubestellar-prow
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign clubanderson for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@netlify
Copy link
Copy Markdown

netlify bot commented Mar 29, 2026

Deploy Preview for kubestellarconsole ready!

Name Link
🔨 Latest commit d68f755
🔍 Latest deploy log https://app.netlify.com/projects/kubestellarconsole/deploys/69c8be20dfc72d00086efacb
😎 Deploy Preview https://deploy-preview-3849.console-deploy-preview.kubestellar.io
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@kubestellar-prow kubestellar-prow bot deleted the fix/issue-3836-3837-addcardmodal-ux branch March 29, 2026 05:52
@github-actions
Copy link
Copy Markdown
Contributor

👋 Hey @clubanderson — thanks for opening this PR!

🤖 This project is developed exclusively using AI coding assistants.

Please do not attempt to code anything for this project manually.
All contributions should be authored using an AI coding tool such as:

This ensures consistency in code style, architecture patterns, test coverage,
and commit quality across the entire codebase.


This is an automated message.

@kubestellar-prow kubestellar-prow bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Mar 29, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Thank you for your contribution! Your PR has been merged.

Check out what's new:

Stay connected: Slack #kubestellar-dev | Multi-Cluster Survey

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.Footer so 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')}
Copy link

Copilot AI Mar 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
{t('dashboard.addCard.hoverToPreview', 'Hover over a card to see a preview')}
{t('dashboard.addCard.hoverToPreview', 'Hover over a card to see preview')}

Copilot uses AI. Check for mistakes.
Comment on lines +1457 to 1459
{hoveredCard ? (
<div>
{/* Card preview - looks like actual card */}
Copy link

Copilot AI Mar 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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…”).

Copilot uses AI. Check for mistakes.
@clubanderson
Copy link
Copy Markdown
Collaborator Author

🔄 Auto-Applying Copilot Code Review

Copilot code review found 1 code suggestion(s) and 1 general comment(s).

@copilot Please apply all of the following code review suggestions:

  • web/src/components/dashboard/AddCardModal.tsx (line 1485): {t('dashboard.addCard.hoverToPreview', 'Hover over a card to see preview')}

Also address these general comments:

  • web/src/components/dashboard/AddCardModal.tsx (line 1459): Preview updates are driven by hoveredCard, which is only set via onMouseEnter/onMouseLeave in the catalog buttons. K

Push all fixes in a single commit. Run cd web && npm run build && npm run lint before committing.


Auto-generated by copilot-review-apply workflow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dco-signoff: no Indicates the PR's author has not signed the DCO. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bad UI in AddCardModal No way to add cards

3 participants