Malawi UI

Malawi UI

 

This document is about the implementation of the OpenLMIS-Malawi MW-UI, and the extensions that went into making the MW-UI.

Works Well??

The following are extensions that seem to work well. Please comment if you agree/disagree, or add other examples

User Profile Extension

https://openlmis.atlassian.net/browse/MW-243 Commit

  • This works well because the changed files are small

  • Not getting changes for profile.html wouldn't "break" any functionality

  • Good example of design change

  • Could be added with some extension mechanism, but that might be hackier

Requisition Search Changes

https://openlmis.atlassian.net/browse/MW-241 & https://openlmis.atlassian.net/browse/MW-215

Requisition Search Files

  • Only HTML changed

  • Search file might be too big – ideally only table would be changed

Should PR to Core

 

Solution

 

Solution

Open-External-URL

  • Needs unit tests

  • Needs documentation

  • Could be used to fix print url hacks in other places – should be addressed separately

https://openlmis.atlassian.net/browse/MW-435

Table Horizontal Scrollbar

https://openlmis.atlassian.net/browse/MW-169

  • This should be brought over to CORE

  • Unit tests are needed

https://openlmis.atlassian.net/browse/MW-436


Should be Moved

All the changes for the MW-UI were made directly in that repository, which means git can't merge changes. Fixing this would mean forking the original repository, and creating an image from that forked repository that is used in the MW-UI.
The benefit is this would allow git to automatically merge most code changes. As the core product releases new versions over time, git upstream code can be pulled into MW-UI while preserving the local modifications. This greatly reduces ongoing maintenance effort of conducting each upgrade.

 

Solution

 

Solution

Requisition Approval and Batch Approval

https://openlmis.atlassian.net/browse/MW-84

  • There are plans to merge these feature changes back to core – getting this code out of MW-UI and into a place where make a PR would be trivial makes sense

  • Fork OpenLMIS/openlmis-requisition-ui to OpenLMIS-Malawi/openlmis-requisition-ui

  • Having a correct fork would make maintenance and merging changes easier

https://openlmis.atlassian.net/browse/MW-454

Requisition Service

  • There are a handful of changes here, that either should be refactored to smaller changes instead of forking a file

  • Until that happens, the changes should live in OpenLMIS-Malawi/openlmis-requisition-ui

 

Needs Improvement

 

Solution

 

Solution

Login Service

Was there a ticket for this commit??

  • File was forked to add currency support

  • Login Service is tightly coupled to other "start up" actions, should be refactored to use an extension mechanism

    • Either an event OR $q.all w/$filter

https://openlmis.atlassian.net/browse/MW-437

TB Quarterly Warning

https://openlmis.atlassian.net/browse/MW-81

https://openlmis.atlassian.net/browse/MW-438

Alphabetically Sorted Product Dropdowns

https://openlmis.atlassian.net/browse/MW-217

  • The change is made in add-product-modal.html - this can be done in a reusable/testable way by:

    • add decorator to controller

    • sort products in factory

https://openlmis.atlassian.net/browse/MW-439

Full Forks to Change a Link

  • To change a link, we are:

    • Forking the controller file, and adding two new methods

    • Forking the HTML to change the link

  • This can be done more cleanly by

    • decorating the controller to change the link (no need to touch the HTML)

    • refactoring the controller to use a factory to produce the link

    • refactor to use external-url method (mentioned above)

  • Target directories

https://openlmis.atlassian.net/browse/MW-434

Uncertain

 

Solution

 

Solution

Requisition Initiate

https://openlmis.atlassian.net/browse/MW-237

File

  • Most of the changes to this file have been to maintain warning message

  • CORE won't follow this design direction

 

OpenLMIS-Facility-Program-Select

  • Seems to be added to fix other bugs – Seems like it could be removed entirely

https://openlmis.atlassian.net/browse/MW-440

Report

  • Looks like many of the changes are to support the report-url changing

  • This could be done without forking, probably

  • Git history here doesn't have many ticket numbers, so its hard to figure out WHY changes were made

 

OpenLMIS: the global initiative for powerful LMIS software