learningequality / kolibri

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

In Learn, update `useSearch()` to extend `baseUseSearch()` #12517

Closed marcellamaki closed 1 month ago

marcellamaki commented 2 months ago
### Prerequisite(s)
- [ ] #12516 

Begin by reviewing the epic #11888 and prerequiste #12516

Tasks

  1. Update useSearch composable in learn to just return useBaseSearch
  2. Update useBaseSearch to accept baseurl and fetchContentNodeProgress as function arguments, that default to undefined
  3. Invoke currentDeviceData in the learn useSearch to inject baseurl into useBaseSearch alongside fetchContentNodeProgress
  4. Update useBaseSearch to conditionally call fetchContentNodeProgress if it is defined

Acceptance Criteria

  1. Ensure that all references in Learn are properly updated - including updating all injection to useBaseSearch so it is simpler to move components in subsequent refactor
  2. Ensure that all search functionality still works as expected in learn
rtibbles commented 1 month ago

Mistakenly referenced from #12566 - reopening.