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

Design Explorations: Installing a block #7

Closed
melchoyce opened this issue May 20, 2019 · 8 comments
Closed

Design Explorations: Installing a block #7

melchoyce opened this issue May 20, 2019 · 8 comments

Comments

@melchoyce
Copy link
Collaborator

@melchoyce melchoyce commented May 20, 2019

What should the process of installing a block look like?

@karmatosed karmatosed mentioned this issue May 20, 2019
5 of 5 tasks complete
@melchoyce
Copy link
Collaborator Author

@melchoyce melchoyce commented May 28, 2019

I have three ideas here:

  1. "Shiny Updates"-style installation in-place. Likely whatever preview UI surrounds the block will fade, along with the "Installed" message, after a couple seconds. We could also show a notice here once installation is complete.
  2. Open a dialogue and show the "traditional" installation process. I included this because I wanted to cover it, but I think it's 💩
  3. Install the block in an external screen, opened in a new tab. This would take place in whatever WordPress block library management screen we end up with.

Installing

Questions:

  • Any reason not to use the Shiny Updates framework here?
  • Should you be able to install a block without previewing it first?
  • Should you be able to uninstall a block from the editor? (I'm leaning to no, but you could deactivate it from the block management dialogue in the short term.)

There's a couple other technical questions pertaining to installation that I might ask in #8, where I plan on including some ideas for if you can't install a block, or if the installation fails.

@melchoyce
Copy link
Collaborator Author

@melchoyce melchoyce commented May 30, 2019

@alexislloyd and @jameskoster had a good idea — what if we hid the installation process, and just proceeded as if the block was already installed? Then, on update/publish, we install the block behind-the-scenes?

@kjellr
Copy link

@kjellr kjellr commented May 30, 2019

How would that effect the block preview then? Would the block preview still have an installation button on it? Or would it basically function as if it were installed?

@melchoyce
Copy link
Collaborator Author

@melchoyce melchoyce commented May 30, 2019

It would function as if it were installed. Need to figure out if this is technically feasible (pinging @tellyworth)

@mapk
Copy link

@mapk mapk commented Jun 4, 2019

what if we hid the installation process, and just proceeded as if the block was already installed?

I really like this route. Although I think it's important to still indicate that this block isn't quite yet installed. Maybe some messaging in the Inserter? My thinking is that if the user is editing a draft and decides to only save it and then moves to another page/post and tries to add this block there, they may not see it in their Inserter because it's not officially installed. This could cause confusion.

Another place we can display messaging is in the pre-publish slideout sheet. Something like, "These blocks will be installed upon publishing this post. (and list them all out there too).

@tellyworth
Copy link
Collaborator

@tellyworth tellyworth commented Jun 5, 2019

what if we hid the installation process, and just proceeded as if the block was already installed? Then, on update/publish, we install the block behind-the-scenes?

There's some ambiguity here, but basically I think we should definitely aim for something like this. We're exploring some ideas where it looks like we might be able to essentially register and load a JS block within an isolated iframe, so as to safely(?) run it from source provided by w.org rather than the local site. Or in other words, insert a block that hasn't yet been installed.

There's still technical work to do in order to determine that it's safe and works, and things like the sidebar panel will complicate matters, but in general it looks promising for the idea that we could insert a live, mostly working "preview" block prior to install.

@melchoyce
Copy link
Collaborator Author

@melchoyce melchoyce commented Jun 5, 2019

Another place we can display messaging is in the pre-publish slideout sheet. Something like, "These blocks will be installed upon publishing this post. (and list them all out there too).

Love this 👍

@sarahmonster
Copy link
Member

@sarahmonster sarahmonster commented Jun 7, 2019

It sounds as though this approach is going to be highly reliant on the technical constraints and implementation.

Would a previewed block look and behave the same as an installed block? How likely is a block install to fail? How long would a block take to install? How difficult is it to then uninstall a block?

An alternative option could be for users to just "add" the block to their page (thereby installing it, but we could use the term "add" if we're concerned they might be trigger-shy), and then reveal an option to immediately undo if it's not what they're looking for. It would be effectively the same mechanism as "previewing" a block, but it would ensure a 1:1 parity between the preview and live functionality, and if a block install failed, it wouldn't complicate the publishing process, which is already one that inspires some user uncertainty.

@melchoyce melchoyce closed this Jun 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.