Skip to content

New version of UI#221

Closed
ylyangtw wants to merge 209 commits intomasterfrom
213-refactoring-search-filters
Closed

New version of UI#221
ylyangtw wants to merge 209 commits intomasterfrom
213-refactoring-search-filters

Conversation

@ylyangtw
Copy link
Copy Markdown
Contributor

No description provided.

valentinedwv and others added 27 commits August 11, 2025 15:15
Previously, range filters (year and depth sliders) only updated their bounds when the original search results changed, not when other filters were applied. This caused the sliders to only update once and then remain static.

The fix modifies both RangeSliderYear.vue and RangeSliderDepth.vue to:
- Watch filteredResults (currentResults) in addition to the original results
- Recalculate min/max bounds based on currently filtered data
- Reset slider values if they fall outside new bounds
- Update both count badges and slider ranges dynamically

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
…endency

The previous fix caused range sliders to reset their min/max bounds when their own
filters were applied, creating a circular dependency. This update implements a
smarter approach:

- Range sliders now only update their bounds when OTHER filters are active, not when
  their own range filter is applied
- This prevents the sliders from resetting themselves while still allowing them to
  update when the available data changes due to other filter interactions
- Added access to current filters state through injection in Search.vue
- Both count badges and bounds now update correctly based on filtered results

The solution maintains the desired behavior of dynamic range updates while
eliminating the unwanted reset behavior.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
The issue was in the toggleFilter method where range filters were not being
properly added to the filters object due to a faulty condition. The problem was:

1. Missing `self` variable definition in toggleFilter method
2. Conditional check `if (filterArray \!= undefined)` was preventing range filters
   from being added when they didn't already exist

Fixed by:
- Adding `let self = this;` at the start of toggleFilter method
- Removing the conditional check for range filters - they should always be set
- This ensures range filters are properly stored and displayed in the header

Now range filters will appear in the header filter list when applied, and can
be cleared using the "Clear All Filters" button.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
…feature/qlever_textsearch

# Conflicts:
#	CLAUDE.md
#	client/src/sparql_qlever/sparql_query.rq
remove the queries from the src folder
remove the queries from the src folder
@ylyangtw ylyangtw linked an issue Jan 28, 2026 that may be closed by this pull request
@valentinedwv valentinedwv deleted the 213-refactoring-search-filters branch March 20, 2026 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refactoring search filters

2 participants