Repository navigation
Fixing extra page bug on print - #1478
Conversation
WalkthroughAdds min-height: auto !important to .mantine-AppShell-main inside a @media print block to control main area minimum height during printing. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. ✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
apps/client/src/features/editor/styles/print.css (1)
8-11: Consider also resetting height/min-block-size for broader browser coverage.Some browsers (and flex contexts) can still enforce a tall box if height or block-size constraints are present. A minimal hardening is to also reset height and min-block-size in the same rule.
Apply this diff within the same rule:
.mantine-AppShell-main { padding-top: 0 !important; min-height: auto !important; + height: auto !important; + min-block-size: auto !important; }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
apps/client/src/features/editor/styles/print.css(1 hunks)
🔇 Additional comments (2)
apps/client/src/features/editor/styles/print.css (2)
8-11: Targeted print override looks good; likely fixes the extra blank page.Setting min-height: auto !important on .mantine-AppShell-main in print will neutralize any 100vh/dvh min-height from the runtime styles and prevent the overflow that creates an extra page. Using !important is reasonable here given Mantine’s injected styles.
8-11: Review scan results for print CSS overridesThe repository-wide search confirms:
- No other
@media printrules setheight: 100vhormin-height: 100vh.- The only standalone
min-height: 100vhis in
apps/client/src/ee/mfa/components/mfa-challenge.module.css(not wrapped in@media print).
• If printing that route can trigger an extra page, consider adding a print override (e.g.min-height: auto !important) in your globalprint.css.- The sole forced-break directive in a print rule is in
apps/client/src/features/editor/styles/media.css→break-inside: avoid;
• Verify this won’t push large blocks entirely to the next page, causing blanks.- No other
.mantine-AppShell-mainsizing overrides exist beyond the ones inapps/client/src/features/editor/styles/print.css.Action items:
- Confirm whether
break-inside: avoidinmedia.cssshould be adjusted or removed.- Optionally override the MFA challenge container’s
min-heightin print.
|
@Philipinho Let me know what you think! |
|
@Philipinho hey, I was just wondering if there's anything else I need to do for a merge? Thank you. |
|
Thank you for your contribution. |
|
Sorry for rushing you lol, thank you so much! @Philipinho |
4231ba9 Merge commit '042836cb6d7cc1f71af3ce44c7957f8abbbf8f25' into feat/aar_edition 042836c sync 4f1f0ba fix 3164b69 feat: api keys management (EE) (docmost#1665) 16c1e86 fix comment space c9b1cad sync bf8cf62 feat: Typesense search driver (EE) (docmost#1664) 5a2e16a Merge commit '31350303760163384113bf49d07127e886f94907' into feat/aar_edition 3bc710d Adds CLAUDE.md documentation 16914f1 Block search for non-indexed shares ca75e29 Set default page mode to Read 3135030 fix editor converter (docmost#1647) 3fae41a fix: editor performance improvements (docmost#1648) b50e256 sync 1f3b0c7 cloud fix 3c4cab0 v0.23.2 4de25a8 invalidate queries on space deletion cf5bbb1 fix import html processing ac17521 sync 9ac180f fix: enhance page import (docmost#1570) 46669fe (cloud) disable page sharing in trial mode fe6ecdf fix: update combobox props in SpaceSelect component (docmost#1564) 04ae1d7 Allow lastColumnResizable in table 1280f96 feat: implement space and workspace icons (docmost#1558) 61d1cf8 fix: reset file inputs after import f413720 - sync - reinstantiate S3 client to fix file upload errors during import - delete import zip file after use 8e16ad9 v0.23.1 7ada3cb fix: page import task (docmost#1551) 47c5417 sync dc06502 sync 091e790 fix attachment search in cloud ae24ea2 v0.23.0 9df6061 lock file 31053e2 update mermaid eb8e850 use debug c99bfb8 make print better 26ea04e sync 6cc58c5 sync 7d2ff34 UI fixes b08d37f fix d43ee77 remove debug log 5d91eb4 feat: queue imported attachments for indexing 3e9f6b1 Remove version from docker-compose.yml [deprecated] (docmost#1011) db55de9 feat: progressive web app (docmost#614) 1919eba New Crowdin updates (docmost#1522) 7951b2e New Crowdin updates (docmost#1509) 73b78f6 more translations cf7534d fix version display adec36d fix: adjust margins - use default browser highlight background f9e1080 sync 00e499b Fixing extra page bug on print (docmost#1478) 5ee6e46 checkbox aligned to text (docmost#1486) 1f797c3 fix: confluence drawio import (docmost#1518) f12866c feat(EE): full-text search in attachments (docmost#1502) dcbb65d feat(EE): LDAP integration (docmost#1515) 5968764 feat: emoji callout icon (docmost#1323) 242fb6b fix: set mermaid theme based on computed color scheme (docmost#1438) 74cd890 feat(EE): implement SSO group sync for SAML and OIDC (docmost#1452) 509622a ignore type error 937386e fix: hide table handles in readonly mode 60a373f fix: readonly editor table responsiveness 73ee6ee feat: subpages (child pages) list node (docmost#1462) 7d1e5bc feat: table row/column drag and drop (docmost#1467) aa58e27 fix: exclude deleted pages (docmost#1494) 08135a2 sync d92a942 sync 5012a68 sync 5a33777 feat: debug mode env variable (docmost#1450) 3b85f4b fix: enforce C collation for page position ordering to ensure consistent behavior in Postgres 17+ (docmost#1446) cb2a039 fix: invalidate trashed page from tree state 95b7be6 fix: hide trash from can view permission (docmost#1445) b0c5572 fix nested taskList in markdown export (docmost#1443) dddfd48 feat: add attachments support for single page exports (docmost#1440) aa6eec7 fix: exclude trashed pages from position generation 97a7701 fix local storage copy function (docmost#1442) b97eb85 sync git-subtree-dir: vendor/app git-subtree-split: 4231ba9
This issue fixes #1464
The extra blank page was caused by Mantine’s <AppShell.Main> applying min-height: 100vh in print mode. In Chrome, 100vh maps to the full page box (~1056px) while the printable area is slightly smaller (~982px), which forced an overflow onto a second empty page.
I added min-height: auto to the existing class in 'print.css, so the container shrink-wraps to its content. This removes the phantom page without affecting normal screen layout.
Screen.Recording.2025-08-18.at.2.32.30.PM.mov