-
Notifications
You must be signed in to change notification settings - Fork 179
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
Code Quality: Remove hotlinking feature flag code #12021
Conversation
packages/wp-story-editor/src/components/documentPane/publish/publish.js
Outdated
Show resolved
Hide resolved
packages/story-editor/src/components/publishModal/content/storyPreview.js
Outdated
Show resolved
Hide resolved
{(hasUploadMediaAction || enablePosterHotlinking) && ( | ||
{hasUploadMediaAction && ( |
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.
Same here, with poster hotlinking always allowed we can remove this entire condition here, no?
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.
Not sure if you discussed this somewhere else that the comment was marked resolved, but since now enablePosterHotlinking
is always true
, wouldn't we always display this and can remove hasUploadMediaAction
check as well?
Plugin builds for 1c8b40d are ready 🛎️!
|
Looks like some tests are failing now. Haven't checked closely, perhaps they need updating. |
Looking into it. |
Erroring on the
|
{(hasUploadMediaAction || enablePosterHotlinking) && ( | ||
{hasUploadMediaAction && ( |
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.
Not sure if you discussed this somewhere else that the comment was marked resolved, but since now enablePosterHotlinking
is always true
, wouldn't we always display this and can remove hasUploadMediaAction
check as well?
It was flagged for removal but removing seems to be causing other issues -- test failures + this error #12021 (comment) thinking there's something deeper into one of the child components around the |
Hm, okay. I suppose we can leave as is then. Just by reading the code I assumed that the whole component could always displayed but |
I'll take another look --- see if I can spot anything |
Otherwise contributors without upload permissions cannot update the story poster via hotlinking. Updates tests.
@swissspidy any idea why removing that causes issues with the MediaInput (at least in the tests). detail: Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.
Check the render method of `ForwardRef(MediaInput)`. |
That test renders the pre-publish modal without defining web-stories-wp/packages/story-editor/src/components/publishModal/test/storyPreview.js Lines 60 to 68 in a6b3cb6
Now that we removed this condition, the |
Context
This feature has been enabled by default in v1.23.0.
Summary
Removes feature flags for:
videoPosterHotlinking
linkIconHotlinking
posterHotlinking
Relevant Technical Choices
To-do
User-facing changes
Testing Instructions
This PR can be tested by following these steps:
Reviews
Does this PR have a security-related impact?
No
Does this PR change what data or activity we track or use?
No
Does this PR have a legal-related impact?
No
Checklist
Type: XYZ
label to the PRFixes #11997