medic / cht-core

The CHT Core Framework makes it faster to build responsive, offline-first digital health apps that equip health workers to provide better care in their communities. It is a central resource of the Community Health Toolkit.
https://communityhealthtoolkit.org
GNU Affero General Public License v3.0
441 stars 212 forks source link

Move /patches from the root to webapp/patches #4637

Closed garethbowen closed 6 years ago

garethbowen commented 6 years ago

They only apply to webapp so it makes sense to move them down.

garethbowen commented 6 years ago

AT: Make sure the patches are still being applied to the bundled code.

newtewt commented 6 years ago

Hey @garethbowen need some assistance on AT for this one.

  1. Can you share some detail how to AT this one? // patch font-awesome to remove version attributes so appcache works // https://github.com/FortAwesome/Font-Awesome/issues/3286 'patch webapp/node_modules/font-awesome/less/path.less < webapp/patches/font-awesome-remove-version-attribute.patch',

  2. I'm assuming we would need to login as a user with Hindi as the language to see numerals. Where would we expect to see them in the app? // patch moment.js to use western arabic (european) numerals in Hindi 'patch webapp/node_modules/moment/locale/hi.js < webapp/patches/moment-hindi-use-euro-numerals.patch',

garethbowen commented 6 years ago
  1. Without that patch the font-awesome fonts aren't read from the appcache offline cache, and were instead requested from the server each page load. Bring up the network tab of your browser's dev tools and make sure the font-awesome fonts aren't requested on page load.
  2. Yes, switch your locale to Hindi on the user settings page and refresh. Basically all dates in the app are formatted by the moment library. Without this patch the numbers are translated to Hindi characters which we don't want, so make sure all the numbers in dates are "123..." not "१२३...".
newtewt commented 6 years ago

These work on my local machine. Once beta.dev comes back up I'll confirm there as well.

newtewt commented 6 years ago

Confirmed in beta.dev the patches are still working.