-
Notifications
You must be signed in to change notification settings - Fork 4k
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
feat: Enable library blocks using settings [FC-0076] #36292
base: master
Are you sure you want to change the base?
feat: Enable library blocks using settings [FC-0076] #36292
Conversation
Thanks for the pull request, @ChrisChV! This repository is currently maintained by Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review. 🔘 Get product approvalIf you haven't already, check this list to see if your contribution needs to go through the product review process.
🔘 Provide contextTo help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:
🔘 Get a green buildIf one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green. Where can I find more information?If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources: When can I expect my changes to be merged?Our goal is to get community contributions seen and reviewed as efficiently as possible. However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:
💡 As a result it may take up to several weeks or months to complete a review and merge your PR. |
9c496a0
to
c69dfae
Compare
…lowed_block_types
c69dfae
to
1a284c8
Compare
cms/envs/production.py
Outdated
# .. setting_name: LIBRARY_ENABLED_BLOCKS | ||
# .. setting_default: ['problem', 'video', 'html', 'drag-and-drop-v2'] | ||
# .. setting_description: List of block types that are enabled to be created/used | ||
# .. in libraries. Both basic blocks and advanced blocks can be included. | ||
# .. In the future, advanced block configuration will be handled individually per library. | ||
# .. eg ['problem', 'video', 'drag-and-drop-v2] |
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.
# .. setting_name: LIBRARY_ENABLED_BLOCKS | |
# .. setting_default: ['problem', 'video', 'html', 'drag-and-drop-v2'] | |
# .. setting_description: List of block types that are enabled to be created/used | |
# .. in libraries. Both basic blocks and advanced blocks can be included. | |
# .. In the future, advanced block configuration will be handled individually per library. | |
# .. eg ['problem', 'video', 'drag-and-drop-v2] |
Settings only need to be annotated once. This is already annotated in common.py.
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.
Deleted here 0574923
cms/envs/production.py
Outdated
LIBRARY_ENABLED_BLOCKS = ENV_TOKENS.get( | ||
'LIBRARY_ENABLED_BLOCKS', | ||
['problem', 'video', 'html', 'drag-and-drop-v2', 'google-calendar', 'google-document'], | ||
) |
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.
LIBRARY_ENABLED_BLOCKS = ENV_TOKENS.get( | |
'LIBRARY_ENABLED_BLOCKS', | |
['problem', 'video', 'html', 'drag-and-drop-v2', 'google-calendar', 'google-document'], | |
) |
Why does production.py need a default beyond the default that common.py already declares? If google-calendar and google-document are reasonable items to have in the defaults list, then pls include them in the common.py list as well.
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.
Sorry, that was a mistake, we should not add google-document
or google-calendar
yet, it was deleted here: 0574923
cms/envs/common.py
Outdated
# .. setting_default: ['problem', 'video', 'html', 'drag-and-drop-v2'] | ||
# .. setting_description: List of block types that are enabled to be created/used | ||
# .. in libraries. Both basic blocks and advanced blocks can be included. | ||
# .. In the future, advanced block configuration will be handled individually per library. |
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.
# .. In the future, advanced block configuration will be handled individually per library. | |
# .. In the future, this list will be configurable for each individual library. |
By "advanced block configuration", we are talking specifically about this list, right? If so, let's just be explicit.
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 updated the comment of this setting and I added the TODO comment in the api. I think it's better this way
cms/envs/common.py
Outdated
# .. setting_description: List of block types that are enabled to be created/used | ||
# .. in libraries. Both basic blocks and advanced blocks can be included. | ||
# .. In the future, advanced block configuration will be handled individually per library. | ||
# .. eg ['problem', 'video', 'drag-and-drop-v2] |
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.
# .. eg ['problem', 'video', 'drag-and-drop-v2] |
The default is a good enough example
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.
Description
LIBRARY_ENABLED_BLOCKS
added to verify enabled blocks inget_allowed_block_types
Supporting information
Testing instructions
Deadline
No Rush
Other information
N/A