-
Notifications
You must be signed in to change notification settings - Fork 28
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
Revert toolbar is not locked to the bottom of the screen when rendered inside a GridField detail form #22
Comments
I've looked through the logs for both Elemental and Versioned-Admin and this is not a regression as previously thought. A show/hide work around for the entwine toolbar is the only immediate solution, while locking the react component to the base of the inner panel. This would rely on react based components triggering entwine type events, which may cause some difficulty. |
Looking into this it is caused by the manner in which the history interface is rendered into a normal (legacy style) content editing tab. I feel that proceeding to work around breaking out of the tab contextually would be adding quite a load of technical debt, as it requires the client app to contextually know about and deal with:
Proposal: Downsides: How do people feel about this? |
In the context where HistoryViewerField is added to a FieldList in an automatically scaffolded CMS form, the problem is that the
Alternatively we could implement the same thing with entwine Javascript hacks, commenting that they're there until the CMS is React driven. This is basically a CSS fix, so let's try not to over complicate it too much if we can avoid it =) |
This is a point in kind - the history tab currently doesn't load with AJAX (in relation to the other fields/tabs at least), all the fields are part of the edit form (which I think is the wrong place for history - but that's by the by), and are all loaded at once via the same request. This is that there are no separate endpoints to load specific tabs, to create one that is would essentially give us control over the entire form and we could return whatever we like. Granted there is the graphql endpoint that feeds in to populate the data of the HistoryViewerField, but that's about returning the data to populate it, rather than the initialisation of the field. My major point here is that I think fiddling with workaround hacks in either CSS or Entwine is ultimately wasted effort and would be time consuming in a factor above what should be necessary. |
Sorry but I disagree. It's a necessary evil that we need to put up with until the CMS is React driven. Yeah you're right re the XHR part, skip that:
When History is navigated away from (any CMS tab apart from Of course you'll want to implement this in a way that doesn't only apply to elemental, so add some new classes to identify it as being rendered in a GridField detail form. |
Work around PR #27 |
Thanks for being patient on this @NightJar, all merged |
CWP 2.1.0-rc1 with versioned-admin 1.0.x-dev and elemental 3.0.x-dev
Ideally the GridField actions are not shown when the History tab is opened (I think we've used a jQuery hide/show hack to this before) and the revert toolbar should be locked to the bottom of the screen.
This is visible when looking at a content block's history underneath a page.
Should look more like this (page level view):
The text was updated successfully, but these errors were encountered: