learningequality / kolibri

Kolibri Learning Platform: the offline app for universal education
https://learningequality.org/kolibri/
MIT License
808 stars 682 forks source link

Copy `useSearch()` into `kolibri-common` as `baseUseSearch()` #12516

Closed marcellamaki closed 2 months ago

marcellamaki commented 3 months ago

The useSearch() composable in Learn will be abstracted into kolibri-common so that it can be used across plugins. (At this point, Learn and Coach, but possibly also Device in the future!)

The core functionality should be moved into a composable called baseUseSearch that can be used across plugins.

In a future issue, additional requirements for particular uses (i.e. contentNodeProgress and currentDeviceData in Learn) will be handled within those plugins, via dependency injection.

Acceptance Criteria

  1. Moves useSearch into kolibri-common as useBaseSearch()
  2. Moves useLanguages into kolibri-common
  3. Ensure no console errors, and that build works correctly, even though this issue does not include refactoring in Learn