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

Add Window class and options plugin decoration #3485

Merged
merged 2 commits into from
Mar 2, 2019

Conversation

ppot
Copy link
Contributor

@ppot ppot commented Feb 17, 2019

The current implementation make the session creation happen before the instance of the window. There for, if the plugin want to bind a session to a window. The new decorateSessionClass and decorateSessionOptions will result on the session not being accessible to the window's instance of the plugin. And therefor, not being able to bind it to an UID.

This PR include more extensibility by allowing the developer to either access onWindowClass the window's uid, or decorate it using decorateWindowClass.

This enable the possibility to give window's profile ID as unique name

exports.decorateWindowClass = defaults => {
  defaults = {uid: 'profileId_dev'};
  return defaults;
}

or acces the default UID created:

{ uid: 'b545deb5-c1e4-4ecd-af3b-e722126f1d40' }

Target: ppot/hyper-automator#4

@ppot ppot mentioned this pull request Feb 17, 2019
@ppot
Copy link
Contributor Author

ppot commented Feb 20, 2019

@juancampa Review ;)

@ppot ppot changed the title Add Window class and optios plugin decoration Add Window class and options plugin decoration Feb 22, 2019
@juancampa
Copy link
Contributor

Can we document this on https://github.com/zeit/hyper-site? @ppot at least open an issue with a short description 🙌

@ppot
Copy link
Contributor Author

ppot commented Feb 26, 2019

ya, will do tomorrow @juancampa ;)

Copy link
Contributor

@juancampa juancampa left a comment

Choose a reason for hiding this comment

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

LGTM once we've added some documentation

@ppot
Copy link
Contributor Author

ppot commented Mar 2, 2019

PR made on the hyper-website ;)

@ppot ppot merged commit 2d399ba into vercel:canary Mar 2, 2019
@ppot ppot deleted the f/window/class branch March 2, 2019 22:59
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.

2 participants