-
Notifications
You must be signed in to change notification settings - Fork 243
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
(fix) Restore generic patient widget #2139
base: main
Are you sure you want to change the base?
Conversation
Size Change: -1 B (0%) Total Size: 15.9 MB ℹ️ View Unchanged
|
Good catch, Ian. But I think we actually do want to provide this as an extension config? Looking at the config schema, all of that appears to be specific to a particular widget. I guess it's mostly academic right now since, with only one extension, the behavior will be the same. But that's my thought. |
My thinking here is that although it's a config schema for a specific widget, that widget is the only public extension, so all copies of the extension have a shared schema, even though they should have different schema instances. I guess alternatively we can switch to |
yeah that's what I was thinking; and then when one day we have another generic widget it will be clearer how to add its config |
Huh... so it looks like |
Should we close this out? @ibacher, @vasharma05? |
No, but I'll turn it into a draft. We need to fix the config system so that this works. |
Requirements
Summary
This fixes the generic-patient-widgets app. The functionality was broken in openmrs/openmrs-esm-core#898, which was solving an issue related to configurations being provided before their schema was loaded. Inadvertently, this requires apps to call
defineConfigSchema()
is they use configuration anywhere.The generic-patient-widgets-app was using
defineExtensionConfigSchema()
, and using this call wrongly (since it passed the module name instead of the extension name). The goal of this function is to allow individual extensions to have config schemas separate from those that are in the app they define, not to provide the configuration schema for the module.Screenshots
Related Issue
Other