-
Notifications
You must be signed in to change notification settings - Fork 208
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) O3-2258: Extension system support for feature flags #733
Conversation
* @returns A list of extensions that should be rendered | ||
*/ | ||
export function getConnectedExtensions( | ||
assignedExtensions: Array<AssignedExtension>, | ||
online: boolean | null = null | ||
online: boolean | null = null, | ||
enabledFeatureFlags: Array<string> | null = 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.
I wasn't sure whether the featureFlag check should happen in the step where we determine assigned extensions or connected extensions. But if I had done it in the assigned extensions phase, I'd have needed to create a subscription on the feature flags store which updated the extension output store. I opted for the less complex option, which unfortunately creates a bit of ambiguity around the meaning of the word "connected."
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.
At some point, we should probably look into refactoring these anyways (I've never been a big fan of having hooks explicitly named after "connection status" rather than, say, some sort of lifecycle phase).
Size Change: +2.55 kB (0%) Total Size: 2.27 MB
ℹ️ View Unchanged
|
Build failing and I can't repro locally. Good luck to me. |
This is ready for review @ibacher @denniskigen |
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.
LGTM. Thanks @brandones!
* @returns A list of extensions that should be rendered | ||
*/ | ||
export function getConnectedExtensions( | ||
assignedExtensions: Array<AssignedExtension>, | ||
online: boolean | null = null | ||
online: boolean | null = null, | ||
enabledFeatureFlags: Array<string> | null = 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.
At some point, we should probably look into refactoring these anyways (I've never been a big fan of having hooks explicitly named after "connection status" rather than, say, some sort of lifecycle phase).
Requirements
For changes to apps
If applicable
Summary
This makes it so you can add
featureFlag: "xyz"
to an extension registration in a routes file, and then that extension will be togglable using the feature flag.Related Issue
https://issues.openmrs.org/browse/O3-2258