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

Move out the parsing of BrowserContextOptions and child options #1390

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

inancgumus
Copy link
Member

@inancgumus inancgumus commented Jun 21, 2024

What?

Moves BrowserContextOptions and child options parsing out of the business logic.

Why?

To decouple sobek from the business logic.

Checklist

  • I have performed a self-review of my code
  • I have added tests for my changes
  • I have commented on my code, particularly in hard-to-understand areas

Related PR(s)/Issue(s)

#1269

- Moves BrowserContextOptions out of the business logic.
- Sets default options in NewBrowserContext to prevent nil pointer
  issues in the rest of the module. Later, we might think about turning
some of these pointer fields into value types to take advantage of their
zero values.
Moves BrowserContextOptions parsing out of the business logic.
@inancgumus inancgumus self-assigned this Jun 21, 2024
- Separates the parsing of options from their validation. The validation
  logic remains in the business logic while the parsing happens in the
mapping layer.
- Moves geolocation option parsing to the mapping layer.
- Adds a validation function for geolocation.
@inancgumus inancgumus changed the title Move out BrowserContextOptions parsing Move out BrowserContextOptions and children parsing Jun 21, 2024
@inancgumus inancgumus changed the title Move out BrowserContextOptions and children parsing Move out the parsing of BrowserContextOptions and child options Jun 21, 2024
Base automatically changed from desobekify/browser to main July 1, 2024 10:29
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.

1 participant