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

Default to automatic sanitization and tree shaking #1402

Merged

Conversation

Projects
None yet
3 participants
@westonruter
Copy link
Member

westonruter commented Sep 5, 2018

It seems to me that having the vast majority of sites will need tree shaking enabled by default, since themes and plugins will be surely enqueueing more than 50KB of CSS. Additionally, almost every site will have plugins that are enqueueing JavaScript onto the page.

It seems to me that we should default to the plugin getting some positive results upon switching to the paired mode rather than automatically redirecting to the non-AMP version with errors. The user will find out about the errors as they go when they save posts. At the very least, this should reduce the pain for new users trying out the paired mode, which should provide a much better user experience compared with the classic paired mode. Since the classic paired mode automatically removes invalid markup, having the new paired mode also default to this mode seems reasonable, especially since there will be warnings that this is occurring. They can then turn off auto-sanitization via the checkbox if it's not the behavior they want. But it seems like it will be the most frequent default that users will want.

Additionally, with improvements to the #1288, the validation status can be determined ahead of time before even enabling the native/paired modes.

Related to #1384 which is go go a step further and default to the new paired mode for new activations.

@westonruter westonruter added this to the v1.0 milestone Sep 5, 2018

@hellofromtonya

This comment has been minimized.

Copy link
Contributor

hellofromtonya commented Sep 5, 2018

At the very least, this should reduce the pain for new users trying out the paired mode, which should provide a much better user experience compared with the classic paired mode.

The provide a much better user experience is key here. You're right that the vast majority of users will need tree shaking by default.

@westonruter westonruter requested a review from amedina Sep 6, 2018

@westonruter westonruter merged commit 89131b6 into develop Sep 6, 2018

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@westonruter westonruter deleted the update/default-auto-sanitization-and-tree-shaking branch Sep 6, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.