Skip to content

Releases: openmrs/openmrs-esm-core

v5.5.0

15 Mar 15:37
eb3f5eb
Compare
Choose a tag to compare

What's Changed

⭐️ New features

  • (feat) O3-2808: Snackbars should be dismissed after 5 seconds by @usamaidrsk in #916
  • (feat) Tweak location preference notifications by @denniskigen in #926
  • (feat) Add a global SWR configuration by @denniskigen in #929
  • (feat) Show a more useful script loading error by @denniskigen in #939
  • (feat) O3-2883: Use toast notifications for system-generated error messages by @hadijahkyampeire in #937
  • (feat) Add loud error messages if script loading fails by @ibacher in #942
  • (feat) O3-2304: Hide primary side menu panel on item click by @usamaidrsk in #945
  • (feat) Allow user to reset the importmap and reload if overridden script fails to load by @ibacher in #952
  • (feat) O3-2831: Move patient banner into styleguide by @brandones in #919

🐛 Bug fixes

🧹 Housekeeping

  • (chore) Add ResponsiveWrapper stub to framework mock by @denniskigen in #922
  • (chore) Add ResponsiveWrapper to esm-framework public API by @denniskigen in #924
  • (chore) Commit orphaned API docs by @denniskigen in #934
  • (chore) Remove trailing slash from restBaseUrl by @denniskigen in #935
  • (chore) Use yarn instead of turbo for run:shell by @ibacher in #936
  • (chore) Fix exports for the ResponsiveWrapper component by @denniskigen in #941
  • (chore) Update translations from Transifex by @github-actions in #938
  • (chore) Bump playwright by @kdaud in #950
  • (chore) O3-2935: Trigger E2E tests when there is a change in package.json by @kdaud in #951
  • (chore) Release v5.5.0 by @jayasanka-sack in #958

New Contributors

  • @github-actions made their first contribution in #938

Thank you to all contributors for embodying the spirit of 'write code. save lives' in every line committed. Your commitment to OpenMRS is invaluable and truly makes a difference in healthcare worldwide. ❤️

Full Changelog: v5.4.0...v5.5.0

v5.4.0

08 Feb 13:25
acaf5dc
Compare
Choose a tag to compare

What's Changed

⭐️ New Features

  • Configure Password Field Placement on Login Screen by @jayasanka-sack in #820
  • Add some colors to CLI output by @ibacher in #839
  • Support for automatically overriding routes and Carbonize devtools by @ibacher in #816
  • Allow app menu to expand based on the width of its content by @CynthiaKamau in #854
  • Support multiple configurations when running assemble by @ibacher in #895
  • Dynamically reload routes.json files for packages from sources by @ibacher in #824
  • Provide function for obtaining default config tree in test code by @brandones in #863
  • Add an application-writable config.json file in frontends by @jnsereko in #629
  • Allow ConfigurableLink to have a callback before navigating by @brandones in #871
  • Add support for specifying overrides using only a port by @ibacher in #852
  • Click slot name to find it in the Implementer Tools by @brandones in #866
  • Add the ability to use actions in the existing toast by @hadijahkyampeire in #822
  • Create a global app history utility by @brandones in #877
  • Add ResponsiveWrapper to style guide by @denniskigen in #909
  • Added type passing in the useOpenmrsSwr by @vasharma05 in #891
  • O3-512: Click slot name to find it in the Implementer Tools by @brandones in #866

🐛 Bug Fixes

🧹 Housekeeping

New Contributors

Thank you to all contributors for embodying the spirit of 'write code. save lives' in every line committed. Your commitment to OpenMRS is invaluable and truly makes a difference in healthcare worldwide.

Full Changelog: v5.3.2...v5.4.0

v5.3.2

05 Dec 09:19
9230453
Compare
Choose a tag to compare

What's Changed

v5.3.2 is a patch release of Core with backwards-compatible bug fixes. The main highlights are:

Fixed frontend build issues

The frontend build was failing due to a dependency issue with @carbon/icons-react upstream. This release fixes that issue by pinning the version of @carbon/icons-react to ^10.16.0. Thanks, @ibacher, for the fix!

Error logging for failed builds

The Webpack build process now logs errors in a readable format, so that developers can easily see what went wrong during the build process. Thanks, @jayasanka-sack, for this fix!

Fixed snackbar container positioning on tablet

Thanks to @hadijahkyampeire for fixing the snackbar container positioning on tablet!

Fixes

Thanks to everyone for the quick turnaround on this release! 🎉

Full Changelog: v5.3.1...v5.3.2

v5.3.1

01 Dec 13:36
9407c1c
Compare
Choose a tag to compare

What's Changed

Bug fixes

Thank you to all our amazing contributors! 🎉

Full Changelog: v5.3.0...v5.3.1

v5.3.0

21 Nov 15:47
52fcfc3
Compare
Choose a tag to compare

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

v5.2.0

05 Oct 18:41
f46cd16
Compare
Choose a tag to compare

Highlights

Core 5.2.0 brings a number of new features and improvements and a host of bug fixes. The most notable changes are:

SWR is now a shared library

Frontend modules can now leverage the SWR as a ModuleFederation shared dependency. This means that we can now leverage proper request deduplication and a shared cache for all API calls that use SWR. Additionally, this change should make it possible to mutate the cache from one module and have that mutation reflected in other modules.

Fixes to the openmrs tooling

This release fixes an issue where the openmrs tooling would fail to build frontend assets correctly. This was due to an issue with the way pure CSS files were handled by Wepback. #778 makes it so that pure CSS files are handled by the css-loader. Additionally. we've added a check to the distro reference application that should catch build failures and show an error message.

A new useDebounce hook

The framework now exports a useDebounce hook that can be used to debounce requests to the backend. Previously, we've had smatterings of similar logic in various places, with one specific downside: the custom implementations used for search inputs would lead the inputs changing from controlled to uncontrolled components. This is now handled by the hook, which provides a simple API for debouncing requests. Here's a snippet showing how to leverage the hook:

import { useDebounce } from "@openmrs/esm-framework";

function SearchComponent() {
  const [searchTerm, setSearchTerm] = useState('');
  const debouncedSearchTerm = useDebounce(searchTerm);
  const swrResult = useSWR(`/api/search?q=${debouncedSearchTerm}`)
 
 return (
   <Search
     labelText={t('search', 'Search')}
     onChange={(e) => setSearchTerm(e.target.value)}
     value={searchTerm}
   />
 )
}

export default SearchComponent;

Introduction of a locale-sensitive date picker that supports the Ethiopian calendar

The framework now provides a locale-sensitive datepicker with support for the Ethiopian calendar. For Ethiopian locales (am, am_ET, and ti_ET), this custom datepicker will be used as the default. The functionality for the datepicker is provided by the React Spectrum library. Future work will include providing support for registering default custom calendars on a per-locale basis using standard JS Intl APIs.

The service worker is now opt-in for local development

The service worker installation is now opt-in when running a local development server using yarn start. To opt into installing the service worker, you can pass a --support-offline flag to yarn start like so:

yarn start --support-offline=true

We're working to ameliorate some of the issues with our current service worker implementation, and it's entirely feasible that this flag will default to being on in the very near future.

Features

  • (feat) Make sidenav scrollable by @Jexsie in #732
  • (feat) Core support for O3-2242: Separate 'active visit' and 'current visit' by @brandones in #738
  • (feat) O3-2306: Add formatDate option to disable special 'today' handling by @brandones in #743
  • (feat) Update type LoggedInUser to list userProperties in use by @vasharma05 in #744
  • (feat) Allow useConfig() to load configuration from other modules by @ibacher in #751
  • (feat) Tweaks to the ActionableNotification component by @denniskigen in #758
  • (feat) Resolve template literals in the src prop of the logo config by @samuelmale in #749
  • (feat) Adding useDebounce to the react utils by @vasharma05 in #756
  • (feat) Use SWR as a shared library by @ibacher in #774
  • (feat) Upgrade React Spectrum and fix CSS loading error by @ibacher in #778
  • (feat) KH-372: Add Khmer translations by @kazlaw in #776
  • (feat) Introduce a locale-sensitive date-picker by @samuelmale in #746
  • (feat) O3-2410: Support using custom link as navbar logo by @mogoodrich in #767
  • (feat) O3-2407: App Menu and User Menu should hide if their panel has no con… by @mogoodrich in #768
  • (feat) O3-2409: Login: support interpolation in loginUrl and logoutUrl by @mogoodrich in #766
  • (feat) Add Spanish translations by @icrc-jofrancisco in #775
  • (feat) Patient age display should be localized by @vasharma05 in #765
  • (feat) Make the service worker opt-in for local dev by @denniskigen in #780

Bug fixes

  • (fix) Add support for hashed routes by @ibacher in #736
  • (fix) Memoize the returned callback functions from usePagination by @vasharma05 in #741
  • (fix) Resolve some errors that appear when an app has empty routes by @ibacher in #742
  • (fix) Don't process openmrs-esm-styleguide.css files the Sass loader by @ibacher in #745
  • (fix) Bug where store actions don't receive correct arguments; get rid of appState by @brandones in #747
  • (fix) Simplify createGlobalStore mock by @brandones in #748
  • (fix) Fix Sass version to < 1.65.0 by @ibacher in #752
  • (fix) Remove duplicate top-nav-info-slot by @pirupius in #753
  • (fix) Locale switcher in the primary navigation should show session locale if no default locale found by @vasharma05 in #757
  • (fix) Extension online / offline support should propagate to runtime configuration by @ibacher in #761
  • (fix) Offline patients are not being listed in the table by @icrc-jofrancisco in https:/
  • (fix) O3-2419: Test failure due to non-breaking space by @mogoodrich in #769
  • (fix) Fix ContentSwitcher style overrides by @denniskigen in #773

Housekeeping

  • (chore) Tweak pre-release job skip logic by @denniskigen in #735
  • (chore) Update ConnectedExtension and add useConnectedExtensions mock by @ibacher in #737
  • (chore) Fix some typings by @ibacher in #750
  • (chore) O3-2358: Utilize pre-filled docker images in e2e tests by @Piumal1999 in #759
  • (chore) Add OpenMRSDatePicker to global mock file by @kajambiya in #760
  • (chore) Export Datepicker as mock by @kajambiya in #764
  • (chore) Bump @carbon/react and @carbon/charts by @denniskigen in #770
  • (chore) O3-2113: Setup playwright and add login e2e test by @RandilaP in #740

Documentation

  • (docs) Update test scripts and their related documentation by @denniskigen in #754

New contributors

Thank you to all our wonderful contributors! 🎉

Full Changelog: v5.1.0...v5.2.0

v5.1.0

18 Jul 18:29
b3a3b52
Compare
Choose a tag to compare

Core 5.1.0 contains various critical fixes for issues stemming from the 5.0.0 BREAKING release. In addition, it contains a number of new features and improvements.

Highlights

Support for feature flags

This release introduces a new feature flagging system to O3. Feature toggles (often referred to as feature flags) are powerful, allowing teams to modify system behaviour without changing code. This is useful for features still in development or features not yet ready for production use. Implementers will be able to toggle features on and off from the Feature Flags tab in the O3 Implementer Tools. See @brandones' GIF below demoing feature flags in practice:

Peek 2023-07-13 14-04

Initial support for RDE

v5.1.0 introduces initial support for Retrospective Data Entry. It contains changes to the visit-utils file and the useVisit hook to allow the user to manually set the current visit. Prior to this, the concept of the current visit only referred to the latest visit with no end date. This change sets the stage for proper RDE support in the future.

Post-migration fixes

This release provides several fixes for issues related to the 5.0.0 release, including fixes to the configuration, extension, and translation systems. With these, we should be able to confidently move forward with the 5.x series of releases.

Features

  • (feat) Load scripts for non-visible modules asynchronously after starting the application by @ibacher in #710
  • (feat) KH-239: Translate login page to km by @kdaud in #716
  • (feat) Improved {locale}.json translation files for various languages by @vasharma05 in #705
  • (feat) More flexible system for setting the current visit (supports O3-1895) by @brandones in #724
  • (feat) Simplify the openmrsComponentDecorator by @ibacher in #725
  • (feat) O3-2258: Create feature flagging system by @brandones in #728
  • (feat) O3-2258: Extension system support for feature flags by @brandones in #733

Bug fixes

  • (fix) Various fixes for compatibility of new versions by @ibacher in #707
  • (fix) Extensions should have meaningful names by @ibacher in #708
  • (fix) Restore proper extension order by @ibacher in #709
  • (fix) Fix loading config from relative URLs by @ibacher in #703
  • (fix) Add a missing order property to the offline tools routes by @denniskigen in #711
  • (fix) Fix routes for offline tools frontend module by @denniskigen in #712
  • (fix) Fix offline tools dashboard link by @denniskigen in #713
  • (fix) Properly merge routes using routes.registry.json from backend by @ibacher in #714
  • (fix) Improve service-worker behaviour when running in development by @ibacher in #715
  • (fix) Render extensions based on connectivity by @denniskigen in #717
  • (fix) Fix issues with single-spa caused by naming extensions by @ibacher in #720
  • (fix) Define behaviour for translations from esm-app-shell by @ibacher in #719
  • (fix) Attempt to ensure we only have one i18next instance by @ibacher in #721
  • (fix) Importmap replacement should only override importmap.json part of importmap URL by @ibacher in #722
  • (fix) Login app should load locations with a case-insensitive db by @ibacher in #723
  • (fix) Ignore single-spa error 32 firing if a parcel has been unmounted by @ibacher in #729
  • (fix) Update a bunch of peer dependencies from 4.x to 5.x by @brandones in #730
  • (fix) Restore suspense wrapper to openmrsComponentDecorator by @ibacher in #731
  • (fix) Remove side scrolling in the Location picker in tablet and small desktop by @Jexsie in #701
  • (fix) O3-2258 trivial fixup: Add useFeatureFlag to esm-react-utils public exports by @brandones in #734

New contributors

Thank you to all our wonderful contributors! 🎉

Full Changelog: v5.0.2...v5.1.0

v5.0.2

23 Jun 12:22
0a5da41
Compare
Choose a tag to compare

What's Changed

This is a bug-fix release to fix an issue in the openmrs CLI's assemble command processing routes.json files.

Bug Fixes

  • (fix) Fix issues in the assemble script causing it to fail by @ibacher

Full Changelog: v5.0.1...v5.0.2

v5.0.1

23 Jun 01:58
c29b882
Compare
Choose a tag to compare

What's Changed

This is a bugfix release for 5.0.0.

Bugfixes

  • (fix) Webpack now processes esm-framework sanely by @ibacher in #706

Full Changelog: v5.0.0...v5.0.1

v5.0.0

22 Jun 18:14
2de5bf3
Compare
Choose a tag to compare

What's Changed

Breaking changes

Features

  • (feat) Add support for setting default language via html lang attribute by @ibacher in #695

Bug fixes