Skip to content

Tag filter#1879

Open
Dima-1 wants to merge 5 commits into
mainfrom
filter-tags
Open

Tag filter#1879
Dima-1 wants to merge 5 commits into
mainfrom
filter-tags

Conversation

@Dima-1

@Dima-1 Dima-1 commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

@Dima-1
Dima-1 marked this pull request as ready for review July 20, 2026 07:41

@alisa911 alisa911 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The goal was "one filtering logic". In practice only the predicates (shouldDisplayKey, isKeyToSkip, getPoiAdditionalType) were moved into the shared AdditionalInfoBundle, while the loop that assembles "which tags to show" was duplicated: one copy in SearchService.checkTagsVisibility, a second in Android's AmenityUIHelper.buildInternal, and a third (partial) one in the web fallback fixTagsKeysFallback plus the extra work in groupLocalizedTags. Three sources of truth instead of one.

Move the whole logic into a method in AdditionalInfoBundle. The web should receive a ready to display list of tags, and there should be no groupLocalizedTags or other such logic on the web. The web should only build the UI, which icon, a list or a tag, and so on.

Comment thread map/src/infoblock/components/wpt/WptTagsProvider.js
Comment thread map/src/infoblock/components/wpt/WptTagsProvider.js
Comment thread map/src/infoblock/components/wpt/WptTagsProvider.js
tagObj.needLinks = false;
tagObj.textPrefix = value;
break;
case OPENING_HOURS:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you touched the switch in buildTagObj, then rewrite it properly

Comment thread map/src/infoblock/components/wpt/WptTagsProvider.js
Comment thread map/src/infoblock/components/wpt/WptTagsProvider.js
@alisa911

Copy link
Copy Markdown
Contributor

This violates map/CLAUDE.md

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses tag rendering in the OsmAnd Web map “WPT/Favorites” info block by introducing a server-backed visibility filter for tags (related to osmandapp/OsmAnd#24809), and refactoring tag-building to better handle localized variants and POI name tags.

Changes:

  • Add a /search/get-tags-visibility POST call to filter/normalize tag visibility before rendering.
  • Refactor tag construction into helpers (buildTagObj, grouping localized tags, handling POI name + other languages).
  • Add client-side filtering of certain web-only/internal keys before visibility processing.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread map/src/infoblock/components/wpt/WptTagsProvider.js
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.

3 participants