-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[dotnet] Allow setting of PageDimensions and PageMargins in PrintOptions directly #14593
[dotnet] Allow setting of PageDimensions and PageMargins in PrintOptions directly #14593
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
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.
Allow properties to be null
or not. Nullable properties is very good idea (see inline comment).
Good progress here, I am going to checksum (using CI). If pass, the I vote for removing |
We don't have test for |
@nvborisenko sure, I wrote the documentation examples - they should easily port over. |
Done |
I looked at java implementation, it stores default values on client side. So let's be in sync.
|
Do we want to throw an error when setting as null, or do we want to just set the default in that case and let it continue? |
Definitely throw argument null exception. |
… to check for ArgumentNullExceptions being thrown...
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.
Looks good, thank you
@nvborisenko Could you explain the code changes you made? Particularly PageSizeDictionary()s changes, I can see the logic in the changes to the main sets, as well as refining the test example to just test construction instead of construction inside of the print command. |
Lol thank you Those all make sense to me |
…ons directly (SeleniumHQ#14593) And make possibility to use object initializer language feature --------- Co-authored-by: Nikolay Borisenko <[email protected]>
User description
PrintOptions.cs was missing setters for PageMargins and PageDimensions.
Description
added setters in PrintOptions.cs for PageMargins and PageDimensions.
Motivation and Context
fixes issue
Types of changes
Checklist
PR Type
Bug fix
Description
PageDimensions
andPageMargins
in thePrintOptions
class to allow modification of these properties.Changes walkthrough 📝
PrintOptions.cs
Add missing setters for PageDimensions and PageMargins
dotnet/src/webdriver/PrintOptions.cs
PageDimensions
property.PageMargins
property.