Remove email subject in “Help improve this page” and improve component performance #115
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Direct link to preview: https://deploy-preview-115--wai-website-theme.netlify.app/components/teasers/
Currently, an email subject is automatically populated when clicking on email links in “Help improve this page”. See for example the “Help improve this page” section in “Accessibility Fundamentals Overview”.
To help with spam processing, this pull request:
[include a relevant email Subject]
to the email body, to encourage users to manually add an email subjet.Resolves w3c/wai-website#941
I have applied additional improvements to the component:
Removed the line creating a
col
variable: deprecated since bbade4cUsed
default
filter to set a default value forfeedbackmail
, instead of if/else statements.Cached
t.html
andbox.html
includes. To make it work, I have explicitly passed the page language as argument. (See Jekyll Include Cache README)Introduced a
plainText
argument that can be passed to ant.html
include. When present,<span lang="en"></span>
is not added around the English text when a translation is missing. Currently, the HTML code was added to the email body...Example:
Test
I built the site before and after the edits: no unexpected changes.
Impact on Render Stats (using
--profile
flag)Before caching
t.html
andbox.html
includes:After caching
t.html
andbox.html
includes: