-
-
Notifications
You must be signed in to change notification settings - Fork 9.2k
Chore: Refactor CM list-view review-workflow columns to use useEnterprise #17047
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
Conversation
|
Size Change: -474 B (0%) Total Size: 1.52 MB
ℹ️ View Unchanged
|
| Similar to react-query this boolean flag allows disabling the EE import, e.g. when more than one condition needs to be applied. If `enabled` | ||
| is set to false, the first argument (CE_DATA) will be returned. |
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.
would a good example of this be where the EE addition is unique to a feature being enabled as opposed to EE in general?
2271a85 to
19d827b
Compare
8170af1 to
009f770
Compare
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.
Just one question otherwise looks great!
| if (!ReviewWorkflowsStage) { | ||
| return null; | ||
| } | ||
|
|
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 won't block rednering on content-types that don't have review workflows enabled 🤔? Maybe also check hasReviewWorkflows?
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 CE the component will be defined (so this condition won't match), but in EE ReviewWorkflowsStage can be null until the component has been loaded. We could handle this using a loading state, but in this instance I think it is better not to.
packages/core/admin/admin/src/content-manager/pages/ListView/components/TableRows/index.js
Show resolved
Hide resolved
packages/core/admin/admin/src/content-manager/pages/ListView/components/TableRows/index.js
Show resolved
Hide resolved
|
This pull request has been mentioned on Strapi Community Forum. There might be relevant details there: |
What does it do?
useEnterprisehook with a boolean flagenableduseEnterpriseWhy is it needed?
ee_else_ceimport downwindow.strapi.isEEinvolved to avoid over-fetchingHow to test it?
Use Strapi in EE mode and navigate to a content-type in the CM list-view that has review-workflows enabled.