-
Notifications
You must be signed in to change notification settings - Fork 116
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 FormBuilderLoader
in-line on blocks
#327
Comments
Keeping expand functionality separate in: silverstripe/silverstripe-elemental-blocks#43 |
Ah yes. I was looking for that. It's on a different repo which could explain why I wasn't able to find it. |
Additional design reference (Style guide) Complete blocks style guide |
The Behat tests will need to have a scenario added that checks if the element is editable. This has been removed in #353, as at that point in time only a placeholder was rendered. |
I’m adding a class when the element is not editable at the moment as part of another ticket. You think that’ll be ok? I’ll update the behat test to cover the dropdown menu being there or not. Maybe will add userforms to the tests as a concrete element which doesn’t allow it |
Required to resolve this issue:
|
I've just given it a test run - some comments:
Otherwise it's looking great and behaving exactly as I'd expected it should, e.g. the focus on each element is affecting the drop shadow, the form is able to be expanded and collapsed without reloading the form, tabs work individually and the TinyMCE implementation seems to be working without bleeding into separate instances on the same page. |
Yes there is some minor issue with TinyMCE. Simply clicking the area under the label will trigger the render as well (weirdly, the same is not true if one clicks where TinyMCE should be). It's a rather bizarre. I really don't know how to get around this without spending a whole lot of time porting the entire thing (i.e. our plugins) to react - as per silverstripe/silverstripe-admin#623 To be clear: this issue does not happen when using the TinyMCE thin wrapper react component. |
To be fair, implementing TinyMCE in React wasn't part of the scope of this ticket. I think what you've done is more than enough for now |
OK, I figured out what triggered the initial render - it must be an Entwine event. Luckily I was able to track down a way to manually trigger entwine into updating, and have updated the admin PR with such 💥 |
Thanks @ScopeyNZ @robbieaverill and @raissanorth for helping me get this through! |
Nice job! |
The designs show a collapsible section where a form will appear when expanded:
https://projects.invisionapp.com/share/ZRL4T2HQAGB#/screens/301923214
Additionally a custom React form component will have to be used as we can't use form tags - we're rendering within the top-level page form
A/Cs:
Implement a collapsible section per the designsFormBuilderLoader
using the schema endpoint (implemented by Add a form schema endpoint for elemental to return blocks #326)Expanding and collapsing the block is keyboard accessible.SchemaComponent
on a form) to remove the use of a<form>
tagSplit from #295
Expanding functionality has been tasked out silverstripe/silverstripe-elemental-blocks#43
Pull requests
The text was updated successfully, but these errors were encountered: