-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
docs: add user flow docs #13134
docs: add user flow docs #13134
Conversation
|
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.
This looks great!
We should add a link to a sample flow report at the top of this page, for motivation.
docs/user-flows.md
Outdated
async function main() { | ||
const browser = await puppeteer.launch(); | ||
const page = await browser.newPage(); | ||
const flow = new lighthouse.UserFlow(page); |
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.
nit: should we expose a newUserFlow
? perhaps exposing the api via a class isn't necessary / ideal. idk
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.
cc @adamraine thoughts?
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.
The ES6 class made the most sense to me, is the benefit here that it matches the puppeteer methods?
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.
I think @connorjclark is referring to the public entrypoint being something non-constructor based, not that we should move away from the class itself.
I have to agree constructor-based public APIs feel gross to me for a node library, but admittedly I don't have a compelling case for why, so I'm fine with either.
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.
Aight I slept on this one and a function entry point SGTM.
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.
see #13139
Summary
Adds some user flow documentation and explainers for the different modes. Feedback welcome :)
Related Issues/PRs
ref #11313