-
Notifications
You must be signed in to change notification settings - Fork 22
Add singlePage page Property #58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
WalkthroughA new Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant PagePropertyBuilder
participant PageProperties
Client->>PagePropertyBuilder: SetSinglePage(true)
PagePropertyBuilder->>PageProperties: SinglePage = true
Note right of PageProperties: SinglePage property set for PDF generation
Poem
✨ Finishing Touches
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. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
lib/Domain/Requests/Facets/PageProperties.cs (1)
140-144
: Well-implemented property with clear documentation.The
SinglePage
property is properly implemented with:
- Correct
MultiFormHeader
attribute referencing the constant fromConstants.cs
- Appropriate boolean type for the single-page feature
- Consistent formatting with other properties in the class
The XML documentation clearly explains the purpose, though it could benefit from more specific details about how it interacts with existing paper size settings.
Consider enhancing the documentation to be more specific about the override behavior:
/// <summary> -/// Get or set a value indicating whether the PDF should be generated as a single page. (Will override the paper size) +/// Get or set a value indicating whether the PDF should be generated as a single page. +/// When true, this setting overrides the PaperWidth and PaperHeight properties to fit all content on a single page. /// </summary>
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
lib/Domain/Builders/Faceted/PagePropertyBuilder.cs
(1 hunks)lib/Domain/Requests/Facets/PageProperties.cs
(1 hunks)lib/Infrastructure/Constants.cs
(1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
lib/Domain/Requests/Facets/PageProperties.cs (1)
lib/Infrastructure/Constants.cs (5)
Constants
(18-294)Gotenberg
(51-293)Chromium
(175-292)Shared
(211-291)PageProperties
(226-255)
🔇 Additional comments (2)
lib/Infrastructure/Constants.cs (1)
253-254
: LGTM! Clean constant addition following established patterns.The new
SinglePage
constant follows the existing naming conventions and is properly placed within thePageProperties
class. The camelCase value"singlePage"
is consistent with other form field names in the constants.lib/Domain/Builders/Faceted/PagePropertyBuilder.cs (1)
45-50
: Excellent implementation following the builder pattern.The
SetSinglePage
method is well-implemented with:
- Consistent naming convention with other
Set*
methods- Proper method chaining by returning the builder instance
- Reasonable default value (
true
) for the optional parameter- Clean, focused implementation
Summary by CodeRabbit
Fix #57