Skip to content

v5.3.0

Compare
Choose a tag to compare
@denniskigen denniskigen released this 21 Nov 15:47
· 190 commits to main since this release
52fcfc3

Highlights

Core 5.3.0 brings a number of new features and improvements to O3. Most notably, these are:

Improved performance

@ibacher's next iteration of performance improvements involves reducing the number of dynamic imports shipped by frontend modules. This is achieved by importing components directly in frontend module's entry points instead of dynamically importing them via function calls. This change means that Webpack's chunking algorithm ends up creating fewer chunks, and the corollary is the application loads faster as there are fewer network requests to be made. Read more about this in the migration guide here.

Improved support for pluralization and interpolation in translations

Pluralization and interpolation now have improved support in O3. @vasharma05's work on upgrading the dependencies and amending the translation keys and strings has made this possible. Developers can now use the following syntax to interpolate variables and leverage pluralization in translations:

const totalResults = searchResults.length;

return (
  // ...
  
  {t('searchResultsCount', '{{ count }} search results'), { count: totalResults }}
  
  // ...
)

With the following translations:

{
  "searchResultsCount_one": "{{count}} search result",
  "searchResultsCount_other": "{{count}} search results",
}

i18next will interpolate the {{ count }} variable and use the correct pluralization key based on the value of count.

Support for non-Gregorian calendars

v5.3.0 adds support for registering default custom calendars on a per-locale basis. This means that developers can now register a custom calendar for a locale and use it in their application. Currently, we've only added explicit support for the Ethiopian calendar, which gets rendered when the locale is set to Amharic. See @ibacher's PR for more details.

New snackbar notification component

In keeping with the latest iteration of our Notifications design guidelines, @hadijahkyampeire has added a new snackbar notification component that'll be used to display the bulk of user task-generated notifications in O3. Work is currently ongoing to leverage the new component across the application.

Yarn 4 support

We're now using Yarn v4! That means we're also migrating monorepo management concerns from using lerna to using yarn workspaces. An important corollary of this change is that we'll now require a minimum of Node 18 to run 03.

Features

  • (feat) Switch translation formatting to Intl API format by @vasharma05 in #799
  • (feat) O3-2484: The application should revert to default locale on logout by @vasharma05 in #782
  • (feat) Synchronously load most extensions and pages by @ibacher in #806
  • (feat) Adds support for non-Gregorian calendars, with special work-arounds for Amharic by @ibacher in #790
  • (feat) Smoother scrolling for locations by @ibacher in #810
  • (feat) O3-2504: Allow saving user preference for login location as user property by @vasharma05 in #793
  • (feat) O3-2533: Add a snackbar notification by @hadijahkyampeire in #809
  • (feat) Adding Arabic translations by @michaelbontyes in #787
  • (refactor) Use classNames to apply classes conditionally by @denniskigen in #807

Bug fixes

  • (fix) Fix the appearance of Carbon icon-only buttons by @denniskigen in #781
  • (fix) Offline actions component added by @icrc-jofrancisco in #784
  • (fix) O3-2506 Fix the appearance of Carbon icon-only buttons by @ibacher in #792
  • (fix) Devtools panel Switcher components shouldn't truncate their content by @denniskigen in #794
  • (fix) Adds two React-hooks, shallowEqual implementation and some small fixes by @ibacher in #797
  • (fix) O3-2526 Resolve Overlay Issue Blocking LeftNav Access on Tablet Devices by @donaldkibet in #796
  • (fix) Locale switcher should default to user's defaultLocale or the session locale by @vasharma05 in #783
  • (fix) Fix requiredVersion for SWR share by @ibacher in #802
  • (fix) PWA Manifest should respect the OpenMRS public path by @ibacher in #803
  • (fix) O3-2543 useSession not always receiving updated session object by @brandones in #804
  • (fix) Fix table header color for datatables by @denniskigen in #808
  • (fix) O3-2537: Fixing the spacing of toast notifications by @jona42-ui in #805
  • (fix) No toast should be shown if the checkbox for location preference in the location picker wasn't checked by @vasharma05 in #812
  • (fix) Remove background color from overflow menu buttons by @denniskigen in #819
  • (fix) O3-2476: isOmrsDateStrict should accept dates with negative timezone… by @mseaton in #785

Housekeeping

New contributors

Full Changelog: v5.2.0...v5.3.0