Skip to content

Remove Mental health and nutrition from matsapha frontend#352

Open
jnsereko wants to merge 1 commit intomainfrom
remove-front-modules
Open

Remove Mental health and nutrition from matsapha frontend#352
jnsereko wants to merge 1 commit intomainfrom
remove-front-modules

Conversation

@jnsereko
Copy link
Collaborator

@jnsereko jnsereko commented Feb 12, 2026

🐞 Related Issues / Tickets

Added a script, remove-importmap-entries.groovy that removes all frontend modules whose names are supplied as parameters the script

Screen cast

Screenshot 2026-02-12 at 14 48 29

✅ PR Checklist

👨‍💻 For Author

  • I included the JIRA issue key in all commit messages (e.g., LIME2-123)
  • I wrote or updated tests covering the changes (if applicable)
  • I updated documentation (if applicable)
  • I verified the feature/fix works as expected
  • I attached a video or screenshots showing the feature/fix working on DEV
  • I logged my dev time in JIRA issue
  • I updated the JIRA issue comments, status to "PR Ready"
  • I unassigned the issue so a reviewer can pick it up
  • I mentioned its status update during dev sync call or in Slack
  • My work is ready for PR Review on DEV

🔍 For Reviewer

  • I verified the JIRA ticket key is present in commits
  • I reviewed and confirmed the JIRA issue status is accurate
  • I verified the feature/fix works as expected on DEV or UAT
  • I attached a video or screenshots showing the feature/fix working on DEV or UAT
  • I updated the JIRA issue comments, status to "DEV Ready" or "UAT Ready"
  • I logged my review time in JIRA issue
  • I mentioned its status update during daily dev sync call or on Slack
  • This work is ready for UAT and PRODUCTION

@typo-app
Copy link
Contributor

typo-app bot commented Feb 12, 2026

Oops! Your Typo free trial has ended. If you'd like to continue receiving code reviews, please ask the admin to check out our special pricing plan.

<properties>
<property>
<name>modulesToRemove</name>
<value>esm-mental-health-app,esm-nutrition-app</value>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on the logic, it looks like each site needs to maintain a version of this block to remove any unused esms. 3 questions

  1. Does the removal happen at before the build or after?
  2. What happens for the reverse scenario where bunia will need ward, bed and stock management? Does that mean the main importmap will have all the packages and remove at site level?
  3. How does this approach work for experimental packages/modules that aren't supposed to be in any of the sites but available on a demo instance with new expeirmental features?

Copy link
Collaborator Author

@jnsereko jnsereko Feb 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the removal happen at before the build or after?

After the build. Actually, last step of generating the .zip

Does that mean the main importmap will have all the packages and remove at site level?

Yes, distro will have everything. Sites will remove what they do not need.

How does this approach work for experimental packages/modules that aren't supposed to be in any of the sites but available on a demo instance with new expeirmental features?

We shall remove experimental packages/modules at sites where they are not needed.

<properties>
<property>
<name>modulesToRemove</name>
<value>esm-mental-health-app,esm-nutrition-app</value>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jnsereko , we must use the correct app names: @openmrs/esm-mental-health-app

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can use both the short or the long names of the app. Whichever you like eg
Short name: esm-mental-health-app
full name: @openmrs/esm-mental-health-app

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use json to list this package names? This doesn't look organized

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use json to list this package names? This doesn't look organized

I’m not sure introducing a JSON file here would add much value. It might actually introduce extra complexity.
If we do decide to go the JSON route, then we should probably support overriding the import map from the distro level rather than just listing package names separately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants