Skip to content

Tighten Foundry plugin modal: wider, crisper, collapsibles for Prereqs/MCP/Skills#310

Open
thegovind wants to merge 1 commit intomainfrom
fix/foundry-modal-collapse-tighten
Open

Tighten Foundry plugin modal: wider, crisper, collapsibles for Prereqs/MCP/Skills#310
thegovind wants to merge 1 commit intomainfrom
fix/foundry-modal-collapse-tighten

Conversation

@thegovind
Copy link
Copy Markdown
Collaborator

User feedback after #309 merged: the Foundry plugin modal is too long, not wide enough, and overwhelming. This rewrites the modal layout to surface the primary actions and tuck the reference content behind native HTML disclosure widgets.

Layout changes

  • Modal max-width: 560px → 720px (more room for prompt examples, less wrapping)
  • Modal content: max-height: 88vh with overflow-y: auto so it scrolls if the user expands everything

Content changes

Visible above the fold (primary actions):

  • Title + version badge
  • One-sentence description (was a 4-line paragraph)
  • Install (2 commands, unchanged)
  • Try this — 4 short user prompts in a clean bulleted list, e.g. "Build a hosted agent grounded on my product docs" (was 5 long ones with verbose 'routes to X + Y' annotations)

Collapsed by default (using native <details> / <summary>):

  • Prerequisites — Foundry project, Azure CLI, azd CLI (each with install link opening in a new tab)
  • 3 MCP servers bundled — Azure MCP, Foundry MCP, Microsoft Docs
  • 11 skills (orchestrator + 10 sub-skills) — one-line descriptions per skill

Each collapsible has a + indicator that flips to when expanded; hover turns the summary text accent-colored.

Why this works

  • First impression is now: what is it + how do I install + what should I try — no scrolling needed
  • Power users can drill into prereqs, MCP details, or the full skill list without losing context
  • Each prompt is bite-sized — model sees a short, declarative sentence to pattern-match against
  • Wider modal removes mid-sentence wrapping in the prompt examples

Verification

  • npm run build (prebuild + astro build + postbuild) succeeds
  • ✅ Generated HTML contains modal-details, modal-prompts, 'Try this', '3 MCP servers bundled', '11 skills'
  • max-width: 720px shows up in the bundled CSS
  • ✅ Postbuild restored preserved files (llms.txt, .nojekyll, etc.)

User feedback: card was too long, not wide enough, and overwhelming.

## Layout changes

- Modal max-width: 560px → 720px (more room for prompt examples)
- Modal content max-height: 88vh with overflow-y: auto so it scrolls if tall

## Content changes

**Visible above the fold (primary actions):**
- Title + version badge
- Tightened description (one short sentence)
- Install (2 commands, unchanged)
- Try this — 4 short user prompts in a clean bulleted list (was 5 long ones with route-to annotations)

**Collapsed by default (using native <details>/<summary>):**
- Prerequisites — Foundry project, Azure CLI, azd CLI (with install links opening in new tabs)
- 3 MCP servers bundled — Azure MCP, Foundry MCP, Microsoft Docs
- 11 skills (orchestrator + 10 sub-skills) — one-line descriptions per skill

Each collapsible has a + indicator that flips to − when expanded.

## Why this works better

- First impression: 'what is it' + 'how do I install' + 'what should I try' — no scrolling needed
- Power users can drill into prereqs/MCPs/skills without losing the overview
- Each prompt is now bite-sized ('Build a hosted agent grounded on my product docs') instead of the verbose 'routes to X + Y' annotations
- Wider modal removes mid-sentence wrapping in the prompt examples

## Implementation

- Replaced 3 always-expanded modal-section blocks (Prereqs/MCP/Skills) with <details class='modal-details'>
- Added .modal-details, .modal-details-summary, .modal-details-content, .modal-prompts CSS
- Removed the Getting Started prompt 'route to' annotations — the orchestrator skill explains routing; the modal just needs to inspire
- Build verified with npm run build (prebuild + astro build + postbuild succeeded; postbuild restored llms.txt etc.)
Copy link
Copy Markdown
Collaborator Author

@thegovind thegovind left a comment

Choose a reason for hiding this comment

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

Review summary

UI tightening of the Foundry plugin modal — wider, collapsibles for low-priority sections, crisper above-the-fold. Clean change, well-described. A couple of small a11y/UX considerations.

Issues

🟡 Recommended

  • <details> accessibility on iOS/Safari modal stacking. Native <details> works, but inside a <dialog> element on some Safari/iOS versions the <summary> can swallow focus or fail to announce expanded state. Worth a quick test on iOS Safari + VoiceOver before merge — if behavior is off, add aria-expanded syncing via a tiny toggle listener on <details>. If it's fine, ignore this.
  • First-tab focus. When the dialog opens, the first focusable element is now the close button (×) in the header. Not bad, but consider moving initial focus to the title/heading region (tabindex="-1" + focus()) so screen reader users hear the title before the close affordance. Same change keeps keyboard users from accidentally dismissing on the very first Enter.
  • Keyboard expand-all. Power users opening the modal often want to read everything. With three <details> collapsed by default, that's three extra clicks. Consider an "Expand all / Collapse all" link in the header (or persist the open state per-section to localStorage). Minor — fine to defer.

🟢 Nits

  • The committed docs/index.html and docs/_astro/index.wDopByTC.css are Astro build outputs. If GitHub Pages serves directly from docs/, that's intentional and fine. If not, consider moving the build-output commit to a separate publish workflow so source-only PRs stay focused on docs-site/.
  • Modal max-width: 720px is good for desktop; double-check the modal still feels right at ~360px viewport (the prompt list shouldn't crowd against the close button).

Otherwise looks good — small, focused, ships a clear UX win.

@thegovind
Copy link
Copy Markdown
Collaborator Author

Quick follow-up to my earlier review — found one more real bug while re-reading the CSS:

🔴 Nested max-height: 88vh on .plugin-modal AND .modal-content

.plugin-modal { max-height: 88vh; padding: 0; }
.modal-content { padding: var(--space-xl); max-height: 88vh; overflow-y: auto; }

Because .modal-content adds padding: var(--space-xl) and sets max-height: 88vh (same as its parent dialog), the inner element's content box can compute taller than the outer dialog and either overflow or clip its scroll region on tall viewports.

Fix: drop max-height from .modal-content and let overflow-y: auto operate inside the parent's height, or replace it with max-height: 100%.

🟢 Minor: dead transition

.modal-details-summary::after declares transition: transform 0.2s ease; but the open/close swap is a content change (+), which can't be transitioned. Either remove the transition or animate a transform: rotate(45deg) on [open] instead.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant