-
Notifications
You must be signed in to change notification settings - Fork 213
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) Support for automatically overriding routes and Carbonize devtools #816
Conversation
Size Change: -717 kB (-21%) 🎉 Total Size: 2.71 MB
ℹ️ View Unchanged
|
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.
Nice work, Ian! Code looks good on first reading. I haven't tested locally yet (dunno if I can get it to build with the issues I've been running into lately)
@ibacher, it looks like when I add a module override, and then subsequently remove it, the add-and-remove-override.mp4 |
@denniskigen I see... So, clicking on the "Reset all overrides" was, stupidly, not something I added something for (it should do the right thing if you individually disable the override). |
Hopefully that's fixed now! |
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.
Looks good to me. I've left a few comments.
packages/apps/esm-devtools-app/src/devtools/import-map-list/list.component.tsx
Outdated
Show resolved
Hide resolved
packages/apps/esm-devtools-app/src/devtools/import-map-list/list.component.tsx
Show resolved
Hide resolved
packages/apps/esm-devtools-app/src/devtools/import-map-list/list.component.tsx
Show resolved
Hide resolved
packages/apps/esm-devtools-app/src/devtools/import-map-list/modal.component.tsx
Show resolved
Hide resolved
One nice thing to support that the library supports is the ability to specify a port number and have the tooling fill out the override URL for you automatically: port-number-in-overrides-panel.mp4 |
17f9378
to
5371a14
Compare
Yeah, I've found that to be kinda flaky personally, but it's pretty easy to implement. I'll add it in. |
9750fb4
to
ab39f24
Compare
In that case, probably best to leave it out. |
Requirements
For changes to apps
If applicable
Summary
This is the first in a planned series of commits to build out better dev tooling for handling stuff related to routes.json files, used by Core V5. The goal of this PR is pretty straight-forward: when adding an app to the import-map-overrides, we should load the routes, if any along-side that.
This does several things:
openmrs-routes:<name of module>
, e.g.,openmrs-routes:@openmrs/esm-patient-chart-app
. The value for this can be either a JSON string (so double-quotes) that points to a URL that resolves to a customroutes.json
(this is how 3 above is implemented) or a stringified JSON object that conforms to the routes schema. There is currently no UI for this other than your browser devtools.Screenshots
Related Issue
Other
Future plans:
develop
and some other commands. I thought that I wrote the code to also support that for routes, but it doesn't work, so I'm going to fix that up.