fix(admin): prevent dialogs from overflowing viewport on mobile#99
fix(admin): prevent dialogs from overflowing viewport on mobile#99all3f0r1 wants to merge 4 commits intoemdash-cms:mainfrom
Conversation
On small screens, admin dialogs overflow horizontally — content gets clipped on the left because various max-w-*/w-* classes exceed the viewport width. Add a global max-width cap on [role="dialog"] so all dialogs stay within the viewport. Also fix ContentPickerModal which used a fixed w-2xl instead of max-w-2xl. Fixes emdash-cms#92
🦋 Changeset detectedLatest commit: e810e94 The changes in this PR will be included in the next version bump. This PR includes changesets to release 10 packages
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 |
@emdash-cms/admin
@emdash-cms/auth
@emdash-cms/blocks
@emdash-cms/cloudflare
emdash
create-emdash
@emdash-cms/gutenberg-to-portable-text
@emdash-cms/x402
@emdash-cms/plugin-ai-moderation
@emdash-cms/plugin-atproto
@emdash-cms/plugin-audit-log
@emdash-cms/plugin-color
@emdash-cms/plugin-embeds
@emdash-cms/plugin-forms
@emdash-cms/plugin-webhook-notifier
commit: |
|
All contributors have signed the CLA ✍️ ✅ |
|
I have read the CLA Document and I hereby sign the CLA |
…flow Sorry — the previous fix only set max-width on [role="dialog"], but Kumo's size variants (e.g. size="lg") apply min-width: 32rem which takes precedence over max-width in CSS. On viewports < 640px, dialogs were still overflowing because min-width won the conflict. This commit: - Wraps the dialog override in a @media (max-width: 639px) query - Adds min-width: 0 !important to actually let max-width constrain - Removes size="lg" from WelcomeModal (it was requesting min-w-[32rem] on a dialog capped at sm:max-w-md — contradictory) Tested at 390px viewport: both WelcomeModal and size="lg" dialogs now fit within calc(100vw - 2rem) on mobile. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
In styles.css, I wrapped the dialog override in a Alongside, in @BenjaminPrice, can you give it another try, please? |
Adds a useEffect that triggers onLoadMore when the user navigates to the last client-side page, so content beyond the first API page is fetched automatically. Skips fetch when a search query is active to avoid spurious loads from filtered results collapsing pagination. Also shows a "+" suffix on the item count when more pages are available and stabilizes the onLoadMore callback with useCallback. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Overlapping PRsThis PR modifies files that are also changed by other open PRs:
This may cause merge conflicts or duplicated work. A maintainer will coordinate. |


Summary
Fixes #92
On mobile, admin dialogs overflow the viewport horizontally — content is clipped on the left side because
max-w-*andw-*classes exceed the screen width.max-width: calc(100vw - 2rem)on[role="dialog"]instyles.cssso all dialogs (current and future) stay within the viewportContentPickerModalwhich used a fixedw-2xlinstead ofmax-w-2xlTest plan
max-w-*classes are narrower than100vw - 2rem)