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

Add explainer to warning notice when validation errors are displayed #5304

Closed
westonruter opened this issue Aug 31, 2020 · 26 comments · Fixed by #5929
Closed

Add explainer to warning notice when validation errors are displayed #5304

westonruter opened this issue Aug 31, 2020 · 26 comments · Fixed by #5929
Assignees
Labels
Developer Tools Groomed P1 Medium priority WS:UX Work stream for UX/Front-end
Milestone

Comments

@westonruter
Copy link
Member

westonruter commented Aug 31, 2020

Feature description

When Developer Tools are enabled, when a validation error occurs on the permalink for a post, a warning will be displayed in the editor:

image

Prior to 2.0, Developer Tools were not available for Reader mode. Since most sites are in Reader mode, many users are going to be seeing this warning notice for the first time. We need to explain to them why they are seeing this warning all of a sudden. They need to know that the validation errors were occurring before, but they just weren't being told about them.

I wrote a support topic about this to preempt support topics being opened, but we could do something even more preemptive inside of WordPress. We can link to the relevant documentation page on amp-wp.org. If one isn't yet created, we should do so.

Additionally, we may want to provide a link to turn off Developer Tools in the user profile. Something like, “Don't want to see these warnings? Turn off AMP Developer Tools in your user profile” (where the bolded text links to the checkbox).

This is closely related to #4668, where we can mention here the specific themes and plugins that are causing validation errors. If there are validation errors from the theme, the warning should probably advise switching to Reader mode. Validation errors from plugins could advise to evaluate whether the removed invalid markup is needed, whether the plugin should be suppressed (with a link to the Plugin Suppression section). There can be prompts to reach out to the respective support forums for the themes and plugins.

Also related to #3821, as this information should be displayed in the sidebar.


Do not alter or remove anything below. The following sections will be managed by moderators only.

Acceptance criteria

Implementation brief

QA testing instructions

Demo

Changelog entry

@westonruter westonruter added the WS:UX Work stream for UX/Front-end label Aug 31, 2020
@westonruter westonruter added this to the v2.0.1 milestone Aug 31, 2020
@amedina
Copy link
Member

amedina commented Sep 1, 2020

Related: add content to amp-wp.org with explainer, to be linked from a "Why I am seeing this" link.

@johnwatkins0
Copy link
Contributor

johnwatkins0 commented Sep 2, 2020

I saw this notice on a client project just yesterday and experienced a small amount of confusion and nervousness.

  1. Confusion: "There are 2 issues from AMP validation which need review. The issues are not directly due to content here." The where of this is confusing. We should clarify to something like, "This post has two AMP validation issues, but they come from outside the post content. To review these issues, [go here]. To turn off these notices, [go here]."
  2. Nervousness: Any time there is a link in a notice in the editor, I worried about what's going to happen when I click the link. I don't want the current tab to navigate to another page, potentially losing unsaved changes. The core UX around recovering autosaves is not great, so I avoid it in general. In other words, I think these links should have an icon indicating they open in a new tab.

Should we go forward with minor copy tweaks along these lines for 2.0.1 and save the broader updates for 2.1?

@amedina
Copy link
Member

amedina commented Sep 2, 2020 via email

@westonruter
Copy link
Member Author

We can open the link in a new window, however.

@westonruter
Copy link
Member Author

Please open a quick PR for opening the link on a new window. We'll include that in 2.0.1.

@johnwatkins0 johnwatkins0 assigned johnwatkins0 and unassigned jwold Sep 2, 2020
@amedina
Copy link
Member

amedina commented Sep 2, 2020 via email

@johnwatkins0
Copy link
Contributor

In #5319 we made the change for 2.0.2 to open the link in a new tab. Should this be set to a later milestone now?

@westonruter westonruter modified the milestones: v2.0.2, v2.1 Sep 9, 2020
@westonruter
Copy link
Member Author

You're right. Done.

@kmyram kmyram added P2 Low priority P1 Medium priority Groomed and removed P2 Low priority labels Sep 15, 2020
@jwold
Copy link
Collaborator

jwold commented Jan 6, 2021

Been playing with some concepts to address this, and leaning toward something like this:

Some kept and unreviewed state:

Screen Shot 2021-01-06 at 1 55 26 PM

@westonruter
Copy link
Member Author

@jwold I think we can just put the "Invalid Markup Kept" info inside of the "AMP Disabled" panel. So in general I think we can iterate on this element here:

image

This would be the “AMP Status” box and it would have 3 possible states which correspond to the 3 states in the icon:

Icon State
image AMP Enabled, with either no validation issues or all markup being removed and reviewed.
image AMP Enabled, but there are one or more instances of invalid markup that is unreviewed.
image AMP Disabled due to some invalid markup being kept on the page.

We can tailor the message for each state for non-technical end-users.

As for the "Show reviewed errors", I think it can be made less prominent. I know I raised a concern about a toggle appearing at the bottom of the list being problematic because of content shifting, but I think the reality is that this UI element makes better sense at the bottom since it should be giving minimal prominence. Clicking the link can cause the link to change to “Hide reviewed issues (x)”. This link would only be present if there any reviewed issues. If not, the link would be absent.

@jwold
Copy link
Collaborator

jwold commented Jan 12, 2021

@westonruter I believe this captures all the comments above, and will be worth discussing on our next call.

My Sketches - 2021-01-11 14 38 54

My next step is to take this to a prototype stage, but I'd love any feedback first on it. Thanks!

cc @amedina and @delawski

@westonruter
Copy link
Member Author

westonruter commented Jan 21, 2021

I believe this captures all the comments above, and will be worth discussing on our next call.

Let's include your feedback from #5741 (comment).

@jwold
Copy link
Collaborator

jwold commented Jan 28, 2021

Screen Shot 2021-01-28 at 12 18 31 PM

Screen Shot 2021-01-28 at 12 19 04 PM

Screen Shot 2021-01-28 at 12 19 26 PM

@westonruter, @amedina, @delawski the latest revision of the work is ready for review. We chatted about this in our call today, and I'd love feedback. Thanks!

@westonruter
Copy link
Member Author

@jwold sorry for the delay in reviewing these.

image

What again is the meaning behind the styling of the three errors listed here? The first one is kept but the last one is not, but they both have the orange border. I recall @schlessera having a good suggestion for the orange border, that it would only indicate the kept state so we wouldn't need the “kept” label necessarily. The “kept” label will be problematic because it will mash together with the error title, e.g. “Invalid inline script Kept”.

The four states, in order of frequency, are:

  1. Unreviewed and removed (the default state)
  2. Reviewed and removed (the normal resolution)
  3. Unreviewed and kept (only happens by default for CSS)
  4. Reviewed and kept (uncommon, as it causes AMP to be blocked for the page)

A final one in this context would be the partially-transparent error indicating the error was in a block that was removed, but that can be applied to any existing styling above.

I remember we had a discussion a couple weeks ago and deciding to diverge from how we've been trying to maintain the design language of unmoderated vs moderated comments, but now I forget. There's also the styling of suppressed plugins:

image

@delawski
Copy link
Collaborator

delawski commented Feb 23, 2021

@jwold @westonruter We may need to adjust the copy around the "Re-validate" message because of the way custom meta boxes are handled in the block editor. See #5741 (comment).

As discussed, we may want to drop the message about post content change and leave the button alone.

@jwold
Copy link
Collaborator

jwold commented Feb 23, 2021

Great feedback @delawski and @westonruter. A few things:

  1. What if we combine the re-validate button with the AMP status message? (see design)
  2. I was working on two things in parallel. What the design language should be for this update, and then what we'd want to for a future release. More in this direction: https://d.pr/i/KnngTd. However, I think we can pull parts of that in now.
  3. Not sure how we'd want to handle suppressed plugins. Any thoughts are welcome.

Screen%20Shot%20on%202021-02-23%20at%2016-23-46

@delawski
Copy link
Collaborator

  1. What if we combine the re-validate button with the AMP status message? (see design)

So if there are no custom meta boxes active, then the UI (the notifications area) would still look like this, correct?

Screen Shot 2021-01-28 at 12 18 31 PM

Then, for the just discovered case when there are custom meta boxes active, we would use the new UI as you proposed:

Screen%20Shot%20on%202021-02-23%20at%2016-23-46

I think it would work. Still, having an analogical UI but with different microcopy for both use cases would be better I guess.

  1. I was working on two things in parallel. What the design language should be for this update, and then what we'd want to for a future release. More in this direction: https://d.pr/i/KnngTd. However, I think we can pull parts of that in now.

In general – yes, but I'd also say that it depends. Doing too invasive updates to the UI can easily become a rabbit hole. At the same time, we're still targeting the 2.1 release. So I guess it depends on which parts of the UI have you been thinking of.

@jwold
Copy link
Collaborator

jwold commented Feb 24, 2021

@delawski good point. Let's separate the messages and keep them in different notifications. The wording will need to be massaged of course, thinking something like:

If no custom meta boxes:

Page content has changed. Re-validate.

If yes custom meta boxes:

Page content may have changed. Re-validate.

cc @westonruter

@westonruter
Copy link
Member Author

If yes custom meta boxes:

Page content may have changed. Re-validate.

How about just “Re-validate” in this case? Is anything else needed? Or “Made changes? Re-validate”.

@westonruter
Copy link
Member Author

@delawski @jwold Also, can this be designed in a way that content shifting is minimized? The loading spinner and validate button (as of #5741) both currently contribute to the UI shifting up and down, which is not ideal:

content-shifting-in-amp-sidebar.mov

@delawski
Copy link
Collaborator

Also, can this be designed in a way that content shifting is minimized?

I was thinking about this issue, too.

I spoke about the loading state with @jwold lately and he suggested a pretty nice approach:

Screen Shot on 2021-02-25 at 12-07-47

[For the loading state, think of a situation] where a notification still shows, so it's more clear what's happening, and everything else disappears as it needs to. Also might require shifting the notification up to the top so it doesn't jump around.

@jwold Please chime in as I think we're going in a really good direction with that.

@delawski
Copy link
Collaborator

Another issue I've noticed while working on #5741 is that we don't currently have any error handling.

If the REST endpoint responds with 4xx or 5xx, we're showing the loading spinner forever.

We should probably handle such errors with a proper message (sometimes a message is returned in the response – we could use it) and offer some support like a "Try again" button.

@jwold
Copy link
Collaborator

jwold commented Feb 28, 2021

What if we did something like this? I think it might avoid content shifting altogether.

Screen Shot 2021-02-28 at 8 19 18 AM

@westonruter
Copy link
Member Author

QA Passed

The scope of this issue evolved. The warning notice has been eliminated in favor of showing the error in the sidebar:

image

And in the Post sidebar:

image

And similarly in the pre-publish panel:

image

When Developer Tools are turned off, the AMP Validation sidebar is not present:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Developer Tools Groomed P1 Medium priority WS:UX Work stream for UX/Front-end
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants