dotCMS / core

Headless/Hybrid Content Management System for Enterprises
http://dotcms.com
Other
866 stars 467 forks source link

[UI] Require confirmation when clicking Edit tab while Experiment is running #25645

Closed john-thomas-dotcms closed 1 year ago

john-thomas-dotcms commented 1 year ago

Parent

https://github.com/dotCMS/core/issues/22455

john-thomas-dotcms commented 1 year ago

Problem

Right now, a user can change the original page while an Experiment is running. But this essentially changes the page, which means that if the change is significant, it can invalidate the results collected to that point.

Solution

When an Experiment is running, and a user clicks the Edit tab in the page editor, we need to pop up a modal that requires them to confirm before they edit the page.

Message in the confirmation popup:

An Experiment is currently running on this Page.  If you Edit the Page, you may invalidate any results already collected.

Are you sure you want to continue?

Buttons the user can select:

Other Potential Solutions

The solution above was chosen because it's easy and safe to implement, and allows emergency edits, but requires the user to acknowledge that their edits my cause problems.

But there are several other ways we could solve this problem. While an Experiment is running, we could:

hmoreras commented 1 year ago

Modal prevention Scenarios when trying to edit a page

image

oidacra commented 1 year ago

IQA Passed: Confirm Dialog showed on a Page with a Running Experiment (On tab Edit).

Aug-09-2023 12-43-56

bryanboza commented 1 year ago

Ok we have a problem here...

We need to discuss this and find the way this fix work in both cases.

hmoreras commented 1 year ago

QA: Now the changes works with the SEO feature flag on DOT_FEATURE_FLAG_SEO_IMPROVEMENTS , PR: https://github.com/dotCMS/core/pull/25828

freddyucv commented 1 year ago

Pass Internal QA: Work as expeced with the SEO feature flag on DOT_FEATURE_FLAG_SEO_IMPROVEMENTS

bryanboza commented 1 year ago

We need some work here:

https://github.com/dotCMS/core/assets/2641437/e71bc540-3ad2-4144-a258-54fd39098bbb

oidacra commented 1 year ago

IQA Passed:

bryanboza commented 1 year ago

Fixed, tested on master // Docker // FF