Closed GuySartorelli closed 3 months ago
Note to self: FOUT is "Flash Of Unstyled Text" (or in this case just flash of badness)
A couple of potential ideas for CMS 6 which approach the problem by just not allowing inline publishing:
1's easier and 2's a stretch though if we got scrolling working it would standardise how we 'inline edit' DataObject's and we could do away with a bunch of elemental code thus reducing the maintenance surface
Given that we've received pretty clear indications that allowing publication of individual blocks is not ideal and that we have a card for CMS 6 to remove this action, I'm inclined to agree that fixing this specific bug is not a great use of time.
I think it's worth noting that it's not only LinkField that is affected by this. The UploadField has the same problem. Any relational field you might want to put in an Elemental block will have the same problem.
On the FOUT point, there's a pretty straight forward fix to this problem: don't nuke the current form state right away when the form builder gets invalidated ... instead wait until you get your form schema back. That should provide a nice smooth UI transition between the two state.
I took one look at trying that and while it is conceptually a simple idea, it is not simple to implement. I'm going to say this just isn't worth our time right now.
Requires https://github.com/silverstripe/silverstripe-admin/pull/1771 to actually fix the bug - but this PR is safe on its own as a patch as seen by CI going green. If the prop isn't used on the other end (i.e. if someone only updates elemental and not admin) then the bug will still be there, but it won't cause any new problems.
The form will be reloaded when the element is saved/published/unpublished, etc - but only if its version or versioned-state is changing.
Issue