You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some of our corrections could be unsafe. Examples:
a script needs to be parser blocking, so defer or async breaks the site
the output of a | img_tag doesn't have its width and height CSS attributes specified. Switching to image_tag would break the site.
etc.
IMO if you run theme-check -a, the result of that operation should be safe and you should be confident that your site still works once applied. Same for if you do fix all auto-correctable problems from the editor.
Because of this, I'm very hesitant when it comes to corrections that would be considered unsafe (e.g. #434).
According to this part of the docs, it looks like we might be able to add some sort of confirmation popups for corrections such as these.
I'd be more comfortable shipping autocorrections that can be flagged "unsafe." So that we require confirmation from the user to apply them. Would open the door to more correction opportunities.
Maybe all we need is some kind of flag to add when we do add_offense ? Something like unsafe: true. Then we'd be able to do this:
If unsafe and editor supports change annotations, make a change annotation that requires confirmation. Otherwise don't offer the unsafe correction at all.
If unsafe, do not correct with theme-check -a
The text was updated successfully, but these errors were encountered:
Some of our corrections could be unsafe. Examples:
| img_tag
doesn't have its width and height CSS attributes specified. Switching toimage_tag
would break the site.IMO if you run theme-check -a, the result of that operation should be safe and you should be confident that your site still works once applied. Same for if you do
fix all auto-correctable problems
from the editor.Because of this, I'm very hesitant when it comes to corrections that would be considered unsafe (e.g. #434).
According to this part of the docs, it looks like we might be able to add some sort of confirmation popups for corrections such as these.
I'd be more comfortable shipping autocorrections that can be flagged "unsafe." So that we require confirmation from the user to apply them. Would open the door to more correction opportunities.
Maybe all we need is some kind of flag to add when we do add_offense ? Something like unsafe: true. Then we'd be able to do this:
theme-check -a
The text was updated successfully, but these errors were encountered: