Skip to content

Conversation

@allanlasser
Copy link
Member

@allanlasser allanlasser commented Dec 11, 2025

This one was a bit of a journey:

  1. I started by wanted to render the Share dialog at a larger size—it's very compacted now because our Modals all enforce a 48rem max-width.
  2. I refactored the Modal to support width and height overrides and a fillScreen layout mode.
  3. While refactoring the Modal and the Share dialog, I realized that we were applying padding to Modal content in a sub-optimal way.
  4. I updated all our Modal child components to use consistent padding—many of these were forms.
  5. I was able to refactor most common form styles into kit.css, which let me remove style rules from many of our form components.

End results:

  1. Share dialogs are way more useful since they present the embed at a more realisitic and readable size.
  2. We can now have variable size modals, but default to the same behavior as before.
  3. It's easier to enforce consistent style and layout across all our forms.

Two other small tweaks:

  • I added an .nvmrc so my system recognizes the Node version the project uses.
  • When I ran npm i, the package-lock file was updated with peer dependency annotations. This was unintentional.

Screenshots

Mobile sharing dialog now uses flex-wrap with a vertical overflow:
Screenshot 2025-12-11 at 12 00 00

Larger sharing modal that fills viewport:
Screenshot 2025-12-11 at 12 00 17

Note sharing modal at larger size:
Screenshot 2025-12-11 at 12 01 09

@netlify
Copy link

netlify bot commented Dec 11, 2025

Deploy Preview for documentcloud-frontend-next ready!

Name Link
🔨 Latest commit 4f09203
🔍 Latest deploy log https://app.netlify.com/projects/documentcloud-frontend-next/deploys/69667ad4d627af0008e1a0dc
😎 Deploy Preview https://deploy-preview-1226.muckcloud.com
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@allanlasser allanlasser requested a review from eyeseast December 11, 2025 19:06
@github-actions
Copy link

github-actions bot commented Dec 11, 2025

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 40.3% 998 / 2476
🔵 Statements 44.22% 1276 / 2885
🔵 Functions 52.71% 350 / 664
🔵 Branches 41.75% 489 / 1171
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
src/lib/components/accounts/Mailkey.svelte 100% 100% 100% 100%
src/lib/components/common/Tip.svelte 0% 0% 0% 0% 11
src/lib/components/documents/Share.svelte 69.23% 56% 68.42% 70% 148-166, 163, 211, 223, 277-280
src/lib/components/forms/AddOnDispatch.svelte 0% 0% 0% 0% 193-254
src/lib/components/forms/ChangeOwner.svelte 0% 100% 0% 0% 205-223
src/lib/components/forms/ConfirmDelete.svelte 0% 100% 0% 0% 93-111
src/lib/components/forms/ConfirmRedaction.svelte 0% 100% 0% 0% 80-85
src/lib/components/forms/DeleteProject.svelte 0% 100% 0% 0% 31-41
src/lib/components/forms/Edit.svelte 0% 0% 0% 0% 84-112
src/lib/components/forms/EditAccess.svelte 0% 0% 0% 0% 79
src/lib/components/forms/EditData.svelte 95.23% 100% 87.5% 90.9% 108
src/lib/components/forms/EditMany.svelte 0% 0% 0% 0% 95-118
src/lib/components/forms/EditNote.svelte 0% 0% 0% 0% 61-95
src/lib/components/forms/EditProject.svelte 0% 100% 0% 0% 58-75
src/lib/components/forms/EditSections.svelte 0% 0% 0% 0% 56-89
src/lib/components/forms/InviteCollaborator.svelte 0% 100% 0% 0% 59
src/lib/components/forms/Projects.svelte 0% 100% 0% 0% 130-155
src/lib/components/forms/RemoveCollaborator.svelte 0% 0% 0% 0%
src/lib/components/forms/Reprocess.svelte 0% 100% 0% 0% 177-259
src/lib/components/forms/UpdateCollaborator.svelte 0% 0% 0% 0%
src/lib/components/forms/UserFeedback.svelte 0% 100% 0% 0% 76-121
src/lib/components/layouts/Error.svelte 0% 0% 0% 0% 59-68
src/lib/components/layouts/Modal.svelte 100% 100% 100% 100%
src/lib/components/notes/Note.svelte 0% 0% 0% 0% 94-114
src/lib/components/sidebar/DocumentActions.svelte 0% 0% 0% 0% 136-210
src/lib/components/sidebar/Documents.svelte 0% 100% 0% 0% 87-83
src/lib/components/sidebar/ViewerActions.svelte 0% 0% 0% 0% 114-189
src/lib/components/viewer/PageActions.svelte 0% 0% 100% 0% 55-137
Generated in workflow #980 for commit 4f09203 by the Vitest Coverage Report Action

@allanlasser
Copy link
Member Author

I've identified a few more stories that need tweaked.

@allanlasser allanlasser force-pushed the allanlasser/embed-modal-size branch from 068977a to e2a287a Compare January 8, 2026 21:55
@eyeseast
Copy link
Collaborator

eyeseast commented Jan 9, 2026

Let's wait until #1229 is merged for this one. It hits enough files that there's a good chance we have conflicts, and those will be easier to deal with post-merge, I think.

@allanlasser allanlasser force-pushed the allanlasser/embed-modal-size branch from e2a287a to e46e274 Compare January 12, 2026 21:49
@eyeseast
Copy link
Collaborator

Some of these modal forms are now too wide. I think there's a switch here I can use to bring them back down to a manageable width, but I haven't played with it.

Screenshot 2026-01-13 at 12 08 59 PM Screenshot 2026-01-13 at 12 08 19 PM Screenshot 2026-01-13 at 12 07 46 PM

@eyeseast
Copy link
Collaborator

The share modal, on my laptop at least, is so wide that I'm ending up with a double scroll situation. The modal is too tall for the window, and the preview is too tall for the modal.

Screenshot 2026-01-13 at 12 14 09 PM

@allanlasser
Copy link
Member Author

Thanks for flagging these examples! I'll do a more careful pass to enforce aspect ratios and set max-widths on these modals.

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.

3 participants