Skip to content
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

[4.x]: Entry Edit Interface Shifts Unexpectedly When "Unsaved Changes" Alert is Displayed #11229

Closed
richhayler opened this issue May 15, 2022 · 6 comments

Comments

@richhayler
Copy link

What happened?

Description

When editing an entry and a change is detected Craft shows the alert, "Showing your unsaved changes." and a button to "discard" changes. While this notification is very helpful, when this appears it shifts the edit form down by the height of the alert container. This is not ideal if you choose to ignore the alert and continue editing as the alert can momentarily disrupt edit flow by moving the position of what is under the cursor unexpectedly.

screen-shift.mp4

Craft CMS version

4.0.2

PHP version

No response

Operating system and version

No response

Database type and version

No response

Image driver and version

No response

Installed plugins and versions

@brandonkelly
Copy link
Member

Tweaked this for the next release, so pointer events will be disabled from the time the notice begins to slide in, until 300 milliseconds after the animation completes.

@richhayler
Copy link
Author

richhayler commented May 19, 2022

Thank you for taking a look at this issue and making the change. However I feel the real issue here is the shifting entry form which disrupts the editing flow. It would be better if the edit form did not move and remained stationary.

As this alert will be displayed as a consequence of changing anything in the entry form (which would likely be the case every time someone clicks into the edit entry page), and the alert remains in place until changes are discarded or the entry re-saved - wouldn’t it be better to display this extra space above the edit form when visiting the page and slide the alert into that space without moving the form? A default message could be displayed (with some useful info) to start with e.g. last saved/edited by “editor” on “date/time”.

@rickmerkelbach
Copy link

I'm noticing some feedback from clients about this as well. The timing of the alert isn't such a big issue, but the actual shifting of the entire entry form has caused a few issues during editing (removing the wrong asset from a field or using the wrong field).

A default message with the last editor and modification date, like richhayler suggested, would actually be really helpful for our sites with multiple editors.

@brandonkelly
Copy link
Member

The UI shift is a feature not a bug – it helps draw attention to the fact that the notice was added.

I'm noticing some feedback from clients about this as well. The timing of the alert isn't such a big issue, but the actual shifting of the entire entry form has caused a few issues during editing (removing the wrong asset from a field or using the wrong field).

That won’t be an issue anymore after the next update thanks to the muted pointer events.

@brandonkelly
Copy link
Member

Craft 4.0.3 is out now with that muted pointer event tweak.

@brandonkelly
Copy link
Member

Changed my mind and got rid of the page jumping when possible, for the next release: #11586 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants