Skip to content
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

Fix method names in Size example description for PrintOptions class #2121

Merged

Conversation

yvsvarma
Copy link
Contributor

@yvsvarma yvsvarma commented Jan 4, 2025

User description

Description

This PR fixes incorrect method names in the Size example description for the PrintOptions class in Print Page.

Previously, the description incorrectly referred to the methods as getPaperSize() and setPaperSize(). These have been corrected to their actual method names: getPageSize() and setPageSize() as defined in the PrintOptions class.

No changes were made to the code examples themselves, as they already used the correct method names.


Motivation and Context

The documentation must reflect accurate method names to ensure users can correctly utilize the PrintOptions class. The incorrect method names in the description could cause confusion for users referring to the API.


Types of Changes

  • Change to the site (I have double-checked the Netlify deployment, and my changes look good)

Checklist

  • I have read the contributing guidelines.
  • I have used hugo to render the site/docs locally and confirm they look as expected.

PR Type

Documentation


Description

  • Corrected method names in the "Size" section of the print page documentation.

  • Updated references from getPaperSize/setPaperSize to getPageSize/setPageSize.

  • Ensured consistency across multiple language versions of the documentation.

  • Improved clarity and accuracy of the API documentation.


Changes walkthrough 📝

Relevant files
Documentation
print_page.en.md
Corrected method names in English documentation                   

website_and_docs/content/documentation/webdriver/interactions/print_page.en.md

  • Updated method names in the "Size" section.
  • Changed getPaperSize/setPaperSize to getPageSize/setPageSize.
  • +1/-1     
    print_page.ja.md
    Corrected method names in Japanese documentation                 

    website_and_docs/content/documentation/webdriver/interactions/print_page.ja.md

  • Updated method names in the "Size" section.
  • Changed getPaperSize/setPaperSize to getPageSize/setPageSize.
  • +1/-1     
    print_page.pt-br.md
    Corrected method names in Portuguese documentation             

    website_and_docs/content/documentation/webdriver/interactions/print_page.pt-br.md

  • Updated method names in the "Size" section.
  • Changed getPaperSize/setPaperSize to getPageSize/setPageSize.
  • +1/-1     
    print_page.zh-cn.md
    Corrected method names in Chinese documentation                   

    website_and_docs/content/documentation/webdriver/interactions/print_page.zh-cn.md

  • Updated method names in the "Size" section.
  • Changed getPaperSize/setPaperSize to getPageSize/setPageSize.
  • +1/-1     

    💡 PR-Agent usage: Comment /help "your question" on any pull request to receive relevant information

    Copy link

    netlify bot commented Jan 4, 2025

    👷 Deploy request for selenium-dev pending review.

    Visit the deploys page to approve it

    Name Link
    🔨 Latest commit 3317347

    Copy link
    Contributor

    qodo-merge-pro bot commented Jan 4, 2025

    PR Reviewer Guide 🔍

    Here are some key observations to aid the review process:

    ⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪
    🧪 No relevant tests
    🔒 No security concerns identified
    ⚡ No major issues detected

    Copy link
    Contributor

    qodo-merge-pro bot commented Jan 4, 2025

    PR Code Suggestions ✨

    Explore these optional code suggestions:

    CategorySuggestion                                                                                                                                    Score
    General
    Add deprecation notice to help users transition from old to new method names

    Consider adding a note about backward compatibility or deprecation status of the old
    method names (getPaperSize/setPaperSize) to help users understand the transition.

    website_and_docs/content/documentation/webdriver/interactions/print_page.en.md [67]

    -Using the `getPageSize()` and `setPageSize()` methods, you can get/set the paper size to print --- e.g. "A0", "A6", "Legal", "Tabloid", etc.
    +Using the `getPageSize()` and `setPageSize()` methods (formerly `getPaperSize()`/`setPaperSize()`), you can get/set the paper size to print --- e.g. "A0", "A6", "Legal", "Tabloid", etc. The old method names are deprecated and will be removed in a future release.
    • Apply this suggestion
    Suggestion importance[1-10]: 8

    Why: Adding deprecation notice is crucial for API changes, helping users understand the transition and preventing future issues when the old methods are removed. This is particularly important as the change affects multiple language versions of the documentation.

    8

    @yvsvarma yvsvarma changed the title Fix method names in Size example description for PrintOptions class (… Fix method names in Size example description for PrintOptions class Jan 4, 2025
    @asolntsev asolntsev self-assigned this Jan 4, 2025
    Copy link
    Member

    @harsha509 harsha509 left a comment

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    Thank you @yvsvarma !

    @harsha509 harsha509 merged commit a734e43 into SeleniumHQ:trunk Jan 5, 2025
    3 checks passed
    @yvsvarma
    Copy link
    Contributor Author

    yvsvarma commented Jan 5, 2025

    Thank you for your time in reviewing Sri! @harsha509 and @asolntsev :)

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    3 participants