Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
95 commits
Select commit Hold shift + click to select a range
320e7bb
feat(whatsnew): add what's new nav trigger and dialog
Sep 11, 2026
3c27479
test(nav): temporarily force-inject whatsnew on my test page
Sep 11, 2026
9b1650c
test: reorder nav injection after Feedback, fetch from preview host
Sep 11, 2026
d294ccc
style(whatsnew): match Figma TOC styling exactly
Sep 11, 2026
a8431ee
fix(whatsnew): always show CTA, scroll offset, dot lifecycle, spacing
Sep 11, 2026
4e7c810
fix(whatsnew): sliding toc indicator, scoped disabled button, spacing
Sep 11, 2026
2981b75
fix(whatsnew): reposition close button, inset cards scrollbar
Sep 11, 2026
ab22b61
style(whatsnew): give cards scrollbar a visible track, matching toc's
Sep 11, 2026
e7c5253
fix(whatsnew): flatten scrollbar selectors, higher-contrast colors, s…
Sep 11, 2026
a636ee0
fix(whatsnew): custom auto-hiding cards scrollbar, fix bottom spacing
Sep 11, 2026
5438b5a
revert(whatsnew): drop custom cards scrollbar, back to native
Sep 11, 2026
10cb89b
style(whatsnew): drop panel border, inset scrollbar 40px from bottom
Sep 11, 2026
d1f5b12
style(whatsnew): add 20px more trailing space after the last card
Sep 11, 2026
076aec8
fix(whatsnew): guarantee last-card scroll room, fix scrollbar inset
Sep 11, 2026
a628647
fix(whatsnew): precise trailing space, remove static bottom gap again
Sep 11, 2026
50f5d9d
feat(whatsnew): timestamp-based freshness, drop CTAs, responsive mobile
Sep 15, 2026
1927f7f
fix(whatsnew): toc indicator now moves immediately on click
Sep 15, 2026
7730dcb
fix(whatsnew): suppress scroll observer during click-triggered scroll
Sep 15, 2026
6326e04
fix(whatsnew): fire toc indicator update at full card visibility too
Sep 15, 2026
5c61278
fix(whatsnew): remove mobile-only white gap above cards
Sep 15, 2026
abca7ac
feat(whatsnew): mobile toc sticks over cards instead of a static gap
Sep 15, 2026
8da23b5
fix(whatsnew): restore mobile card width, regressed by sticky-toc change
Sep 15, 2026
f0d7551
fix(whatsnew): symmetric 40px left/right padding on mobile cards panel
Sep 15, 2026
e604437
refactor(whatsnew): move whatsnew-flags into blocks/whatsnew
Sep 16, 2026
8a705f4
fix(whatsnew): use a relative path for the fragment, not a hardcoded …
Sep 16, 2026
c6ae7fb
refactor(whatsnew): use shared nx-dialog instead of a raw <dialog>
Sep 16, 2026
a922f5f
fix(whatsnew): fill actual available height, fix close button stacking
Sep 16, 2026
0311c89
fix(whatsnew): properly fix gray background height, stop toc scrolling
Sep 16, 2026
dc301a9
fix(whatsnew): pin panel height with min-height, drop magic-number hack
Sep 16, 2026
1482585
fix(whatsnew): kill outer body's gap/actions space and overflow
Sep 16, 2026
24e5720
revert: drop nx-dialog refactor, back to raw <dialog>
Sep 16, 2026
dc0f032
fix(whatsnew): handle fetch failures in _loadContent
Sep 16, 2026
da7ada7
fix(whatsnew): stop double-fetching the same fragment URL
Sep 16, 2026
35703d6
fix(whatsnew): scrollspy could get stuck suppressed forever
Sep 16, 2026
b635eb7
fix(whatsnew): guard against stacking two dialogs
Sep 16, 2026
d48dd09
test(whatsnew): add unit tests for parsing, dialog, and nav trigger
Sep 16, 2026
ef9868e
refactor(whatsnew): reuse nx-dialog per review feedback
Sep 23, 2026
47df861
fix(whatsnew): cards weren't scrolling, .wn-body ignored its height cap
Sep 23, 2026
97600e5
style(whatsnew): use component text tokens for card body, not body to…
Sep 23, 2026
c946003
fix(whatsnew): symmetric top/bottom padding on desktop cards viewport
Sep 23, 2026
0e2fba8
fix(whatsnew): last card couldn't reach the scroll target on click
Sep 23, 2026
f5f8ca7
fix(whatsnew): scope the extra bottom gap to the last card only
Sep 23, 2026
221b761
fix(whatsnew): restore focus to trigger on close, extract nav constant
Sep 23, 2026
69ac04e
fix(whatsnew): toc indicator invisible on initial open
Sep 23, 2026
fc82a0e
fix(whatsnew): dot clears on full view, not just close; drop define g…
Sep 23, 2026
9fbb81b
fix(whatsnew): suppress focus ring on mouse-triggered close only
Sep 23, 2026
094cfa8
fix(whatsnew): stop autofocusing the close button on auto-open
Sep 23, 2026
f92689a
style(whatsnew): condense multi-line comments to single lines
Sep 23, 2026
2d9ee92
fix(whatsnew): use the gift icon Markus requested, not lightbulb
Sep 23, 2026
0ae23e1
fix(whatsnew): last card requires scrolling to bottom to count as seen
Sep 23, 2026
44ffc47
Merge branch 'main' into new1140
yevheniia0831 Sep 24, 2026
19be8dc
feat(whatsnew): support MP4 video entries, not just pictures
Sep 24, 2026
029b40f
fix(whatsnew): huge bottom padding on mobile and with video cards
Sep 24, 2026
5fec4d7
fix(whatsnew): make mobile popup a true full-screen modal
Sep 24, 2026
83480fc
Revert "fix(whatsnew): make mobile popup a true full-screen modal"
Sep 24, 2026
6cf1a0d
fix(nx2): give nx2's Adobe Clean font a collision-proof family name
Sep 24, 2026
c403780
Revert "fix(nx2): give nx2's Adobe Clean font a collision-proof famil…
Sep 24, 2026
83d04fc
Update whatsnew trigger behavior
mhaack Sep 25, 2026
8d08f28
Simplify whatsnew seen-state handling
mhaack Sep 25, 2026
f2bb7b3
fix: remove unused
mhaack Sep 25, 2026
b2915ed
Remove unused whatsnew gift icon
mhaack Sep 25, 2026
7c44003
Rename whatsnew helpers
mhaack Sep 25, 2026
a229b96
Simplify whatsnew dialog scrolling
mhaack Sep 25, 2026
15d8562
Clean up whatsnew tests
mhaack Sep 25, 2026
554f703
Narrow whatsnew fragment loading
mhaack Sep 25, 2026
4ab1a9e
Clean up whatsnew test comments
mhaack Sep 25, 2026
9d20998
Revert whatsnew changes from fragment loader
mhaack Sep 25, 2026
d0d9ffc
Make whatsnew parser internals private
mhaack Sep 25, 2026
05a72c8
Trim whatsnew test helpers
mhaack Sep 25, 2026
6b747de
fix(whatsnew): replace JS scroll-room calc with static CSS padding
Sep 25, 2026
301d6d7
fix(whatsnew): reduce static scroll padding, 240px overshot
Sep 25, 2026
cbc21ff
fix(whatsnew): don't zero out mobile scroll padding
Sep 25, 2026
6fd4124
fix(whatsnew): drop unnecessary --nx-dialog-body-overflow override
Sep 25, 2026
8eb8d16
fix(whatsnew): drop unused flex on .wn-card
Sep 25, 2026
7595f67
fix(whatsnew): use heading-size-xs for toc title
Sep 25, 2026
ee4a0a3
fix(whatsnew): bump toc title back up to heading-size-s, xs looked to…
Sep 25, 2026
eafc961
fix(whatsnew): revert toc title back to heading-size-m
Sep 25, 2026
375406e
Merge branch 'main' into new1140
yevheniia0831 Sep 25, 2026
e077c9c
fix(whatsnew): drop custom scrollbar styling, use native
Sep 25, 2026
f17566d
fix(whatsnew): set explicit font-family on toc items, card titles/body
Sep 25, 2026
6c3a4cf
fix(whatsnew): scope focus-tracking listeners to dialog lifecycle
Sep 25, 2026
83ba73b
fix(whatsnew): rely on native dialog focus restore, cap size only
Sep 28, 2026
cb9908d
Update worklog
claude Sep 28, 2026
1db1c8c
fix(whatsnew): restore dialog min size
Sep 28, 2026
8992629
Update worklog
claude Sep 28, 2026
dc721b8
feat(dialog): add large size variant, size whatsnew to its content
Sep 28, 2026
c05cbf6
Update worklog
claude Sep 28, 2026
334a4d6
Use shared whatsnew fragment path
mhaack Sep 28, 2026
5f0aa4c
fix(whatsnew): stop toc indicator bouncing while scrolling
Sep 29, 2026
1464146
Update worklog
claude Sep 29, 2026
42b738a
Merge branch 'main' into new1140
Oct 1, 2026
528bb8d
fix: cleanup shared dialog updates
sharanyavinod Oct 1, 2026
5155525
Merge branch 'main' into new1140
sharanyavinod Oct 1, 2026
d4e5a18
chore: add missing aria-label
sharanyavinod Oct 1, 2026
b06e152
Merge branch 'new1140' of github-new:adobe/da-nx into new1140
sharanyavinod Oct 1, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 30 additions & 23 deletions docs/dialog.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,51 +65,58 @@ dialog.busy = false;

### Properties / attributes

| Property / attribute | Type | Default | Description |
| -------------------- | --------- | ------- | ----------------------------------------------------------------------- |
| `title` | `String` | — | Heading text rendered above the body. Omit for a headingless dialog. |
| `persistent` | `Boolean` | `false` | Prevents closing on backdrop click or Escape. |
| `busy` | `Boolean` | `false` | Inerts the dialog body. Implicitly enables `persistent` behavior. |
| Property / attribute | Type | Default | Description |
| -------------------- | --------- | ------- | -------------------------------------------------------------------- |
| `title` | `String` | — | Heading text rendered above the body. Omit for a headingless dialog. |
| `persistent` | `Boolean` | `false` | Prevents closing on backdrop click or Escape. |
| `busy` | `Boolean` | `false` | Inerts the dialog body. Implicitly enables `persistent` behavior. |

### Methods

| Method | Description |
| ------- | ---------------------------------------------------- |
| `close` | Closes the dialog and fires a `close` event. |
| Method | Description |
| ------- | -------------------------------------------- |
| `close` | Closes the dialog and fires a `close` event. |

### Events

| Event | Description |
| ------- | ------------------------------------------------------ |
| Event | Description |
| ------- | ---------------------------------------------------------------------------------------------- |
| `close` | Fired when the user dismisses the dialog (backdrop click, Escape, or explicit `close()` call). |

## Slots

| Slot | Description |
| ----------- | --------------------------------------------------------------- |
| _(default)_ | Dialog body content |
| `actions` | Action buttons rendered in the footer, right-aligned |
| Slot | Description |
| ----------- | ---------------------------------------------------- |
| _(default)_ | Dialog body content |
| `actions` | Action buttons rendered in the footer, right-aligned |

## CSS custom properties

The panel sizing and padding can be overridden from the consuming page. Each property has a sensible default — set it on the `nx-dialog` element (or any ancestor) only when you need to deviate. All values are still clamped to the viewport so a too-large value won't overflow.

| Property | Default | Description |
| ----------------------- | ------------------------ | ---------------------------------------------------- |
| `--nx-dialog-min-width` | `400px` | Panel minimum width. |
| `--nx-dialog-max-width` | `480px` | Panel maximum width. |
| `--nx-dialog-max-height`| `90vh` (`90dvh` modern) | Panel maximum height. |
| `--nx-dialog-padding` | `var(--s2-spacing-500)` | Inner padding around heading, body, and actions. |
| Property | Default | Description |
| ------------------------ | ----------------------- | ------------------------------------------------ |
| `--nx-dialog-min-width` | `400px` | Panel minimum width. |
| `--nx-dialog-max-width` | `480px` | Panel maximum width. |
| `--nx-dialog-max-height` | `90vh` (`90dvh` modern) | Panel maximum height. |
| `--nx-dialog-padding` | `var(--s2-spacing-500)` | Inner padding around heading, body, and actions. |

### Wide dialog

To widen a default dialog without the large layout, raise the max width only.

```css
nx-dialog.block-library {
--nx-dialog-max-width: 960px;
--nx-dialog-max-height: 640px;
nx-dialog.wide {
--nx-dialog-max-width: 600px;
}
```

## CSS parts

| Part | Description |
| ------- | ------------------------------------------ |
| `panel` | Dialog panel containing all rendered slots. |

### Full-bleed body

Combine a zero `--nx-dialog-padding` with your own padding on the slotted content to push body content to the panel edge (useful for split layouts).
Expand Down
5 changes: 3 additions & 2 deletions nx2/blocks/fragment/fragment.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,14 @@ export async function loadFragment(path) {
const html = await resp.text();
const doc = new DOMParser().parseFromString(html, 'text/html');

// Run before append() moves the section nodes out of doc.
replaceDotMedia(path, doc);

const sections = doc.body.querySelectorAll('main > div');
const fragment = document.createElement('div');
fragment.classList.add('fragment-content');
fragment.append(...sections);

replaceDotMedia(path, doc);

const container = applyPageStyles(fragment);

await loadArea({ area: fragment });
Expand Down
8 changes: 7 additions & 1 deletion nx2/blocks/shared/dialog/dialog.css

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

these changes will impact all dialogs. are we sure this is has no side effects.

Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ dialog {
.body {
flex: 1 1 auto;
min-height: 0;
display: flex;
flex-direction: column;
overflow: auto;
font-size: var(--s2-component-m-medium-font-size, 14px);
line-height: var(--s2-component-m-medium-line-height, 1.43);
Expand All @@ -80,5 +82,9 @@ dialog {
flex-flow: row wrap;
justify-content: flex-end;
gap: var(--s2-spacing-100);
padding-top: var(--s2-spacing-200);
padding-top: var(--s2-spacing-200);
}

.actions[hidden] {
display: none;
}
12 changes: 10 additions & 2 deletions nx2/blocks/shared/dialog/dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ class NxDialog extends LitElement {
static properties = {
title: { type: String },
busy: { type: Boolean },
_hasActions: { state: true },
};

get _dialog() { return this.shadowRoot.querySelector('dialog'); }
Expand Down Expand Up @@ -42,23 +43,30 @@ class NxDialog extends LitElement {
if (!this.busy) this.close();
}

_onActionsSlotChange(e) {
this._hasActions = e.target.assignedElements({ flatten: true }).length > 0;
}

render() {
const titleText = this.title?.trim();
const hasActions = this._hasActions ?? Boolean(this.querySelector('[slot="actions"]'));
return html`
<dialog
aria-labelledby=${titleText ? 'nx-dialog-title' : nothing}
aria-label=${titleText ? nothing : 'Dialog'}
@cancel=${this._onCancel}
@click=${this._onBackdropClick}
>
<div class="panel" ?inert=${this.busy}>
<div class="panel" part="panel" ?inert=${this.busy}>
${titleText ? html`
<div class="heading">
<h2 class="title" id="nx-dialog-title">${titleText}</h2>
</div>
` : nothing}
<div class="body"><slot></slot></div>
<div class="actions"><slot name="actions"></slot></div>
<div class="actions" ?hidden=${!hasActions}>
<slot name="actions" @slotchange=${this._onActionsSlotChange}></slot>
</div>
</div>
</dialog>
`;
Expand Down
Loading
Loading