-
Notifications
You must be signed in to change notification settings - Fork 115
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 a block when clicking a button in the "Add Block" popover #340
Comments
@clarkepaul For accessibility do you think we should add an A/C to make the newly added block the next thing that you tab to? |
Tough one, you might want to be adding multiple blocks (one after the other). I'm thinking to remain within the popover, after selecting a new block. Happy to hear what others think. Agree it should be an AC though. |
Three options as I see it:
I took at look at a few examples from others and they didn't really consider this, although clicking through the experience feels quite intuitive if you go to the new block as you mentioned @ScopeyNZ (opt. 3). |
This was my initial thought. To be honest I didn't consider the idea of even leaving the popover open after clicking to add a block. |
@raissanorth has done a "part 1" PR at #404. There's still a something that needs to be addressed: Clicking "Add block" in the designs has it just adding the block ready for in-line editing (with some fancy animations)
|
Sounds good to me. A custom mutation which takes in the block type makes sense to me. We can either push an optimistic update to the Apollo cache with the new block or refetch the blocks again in order to re-render the new one |
@ScopeyNZ For complex blocks like Forms, I think the user can add the block to the page first, then they need to click on the block to navigate away to edit it. |
Adding a file/banner block that's been created via the GridFeildDetailForm that's empty currently wont be able to be expanded. This could come up as part of this ticket. silverstripe/silverstripe-elemental-bannerblock#11 |
Also, please attempt to reproduce #312 after resolving this issue - it's possible this work could unintentionally resolve it. |
Done, animations are not a thing however. |
#338 implements an "Add Block" popover. When the various block types shown in this popover are clicked, a block needs to be added to the relevant elemental area.
A/Cs
Animations as specified by the designs are implementedThe text was updated successfully, but these errors were encountered: