metacatui icon indicating copy to clipboard operation
metacatui copied to clipboard

Update formantic UI to v2.9

Open robyngit opened this issue 1 year ago • 1 comments

This PR includes an update of the underlying fomantic UI library to the latest version, and refactors how searchSelectView and its extensions work behind the scenes to build dropdowns with fomantic UI. These changes will support a number of our planned projects, including:

  • Adapt dropdowns developed for the query builder to be used in other parts of MetacatUI (https://github.com/NCEAS/metacatui/issues/1693), i.e. many of these
  • Update and combine the annotation filter view / semantic filter view to be flexibly used for various features in MetacatUI, including extending it to support more than just ECSO MeasurementTypes (https://github.com/NCEAS/metacatui/issues/1654)
  • Add support for ADC Disciplines in the editor for arctic theme (https://github.com/NCEAS/metacatui/issues/2013)
  • Implement selection of saved Metadata snippets (https://github.com/NCEAS/metacatui/issues/1933)
  • Convert the search to an auto-complete in the new Catalog view (https://github.com/NCEAS/metacatui/issues/2363)

Big changes include:

  • The logic handling options and selections for searchSelect views have been moved to models - This not only keeps this component consistent with others in MetacatUI, but also makes it easier to listen to changes in the model and make updates based on the UI. Most important, it will make it easier to extend search selects to be used for all sorts of select interfaces pre-populated with remote content.
  • Added a custom bundle of the fomantic UI library - Previously we added the fomantic components manually, and imported them one by one. With this PR, the library is installed with npm and bundled with a gulp task built in to fomantic. This gulp task allows us to bundle only the CSS rules and JS that we need for our project, resulting in only 2 small files to import. Updating this library will also be much simpler in the future.

Other changes include using the fomantic tooltips which simplified logic that we had to use to work around the old Bootstrap tooltips and fixes issue #1694; simplifying the previously gigantic search select component; fixed eslint issues in all of the components.

robyngit avatar Jul 02 '24 20:07 robyngit