Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds support for removing previously applied filters in the THF Browse component before applying new ones. Introduces a reusable
po-tagDOM utility and extends the language pack with the new "Remove Filters" key across all supported languages.Changes
tir/technologies/core/language.pyremove_filtersattribute toLanguagePackclass.FiltersandApply Filtersentries for the Russian language pack.tir/technologies/poui_internal.py_filter_thf_browse: Now calls_remove_filters_from_browse()before opening the filter panel, ensuring stale filters are cleared prior to applying new ones. Updated docstring to reflect thatfiltersmust be alistof dicts._remove_filters_from_browse(new): Checks for apo-tagelement insidekendo-gridmatching the "Remove Filters" label and clicks it when found, then waits for the component to finish loading._get_po_tag(new): Generic DOM helper that locates apo-tagelement within a given CSS-selector container by matching its innerspantext (case-insensitive). Returns the element orNone.Motivation
When
_filter_thf_browsewas called multiple times, previously applied filters remained active, causing incorrect or cumulative filter results. This fix ensures a clean state before each filter application.Testing
_get_po_tagreturns the correct element when a matchingpo-tagexists._get_po_tagreturnsNonewhen no matching element is found.Related Issues / Tickets