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

Update ufo-architecture.md #64

Merged
merged 1 commit into from
Oct 30, 2022
Merged

Update ufo-architecture.md #64

merged 1 commit into from
Oct 30, 2022

Conversation

ChristopherPHolder
Copy link
Collaborator

  • If running the current .user-flowrc.json config it does not run and asks to set up the URL.

  • user-flow directory was changed to user-flows as it may and probably will contain multiple.

  • Comment/Question.
    There is a typescript error when passing the page to a Ufo, I have been passing the ctx but I won't work in a Ufo that uses another Ufo.
    The error in question is:

Argument of type '{ page: Page; }' is not assignable to parameter of type 'UserFlowContext'.
  Type '{ page: Page; }' is missing the following properties from type 'UserFlowContext': browser, flow, collectOptions

And the code in question is this:

export declare class Ufo {
    protected page: Page;
    constructor({ page }: UserFlowContext);
}

We can either grow the class to expose ctx UserFlowContext or reduce it by only passing the page.
Or maybe there is a smarter way of doing this, some typescript magic.

- If running the current .user-flowrc.json config it does not run and asks to set up the URL.

- user-flow directory was changed to user-flows as it may and probably will contain multiple. 

- Comment/Question.
There is a typescript error when passing the page to a Ufo, I have been passing the ctx but I won't work in a Ufo that uses another Ufo. 
The error in question is:
```ts
Argument of type '{ page: Page; }' is not assignable to parameter of type 'UserFlowContext'.
  Type '{ page: Page; }' is missing the following properties from type 'UserFlowContext': browser, flow, collectOptions
```
And the code in question is this:
```
export declare class Ufo {
    protected page: Page;
    constructor({ page }: UserFlowContext);
}
```
We can either grow the class to expose ctx `UserFlowContext` or reduce it by only passing the page. 
Or maybe there is a smarter way of doing this, some typescript magic.
@BioPhoton BioPhoton added the documentation Improvements or additions to documentation label Oct 23, 2022
@BioPhoton BioPhoton marked this pull request as ready for review October 30, 2022 01:04
@BioPhoton BioPhoton merged commit 55d505d into main Oct 30, 2022
@BioPhoton BioPhoton deleted the Architecture-Docs-Updates branch October 30, 2022 14:13
@BioPhoton BioPhoton mentioned this pull request Dec 17, 2022
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants