diff --git a/js/channelProfile.js b/js/channelProfile.js index 03995ff9..dd120ac7 100644 --- a/js/channelProfile.js +++ b/js/channelProfile.js @@ -64,6 +64,7 @@ import { openStaticModal } from "./ui/components/staticModalAccessibility.js"; import { setModalState as setGlobalModalState } from "./state/appState.js"; +import { attachFeedInfoPopover } from "./ui/components/FeedInfoPopover.js"; const getApp = () => getApplication(); @@ -3703,6 +3704,14 @@ export async function initChannelProfileView() { return; } + const infoTrigger = document.getElementById("channelInfoTrigger"); + if (infoTrigger) { + attachFeedInfoPopover( + infoTrigger, + "Videos published by this creator." + ); + } + currentChannelHex = null; currentChannelNpub = null; currentChannelLightningAddress = ""; diff --git a/js/historyView.js b/js/historyView.js index 55dd102c..22392d73 100644 --- a/js/historyView.js +++ b/js/historyView.js @@ -19,6 +19,7 @@ import { } from "./ui/moderationUiHelpers.js"; import { buildModerationBadgeText } from "./ui/moderationCopy.js"; import { formatShortNpub } from "./utils/formatters.js"; +import { attachFeedInfoPopover } from "./ui/components/FeedInfoPopover.js"; export const WATCH_HISTORY_EMPTY_COPY = "Your watch history is empty. Watch some videos to populate this list."; @@ -2475,6 +2476,13 @@ export function createWatchHistoryRenderer(config = {}) { export const watchHistoryRenderer = createWatchHistoryRenderer(); export async function initHistoryView() { + const infoTrigger = document.getElementById("historyInfoTrigger"); + if (infoTrigger) { + attachFeedInfoPopover( + infoTrigger, + "Chronological list of videos you have watched." + ); + } await watchHistoryRenderer.init(); } diff --git a/js/searchView.js b/js/searchView.js index 39912979..d0823291 100644 --- a/js/searchView.js +++ b/js/searchView.js @@ -7,6 +7,7 @@ import { escapeHTML } from "./utils/domUtils.js"; import { formatShortNpub } from "./utils/formatters.js"; import { sanitizeProfileMediaUrl } from "./utils/profileMedia.js"; import { devLogger } from "./utils/logger.js"; +import { attachFeedInfoPopover } from "./ui/components/FeedInfoPopover.js"; function getApp() { return getApplication(); @@ -86,6 +87,14 @@ export async function initSearchView() { titleEl.textContent = query ? `Search Results for "${query}"` : "Search Results"; } + const infoTrigger = document.getElementById("searchInfoTrigger"); + if (infoTrigger) { + attachFeedInfoPopover( + infoTrigger, + "Results matching your search query." + ); + } + const channelList = document.getElementById("searchChannelList"); const videoList = document.getElementById("searchVideoList"); diff --git a/js/viewManager.js b/js/viewManager.js index c40443a2..210d5556 100644 --- a/js/viewManager.js +++ b/js/viewManager.js @@ -6,6 +6,7 @@ import { getApplication } from "./applicationContext.js"; import { ASSET_VERSION } from "../config/asset-version.js"; import { applyDesignSystemAttributes } from "./designSystem.js"; import { devLogger, userLogger } from "./utils/logger.js"; +import { attachFeedInfoPopover } from "./ui/components/FeedInfoPopover.js"; const TRACKING_SCRIPT_PATTERN = /(?:^|\/)tracking\.js(?:$|\?)/; @@ -92,6 +93,14 @@ export const viewInitRegistry = { if (refreshApp && typeof refreshApp.forceRefreshAllProfiles === "function") { refreshApp.forceRefreshAllProfiles(); } + + const infoTrigger = document.getElementById("recentInfoTrigger"); + if (infoTrigger) { + attachFeedInfoPopover( + infoTrigger, + "Global chronological feed from all relays." + ); + } }, "for-you": () => { initForYouView(); @@ -110,6 +119,13 @@ export const viewInitRegistry = { }, explore: () => { devLogger.log("Explore view loaded."); + const infoTrigger = document.getElementById("exploreInfoTrigger"); + if (infoTrigger) { + attachFeedInfoPopover( + infoTrigger, + "Coming soon." + ); + } }, history: async () => { try { @@ -130,6 +146,14 @@ export const viewInitRegistry = { subscriptions: async () => { devLogger.log("Subscriptions view loaded."); + const infoTrigger = document.getElementById("subscriptionsInfoTrigger"); + if (infoTrigger) { + attachFeedInfoPopover( + infoTrigger, + "Latest videos from channels you follow." + ); + } + const app = getApplication(); if (!app?.pubkey) { const container = document.getElementById("subscriptionsVideoList"); diff --git a/verification/feed_info.png b/verification/feed_info.png deleted file mode 100644 index 7a90fed1..00000000 Binary files a/verification/feed_info.png and /dev/null differ diff --git a/verification/verify_feed_info.py b/verification/verify_feed_info.py deleted file mode 100644 index 92274637..00000000 --- a/verification/verify_feed_info.py +++ /dev/null @@ -1,54 +0,0 @@ -import sys -import os -import time -from playwright.sync_api import sync_playwright - -def verify_feed_info(page): - print("Pre-seeding localStorage...") - page.goto("http://localhost:8000") # Go to root first to set storage origin - page.evaluate("window.localStorage.setItem('hasSeenDisclaimer', 'true')") - - print("Navigating to For You view...") - page.goto("http://localhost:8000/#view=for-you") - - print("Waiting for feed info trigger...") - trigger = page.locator("#feedInfoTrigger") - try: - trigger.wait_for(state="visible", timeout=10000) - except Exception: - page.screenshot(path="verification/debug_not_found.png") - raise - - # Ensure no modals are blocking - # We can try to force click or wait for potential overlays to disappear - # But pre-seeding should handle the main one. - - print("Clicking trigger...") - trigger.click() - - print("Waiting for popover...") - popover = page.locator(".popover-panel") - popover.wait_for(state="visible", timeout=5000) - - text = popover.inner_text() - print(f"Popover text: {text}") - - expected = "Most Recent Video - Disinterests Tags - Watch History + Interests Tags" - if expected not in text: - raise Exception(f"Unexpected text: {text}") - - page.screenshot(path="verification/feed_info.png") - print("Screenshot saved to verification/feed_info.png") - -if __name__ == "__main__": - with sync_playwright() as p: - browser = p.chromium.launch(headless=True) - context = browser.new_context() - page = context.new_page() - try: - verify_feed_info(page) - except Exception as e: - print(f"Error: {e}") - sys.exit(1) - finally: - browser.close() diff --git a/views/channel-profile.html b/views/channel-profile.html index 3d8d42e7..f4b55d4b 100644 --- a/views/channel-profile.html +++ b/views/channel-profile.html @@ -148,7 +148,31 @@
-

Videos by This User

+
+

Videos by This User

+ +
diff --git a/views/explore.html b/views/explore.html index 614149dd..2096436b 100644 --- a/views/explore.html +++ b/views/explore.html @@ -1,5 +1,29 @@
-

Explore

+
+

Explore

+ +

Coming Soon...

diff --git a/views/history.html b/views/history.html index ef2cd972..7bd4d2cd 100644 --- a/views/history.html +++ b/views/history.html @@ -5,7 +5,31 @@ class="flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between" >
-

Watch History

+
+

Watch History

+ +

Review the videos you recently played, grouped by day.

diff --git a/views/most-recent-videos.html b/views/most-recent-videos.html index 178e9843..64f1e161 100644 --- a/views/most-recent-videos.html +++ b/views/most-recent-videos.html @@ -1,7 +1,31 @@
-

Recently Added Videos

+
+

Recently Added Videos

+ +
diff --git a/views/search.html b/views/search.html index cf605c44..6d69e0e5 100644 --- a/views/search.html +++ b/views/search.html @@ -1,11 +1,33 @@
-
+

Search Results

+
diff --git a/views/subscriptions.html b/views/subscriptions.html index 589dc40e..6f52db74 100644 --- a/views/subscriptions.html +++ b/views/subscriptions.html @@ -1,6 +1,30 @@
-

Subscriptions

+
+

Subscriptions

+ +