Conversation
🦋 Changeset detectedLatest commit: 5fee7ac The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Pull request overview
Adds initial WIP documentation pages and Skin styles for a new Dialog component based on the native <dialog> element.
Changes:
- Added new Dialog docs pages (overview, CSS demo, accessibility guidelines) and metadata.
- Registered
dialogin component metadata and included Skin dialog styles in the headless bundle. - Introduced initial
dialog.scssstyling and open/close animation behavior.
Reviewed changes
Copilot reviewed 10 out of 12 changed files in this pull request and generated 13 comments.
Show a summary per file
| File | Description |
|---|---|
| src/routes/_index/components/lightbox-dialog/+page.marko | Renames the wrapper id (likely to align with new dialog docs). |
| src/routes/_index/components/dialog/css+page.marko | Adds a CSS demo page with interactive native <dialog> behavior. |
| src/routes/_index/components/dialog/css+meta.json | Adds page metadata for the dialog CSS demo. |
| src/routes/_index/components/dialog/accessibility+page.marko | Adds dialog accessibility guidance content. |
| src/routes/_index/components/dialog/accessibility+meta.json | Adds page metadata for accessibility guidance. |
| src/routes/_index/components/dialog/+page.marko | Adds dialog overview/terminology documentation page. |
| src/routes/_index/components/dialog/+meta.json | Adds page metadata for the dialog docs landing page. |
| src/data/component-metadata.json | Registers the new dialog component and links to DS + storybook entries. |
| packages/skin/src/sass/dialog/dialog.scss | Adds base dialog styles and open/close animations. |
| packages/skin/src/sass/bundles/skin-headless.scss | Includes the dialog bundle in headless Skin build. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
| @@ -0,0 +1,63 @@ | |||
| <div id="lightbox-dialog-component"> | |||
There was a problem hiding this comment.
One thing we might want to lightly cover on this page is the new set of html attributes that work in tandem with dialog (e.g. Invoker Commands API). Unfortunately most of them we cannot use due to limited browser availability, but we might want to explicitly spell this out.
There was a problem hiding this comment.
Does this work?
I pushed it as part of the review comments
<h2>HTML Dialog Attributes</h2>
<p>
Modern browsers support the native <code><dialog></code> element along with
related HTML attributes such as the Invoker Commands API (e.g., <code>commandfor</code>,
<code>command</code>). While these attributes provide enhanced functionality for dialog
management, <strong>most are not yet widely supported across all browsers</strong>.
Due to limited browser availability, we cannot rely on these newer attributes in our
components at this time. We continue to use JavaScript-based approaches to ensure
consistent behavior across all supported browsers.
</p>
| @@ -0,0 +1,34 @@ | |||
| function closeDialog(dialog: HTMLDialogElement) { | |||
| dialog.classList.add("dialog--close"); | |||
| dialog.addEventListener( | |||
There was a problem hiding this comment.
Will we have similar JS logic in the Marko component? If so this would be a good candidate to put in our new js utilities (i.e. makeup)
There was a problem hiding this comment.
I think that is scope creep for what this PR is about.
My understanding is that we shouldn't have any JS logic, except for the basics covered here (which is what we did here)
The logic might be similar but there would be extra boilerplate which can't be handled by basic javascript.
There was a problem hiding this comment.
My understanding is that we shouldn't have any JS logic
If we identify any resuable logic, it should be pushed to a js utility module in the spirit of what we did with makeupjs. If there is resuable logic, and you want to do that in a follow up PR, or just create a ticket, that's fine, but it's good to be thinking of the bigger picture. I want to keep the spirit of makeupjs alive in Evo Web.
|
General comment: it would be nice if we could get back in the habit of providing screenshots in the description. |
|
I'd kind of like to see a new vanilla js module/class for this dialog. It can handle the closing animation and closedby logic. e.g. |
I think its generally fine for new components (and if you look at my PRs I generally have them), but for this one they looked so just like the old one, it didn't seem necessary.
As I mentioned earlier, this seems like scope creep to what this PR should be about. |
|
It should be ready for re-review for now. |
It's a shame we are considering this aspect of building a new component from the ground up as scope creep, I had hoped with the move to Evo Web we would carry on in the tradition of MIND patterns and makeup, but I can take care of it. EDIT: So we talked offline and we agreed that there should be somewhere, if not in code, to describe the key parts of the behaviour that need to be covered. For dialog this would be the |
I would definitely appreciate screenshots. Some before and after screenshots are always useful. It doesn't need to be exhaustive. |
|
So based on internal discussion, I added a JavaScript documentation page For making the CSS page static there seems to be some issues with showing the dialogs inline (they show fine on large and small screens, but on medium screens, it overlaps the nav) |
LuLaValva
left a comment
There was a problem hiding this comment.
Doesn't work in dark mode! Looks like <dialog> overrides color from its parent
Otherwise it looks good I think. The only potential thought is— do we want to keep this dialog--close behavior even though in theory we should be able to move away from it pretty soon and leave close animations as a progressive enhancement for newer browsers?





Description
<dialog>component. This is the skin/evo-web piece.dialoghtml elementaria-modal="true"orrole=dialogdialog.ts).Note
Screenshots
Large
Small
The only change to be before is that the small screen was positioned at the bottom. This is positioned in the middle as design prefers it this way.
