Closed melchoyce closed 5 years ago
I have three ideas here:
Questions:
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.
@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?
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?
It would function as if it were installed. Need to figure out if this is technically feasible (pinging @tellyworth)
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).
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.
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 👍
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.
What should the process of installing a block look like?