-
Notifications
You must be signed in to change notification settings - Fork 578
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
Allow hiding the preview link #1798
Comments
We can make this easier and better, but there is another way without disabling revisions: returning an empty array of revisions to the UI, using |
It's not only about storing revisions, but being able to look at who and when is updating these records, while hiding the preview link. If we remove revisions but keep them on database it's not really useful on the CMS, unless we create something else for users to see who is changing things. To not overcomplicate things, the revision links could stay, showing only a modal asking if the user wants to restore to that version. But ideally it should load all the inputs on the CMS, make them read-only, and change the update button to "RESTORE". |
I was only providing a way to achieve what you were looking for because what you are describing requires internal changes to the UX, so it is not as simple as giving you the ability to hide the preview link was what I was trying to say. We can certainly find a solution, but it will require more time. |
What you describe about the form when restoring a revision is also pretty much the existing behavior, it loads the form with a message indicating to the user that they are currently restoring, the button label changes too, but it currently goes through a preview where the restore button is exposed to get into the form in restore mode. |
I think there is some improvement that can be done on revisions, maybe instead of the preview we could show the fields directly in the form and highlight the ones which have been modified somehow, it does need to make it clearer what's been modified or not We could even have a revision on a field by field basis, a bit like languages, so you have a revision icon next to a field which shows the edits that happened to that field when you click on it, and shows the old value of only that field when selecting the revision |
I agree a "diff" sort of view would be great as an option, but we don't want to lose our ability to visually compare the frontend when there is a corresponding route to preview for the edited record. Even when the edited record doesn't correspond to a route, it can usually be rendered using the frontend components in which the data would be used. There is definitely a use case for non-previewable revisions, and I think our data structure could easily be rendered as a helpful diff in that case. I also researched in the past how we could apply some diff styling to the rendered frontend, to better indicate where the changes are visually, but the experience could be jarring depending on the frontend design. |
Summary
Sometime we want to have revisions, to see who's changing what, but not previews, because there's no frontend page related to that module.
Describe the solution you'd like
I believe the only way to hide the preview link is to remove HasRevisions from the model. Would be better if we could hide them by configuration, maybe on
$indexOptions
?The text was updated successfully, but these errors were encountered: