From 5c65c44db35f2d44dd5cc4433ac9e3302fccee7b Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Mon, 19 Jan 2026 02:33:17 +0000 Subject: [PATCH] feat: Remove hashtag pills from For You page - Updated `For You` page to rely on feed engine filtering for tag preferences. - Removed the `recentVideoTags` HTML element from `views/for-you.html`. - Updated `js/app.js` and `js/ui/videoListViewController.js` to optionally skip finding the `recentVideoTags` element. - Updated `loadForYouVideos` in `js/app.js` to explicitly skip `recentVideoTags`. - Confirmed feed logic via `tests/feed-engine/tag-preference-filter.test.mjs`. - Verified UI changes via Playwright. --- js/app.js | 14 +++++++++++--- js/ui/videoListViewController.js | 7 +++++-- views/for-you.html | 1 - 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/js/app.js b/js/app.js index 61afb2f6..adcf6993 100644 --- a/js/app.js +++ b/js/app.js @@ -2956,7 +2956,7 @@ class Application { ); } - mountVideoListView(container = null) { + mountVideoListView({ container = null, includeTags = true } = {}) { if (!this.videoListView) { return null; } @@ -2966,15 +2966,23 @@ class Application { container, view: this.videoListView, currentVideoList: this.videoList, + includeTags, }); this.videoList = videoList || null; this.videoListPopularTags = popularTags || null; return this.videoList; } + const isElement = (value) => + typeof HTMLElement !== "undefined" && value instanceof HTMLElement; + const target = container || document.getElementById("videoList"); this.videoList = target || null; - const tagsRoot = document.getElementById("recentVideoTags"); + + let tagsRoot = null; + if (includeTags) { + tagsRoot = document.getElementById("recentVideoTags"); + } this.videoListPopularTags = tagsRoot || null; if (typeof this.videoListView.setPopularTagsContainer === "function") { this.videoListView.setPopularTagsContainer(this.videoListPopularTags); @@ -5747,7 +5755,7 @@ class Application { devLogger.log("Starting loadForYouVideos... (forceFetch =", forceFetch, ")"); this.setFeedTelemetryContext("for-you"); - const container = this.mountVideoListView(); + const container = this.mountVideoListView({ includeTags: false }); const hasCachedVideos = this.nostrService && Array.isArray(this.nostrService.getFilteredActiveVideos()) && diff --git a/js/ui/videoListViewController.js b/js/ui/videoListViewController.js index 498d50f9..b190e830 100644 --- a/js/ui/videoListViewController.js +++ b/js/ui/videoListViewController.js @@ -17,13 +17,16 @@ export default class VideoListViewController { ); } - mount({ container = null, view, currentVideoList = null } = {}) { + mount({ container = null, view, currentVideoList = null, includeTags = true } = {}) { if (!view) { return { videoList: currentVideoList || null, popularTags: null }; } const target = container || this.getElementById("videoList"); - const popularTags = this.getElementById("recentVideoTags"); + let popularTags = null; + if (includeTags) { + popularTags = this.getElementById("recentVideoTags"); + } if (typeof view.setPopularTagsContainer === "function") { view.setPopularTagsContainer(popularTags || null); diff --git a/views/for-you.html b/views/for-you.html index 6b416c80..64f03865 100644 --- a/views/for-you.html +++ b/views/for-you.html @@ -2,7 +2,6 @@

For You

-