Skip to content
Snippets Groups Projects

#3502935: Refactor the Search component to treat filter changes generically

Merged #3502935: Refactor the Search component to treat filter changes generically

Closes #3502935

Merge request reports

Merge request pipeline #417072 passed

Merge request pipeline passed for dedda58d

Code Quality is loading
Test summary results are being parsed

Merged by Chris WellsChris Wells 5 months ago (Feb 6, 2025 5:58pm UTC)

Loading

Pipeline #417087 passed

Pipeline passed for d1bb6215 on 2.0.x

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Adam G-H
  • Adam G-H
  • utkarsh_33 added 2 commits

    added 2 commits

    Compare with previous version

  • Adam G-H
  • utkarsh_33 added 3 commits

    added 3 commits

    Compare with previous version

  • utkarsh_33 added 1 commit

    added 1 commit

    Compare with previous version

  • Adam G-H
  • utkarsh_33 added 1 commit

    added 1 commit

    Compare with previous version

  • utkarsh_33 resolved all threads

    resolved all threads

  • 105 filters: {},
    116 106 };
    117 dispatch('selectCategory', detail);
    107 Object.keys(filterDefinitions).forEach((key) => {
    108 detail.filters[key] = $filters[key];
    109 });
    110
    111 dispatch('FilterChange', detail);
    118 112 stateContext.setPage(0, 0);
    119 113 stateContext.setRows(detail.rows);
    114 if (
    115 event &&
    116 event.target &&
    117 filterDefinitions[event.target.name]._type === 'boolean'
    118 ) {
    119 refreshLiveRegion();
  • 186
    187 async function onSelectCategory(event) {
    188 $filters.categories = event.detail.category;
    189 await load(0);
    190 page.set(0);
    191 }
    192 186 async function onSort(event) {
    193 187 sort.set(event.detail.sort);
    194 188 sortText = sorts[$sort];
    195 189 await load(0);
    196 190 page.set(0);
    197 191 }
    198 async function onAdvancedFilter() {
    199 await load(0);
    192 async function onFilterChange(event) {
    193 await load(0, event.detail.filters);
    • So this makes sense in concept, but...the load() function doesn't take a second parameter, so this is pretty much thrown out. Let's change load() so that it builds the query string using the filters you're passing in here, and that way we can remove SearchComponent.toSearchParams(), which was always meant to be a kludge anyway. Go go go!!

    • Please register or sign in to reply
  • utkarsh_33 added 1 commit

    added 1 commit

    • c20c68e6 - Wip to remove toSearchParams

    Compare with previous version

  • utkarsh_33 added 2 commits

    added 2 commits

    Compare with previous version

  • utkarsh_33 added 1 commit

    added 1 commit

    Compare with previous version

  • utkarsh_33 added 1 commit

    added 1 commit

    • e921dfb6 - Effecient way for type conversion

    Compare with previous version

  • utkarsh_33 added 1 commit

    added 1 commit

    Compare with previous version

  • utkarsh_33 added 1 commit

    added 1 commit

    • 23ecb693 - Eslint fixes and removed unused function toString()

    Compare with previous version

  • utkarsh_33 added 1 commit

    added 1 commit

    Compare with previous version

  • utkarsh_33 added 1 commit

    added 1 commit

    • acea7754 - Added filter as optional param

    Compare with previous version

  • Adam G-H added 2 commits

    added 2 commits

    • 5551abc8 - Remove boolean checks from the Svelte
    • 6af746a4 - Forgot to yarn build

    Compare with previous version

  • Adam G-H added 1 commit

    added 1 commit

    Compare with previous version

  • Adam G-H added 1 commit

    added 1 commit

    Compare with previous version

  • Adam G-H added 1 commit

    added 1 commit

    • e2d88854 - Fix bug where initial load used no filters

    Compare with previous version

  • Adam G-H added 1 commit

    added 1 commit

    • ca209b02 - Fix one failing test by always calling load() with the filter set

    Compare with previous version

  • Adam G-H added 1 commit

    added 1 commit

    Compare with previous version

  • merged

  • Please register or sign in to reply
    Loading