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

Error notices in the editor can be "unnoticed" if you've scrolled the editor #109

Closed
1 of 4 tasks
eri-trabiccolo opened this issue Jun 10, 2021 · 5 comments
Closed
1 of 4 tasks
Assignees
Labels
Severity: Normal Type: Conflict Plugin and theme conflicts

Comments

@eri-trabiccolo
Copy link
Contributor

Reproduction Steps

  • edit form
  • scroll the editor a little bit
  • generate a field validation error, e.g.:
    create a field with name "ab"
    create another field and try to set its name to "ab"

Expected Behavior

  • I'd expect to see the error notice informing me about the fact I cannot use the same name twice

Actual Behavior

  • The last character of the name attribute gets stripped to fix the name duplication, an error notice is printed at the top of the editor but I can't see it unless I scroll back to the top

Error Messages / Logs

n/a

System and Environment Information

WordPress 5.8

This issue has be recreated:

  • Locally
  • On a staging site
  • On a production website
  • With only LifterLMS and a default theme

Browser, Device, and Operating System Information

n/a

@thomasplevy thomasplevy added this to To do in LifterLMS v5.0.0 via automation Jun 10, 2021
@thomasplevy
Copy link
Contributor

I think this is a Gutenberg/WP 5.8 "regression" although it's "blessed" as an acceptable casualty so we may have to adjust our validation message strategy given the change, I've raised an issue about this and I'm not going to make any changes until we have an answer there: WordPress/gutenberg#32593

@thomasplevy
Copy link
Contributor

Hows this look at @eri-trabiccolo
Peek 2021-06-10 15-24

@eri-trabiccolo
Copy link
Contributor Author

@thomasplevy that's the way

@eri-trabiccolo eri-trabiccolo added the Status: Has PR This issue has an open pull request label Jun 14, 2021
@eri-trabiccolo eri-trabiccolo moved this from To do to In progress in LifterLMS v5.0.0 Jun 14, 2021
@thomasplevy
Copy link
Contributor

The core issue should be resolve in GB at some point (see WordPress/gutenberg#32488) and 2082ccc fixes the inciting incident warranting this bug report, however we are still using notices in this way to handle the require blocks for each form type. I don't see a good way to convert them to inline warnings like this so I'm going to leave this open for the time being as a reference for the future

@thomasplevy thomasplevy added Type: Conflict Plugin and theme conflicts and removed Status: Has PR This issue has an open pull request Type: Bug Bugs and errors labels Jun 14, 2021
@thomasplevy thomasplevy removed this from In progress in LifterLMS v5.0.0 Jun 14, 2021
@eri-trabiccolo
Copy link
Contributor Author

eri-trabiccolo commented Jun 14, 2021

Mmm right, ai forgot about the required blocks...
Although the difference with that would be that it pops only on save... I wonder if there's a way to hook there and, in case, scroll the editor pane to the top...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Severity: Normal Type: Conflict Plugin and theme conflicts
Projects
None yet
Development

No branches or pull requests

2 participants