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
Replace mentions of 'whitelist' with 'allowlist' #1209
Conversation
Co-authored-by: Fran Moreno <franmomu@gmail.com>
assets/src/js/composer.js
Outdated
@@ -784,15 +784,15 @@ | |||
revert: true, | |||
connectToSortable: '.page-composer__container__children', | |||
accept: function (source) { | |||
var blockWhitelist = $(this).attr('data-block-whitelist'); | |||
if (blockWhitelist === '') { | |||
var blockAllowlist = $(this).attr('data-block-allowlist'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Technically speaking, this is a BC break.
I think we could risk this, unless you leave an upgrade note.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm new to this, what is the best way to leave an upgrade note?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a UPGRADE.md file, you could add an entry to this file to explain the change.
Another solution would be to select
´´´
This.data(whitelist) || this.data(allowlist)
´´´
With a next major to remove the whitelist part
(Im on phone, the code is wrong but the idea is here)
@@ -54,6 +54,8 @@ file that was distributed with this source code. | |||
{% if container.block is defined and container.block %} | |||
<a class="page-composer__page-preview__container block-preview-{{ container.block.id }}" | |||
data-block-id="{{ container.block.id }}" | |||
data-block-allowlist="{{ container.area.blocks|join(',') }}" | |||
{# NEXT_MAJOR: Remove the following line #} | |||
data-block-whitelist="{{ container.area.blocks|join(',') }}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will not solve the problem when someone is overriding this template.
Thanks @jlt10 |
Happy to help! @VincentLanglet do you mind adding the label "hacktoberfest-accepted" to this PR? |
Replace mentions of 'whitelist' with 'allowlist'
This repo uses the term whitelist instead of allowlist. This PR replaces every instance of "whitelist" in the code with "allowlist".
I am targeting this branch, because this is a backward compatible bug fix.
Closes #1174.
Changelog