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 165eb55e..a762f0f5 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(); @@ -109,6 +110,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/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 @@
Coming Soon...
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 @@