Skip to content

Feature - Add slide-over panel as a usage pattern of huxDialog#47

Open
Copilot wants to merge 12 commits into
mainfrom
copilot/add-slide-over-component
Open

Feature - Add slide-over panel as a usage pattern of huxDialog#47
Copilot wants to merge 12 commits into
mainfrom
copilot/add-slide-over-component

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 23, 2026

This pull request improves the visual presentation and documentation of demo components and pattern pages. The main focus is on standardizing the layout of demo sections, introducing a new slide-over panel demo for dialogs, and refining the CSS grid breakout system for better alignment and spacing.

Component and Layout Standardization:

  • All demo component containers now use the prose-demo not-prose class to ensure consistent styling and prevent prose formatting from affecting demo layouts. This change was applied to Combobox.astro, CommandPalette.astro, CopyToClipboard.astro, Dialog.astro, Dropdown.astro, InlineEditor.astro, Resizable.astro, ScrollSpy.astro, and Tabs.astro. [1] [2] [3] [4] [5] [6] [7] [8] [9]

  • The CSS for .prose-breakout was updated to ensure .prose-demo blocks span the full grid width, with improved vertical spacing between demos and other content.

Documentation Enhancements:

  • On all pattern documentation pages, the <Demo /> component is now placed inside the main prose container for better alignment and consistency. [1] [2] [3] [4] [5] [6] [7] [8]

Dialog Pattern Improvements:

  • The dialog pattern documentation now includes a new "Slide-over Panel" section, demonstrating how to use huxDialog for slide-over panels (drawers) with a dedicated demo and example code. Related search terms were also added. [1] [2] [3]

New Demo Component:

  • Added SlideOver.astro, a comprehensive slide-over panel demo, to showcase advanced dialog usage and transitions.

These changes collectively make the demos more visually distinct, improve the clarity of documentation, and provide a better developer experience for users exploring the pattern library.

@cloudflare-workers-and-pages
Copy link
Copy Markdown
Contributor

cloudflare-workers-and-pages Bot commented May 23, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
hyperux 07c7566 Commit Preview URL

Branch Preview URL
May 26 2026, 08:58 AM

Copilot AI changed the title [WIP] Add slide-over component using Dialog pattern Feature - Add Slide-over pattern built on Dialog May 23, 2026
Copilot AI requested a review from markmead May 23, 2026 11:41
@markmead
Copy link
Copy Markdown
Owner

@copilot Is a dedicated pattern needed, or could we use huxDialog with some CSS to replicate it?

Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 23, 2026

@copilot Is a dedicated pattern needed, or could we use huxDialog with some CSS to replicate it?

Looking at the implementation, huxSlideOver's logic is structurally identical to huxDialog — the slide animation and edge positioning all come from CSS transition/position classes in the markup, not from the component itself. The placement property is just reactive state that markup reads to apply the right classes.

So yes, huxDialog + CSS can replicate it. The dedicated component only adds:

  • A named API (openSlideOver, closeSlideOver, etc.) for semantic clarity
  • A separate event namespace (hux-slide-over:* vs hux-dialog:*)

If you'd prefer to keep the footprint smaller and document slide-over as a usage pattern of huxDialog (similar to how Command Palette extends Dialog), I can revert the dedicated component and instead add a slide-over example to the Dialog docs. Happy to go either direction — let me know your preference.

@markmead markmead changed the title Feature - Add Slide-over pattern built on Dialog Feature - Implement huxSlideOver pattern based on huxDialog May 23, 2026
@markmead
Copy link
Copy Markdown
Owner

@copilot Yes – instead of adding a new pattern, please add a demo (with documentation) to the existing huxDialog page.

Copilot AI and others added 2 commits May 23, 2026 18:20
Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 23, 2026

@copilot Yes – instead of adding a new pattern, please add a demo (with documentation) to the existing huxDialog page.

Done in 5046f1d.

  • Removed the huxSlideOver component registration entirely from PatternRegistration.astro
  • Deleted slide-over.mdx
  • Rewrote SlideOver.astro to use huxDialog (swapped openSlideOver/closeSlideOver/slideOverTitleId for the standard huxDialog API)
  • Added a Slide-over Panel subsection under Common Usage Patterns in dialog.mdx, with the live demo and a code snippet showing how CSS x-transition classes achieve the slide animation

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • telemetry.astro.build
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/.npm/_npx/aa98e6899c6baff3/node_modules/.bin/astro build (dns block)
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node node_modules/.bin/astro build (dns block)
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node node_modules/.bin/astro check (dns block)
  • workers.cloudflare.com
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node node_modules/.bin/astro build (dns block)
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node node_modules/.bin/astro check (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title Feature - Implement huxSlideOver pattern based on huxDialog Feature - Add slide-over panel as a usage pattern of huxDialog May 23, 2026
@markmead markmead marked this pull request as ready for review May 24, 2026 07:45
@markmead markmead requested a review from Copilot May 24, 2026 07:45
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 folds the “slide-over panel” experience into the existing huxDialog pattern by documenting it as a usage pattern (CSS-driven transitions/positioning) rather than maintaining a dedicated huxSlideOver Alpine component.

Changes:

  • Removes the dedicated huxSlideOver registration and updates the demo to use the standard huxDialog API.
  • Adds a new SlideOver demo component and embeds it into the huxDialog documentation.
  • Deletes the standalone slide-over pattern page and expands dialog search terms to include slide-over-related keywords.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/components/PatternRegistration.astro Removes the huxSlideOver Alpine data registration in favor of using huxDialog directly.
src/components/demos/SlideOver.astro Adds a slide-over demo implemented with huxDialog + CSS x-transition classes.
src/content/patterns/dialog.mdx Documents slide-over as a huxDialog usage pattern, adds demo/snippet, and updates terms/modDate.
src/content/patterns/slide-over.mdx Deleted (slide-over now documented under dialog).

Comment thread src/content/patterns/dialog.mdx Outdated
Comment thread src/components/demos/SlideOver.astro Outdated
@markmead
Copy link
Copy Markdown
Owner

@copilot Address the feedback.

Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 24, 2026

@copilot Address the feedback.

Fixed in d65e167 — changed x-show="isOpen" to x-show="showBackdrop" on the backdrop element in both SlideOver.astro and the code snippet in dialog.mdx, so isSeamless: true correctly hides the backdrop for this pattern.

markmead added 3 commits May 24, 2026 09:22
Apply a new .prose-demo helper to demo wrapper components so they break out of the prose grid; update global.css to set grid-column behavior for demos and pre elements and add top/bottom spacing between demos. Also tidy up SlideOver/Dialog markup (formatting of attributes and closing tags) and reposition the <Demo /> include in the dialog pattern for correct rendering. These changes enable full-width demo panels and improve markup consistency.
Relocate the <Demo /> component into the prose container for several pattern docs to ensure consistent layout, styling, and spacing of demo previews. Updated files: combobox.mdx, command-palette.mdx, copy-to-clipboard.mdx, dropdown.mdx, inline-editor.mdx, resizable.mdx, scroll-spy.mdx, tabs.mdx.
Add the not-prose class to demo wrapper divs so Tailwind Typography (prose) styles don't affect the demo components (Combobox, CommandPalette, CopyToClipboard, Dialog, Dropdown, InlineEditor, Resizable, ScrollSpy, SlideOver, Tabs). Update global.css selector to apply the grid-column rule only to direct children that are not .prose-demo or pre, preventing layout rules from affecting demo containers. Also adjust SlideOver wrapper formatting.
@markmead markmead changed the title Feature - Add slide-over panel as a usage pattern of huxDialog Feature - Add slide-over panel as a usage pattern of huxDialog May 24, 2026
@markmead markmead added the enhancement New feature or request label May 24, 2026
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

Copilot reviewed 20 out of 20 changed files in this pull request and generated 1 comment.

Comment thread src/components/demos/SlideOver.astro Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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

Copilot reviewed 20 out of 20 changed files in this pull request and generated 2 comments.

Comment thread src/components/demos/SlideOver.astro Outdated
Comment thread src/content/patterns/dialog.mdx Outdated
@markmead
Copy link
Copy Markdown
Owner

@copilot Address the changes – review the other huxDialog demo and make sure these issues aren't present there.

Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 26, 2026

@copilot Address the changes – review the other huxDialog demo and make sure these issues aren't present there.

Addressed in 07c7566.

I updated the slide-over backdrop to follow the same huxDialog pattern as the main dialog demo: it now uses x-if="showBackdrop" with x-show="isOpen" so transitions run correctly while still honoring seamless mode. I also updated the dialog.mdx slide-over snippet to match and verified the existing Dialog.astro demo already follows this pattern.

Screenshot: /tmp/playwright-logs/slide-over-fix.png

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • fonts.google.com
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/hyperux/hyperux/node_modules/.bin/../astro/bin/astro.mjs build (dns block)
  • sparrow.cloudflare.com
    • Triggering command: /opt/hostedtoolcache/node/24.15.0/x64/bin/node /opt/hostedtoolcache/node/24.15.0/x64/bin/node --no-warnings --experimental-vm-modules /home/REDACTED/work/hyperux/hyperux/node_modules/.pnpm/wrangler@4.93.1/node_modules/wrangler/wrangler-dist/cli.js types (dns block)
  • telemetry.astro.build
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/hyperux/hyperux/node_modules/.bin/../astro/bin/astro.mjs build (dns block)
  • workers.cloudflare.com
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/hyperux/hyperux/node_modules/.bin/../astro/bin/astro.mjs check (dns block)
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/hyperux/hyperux/node_modules/.bin/../astro/bin/astro.mjs build (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

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

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create "Slide-over" pattern/component using Dialog

3 participants