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

Optinally remove playroom preview animation #159

Open
maraisr opened this issue May 22, 2020 · 7 comments
Open

Optinally remove playroom preview animation #159

maraisr opened this issue May 22, 2020 · 7 comments

Comments

@maraisr
Copy link
Contributor

maraisr commented May 22, 2020

I'm currently developing a component that I'm needing to emulate inside of the iOS simulator. To combat some iOS specific issues. Anyway - so Im using the preview mode, but my HMR is causing it to refresh from the start, and the playroom animation kicks on for about 1-3seconds, which for style changes is quite annoying.

I aim to introduce either a config, or simply url param to disable this fulls screen animation from running, and to just render my component at whatever internal it has to. Ie dont wait for it to finish before your animation finishes.

@possibilities
Copy link

Maybe like the frame component it could be configurable with the current animation as default? Then people could set it to () => null to disable it? Happy to contribute this if helpful.

@possibilities
Copy link

Actually it's hard to tell if it's added for a functional reason from looking at the code? Maybe be a better solution depending on that.

@maraisr
Copy link
Contributor Author

maraisr commented Jun 3, 2020

yeah I mean at this stage just have to wait for a response from @mattcompiles @michaeltaranto @markdalgleish for an answer, or guidance.

@michaeltaranto
Copy link
Contributor

We actually started off setting this up as a PreviewComponent that you could override with a passthrough if you liked. The reason we changed the approach was due to security concerns—with prototypes essentially being used for phishing attacks.

Preview mode is not really intended for the fast iteration on the prototype itself, however maybe there is value in only showing the splash screen in the built artefact rather the dev server?

@possibilities
Copy link

One idea I had would be to remove the preview altogether but pass a prop into the frame component e.g. isPreviewing and if desired folks could inject whatever loading screen, etc they desire in their frame?

@maraisr
Copy link
Contributor Author

maraisr commented Jun 3, 2020

however maybe there is value in only showing the splash screen in the built artefact rather the dev server?

@michaeltaranto I think that approach works really nicely. This way development time is quick, and a developer knows that it wont be 100% perfect.

Is this something I can help bring to playroom? @markdalgleish has expressed the plate, and how its always full for you guys.

@pladaria
Copy link

Actually it's hard to tell if it's added for a functional reason from looking at the code? Maybe be a better solution depending on that.

I'd say it is just cosmetic. We have a playroom demo for an overlay component that gets rendered over the splash screen...

+1 to be able to optionally skip it

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

No branches or pull requests

5 participants