diff --git a/static/js/NavSidebar.jsx b/static/js/NavSidebar.jsx index 38d0355549..920bab3535 100644 --- a/static/js/NavSidebar.jsx +++ b/static/js/NavSidebar.jsx @@ -590,14 +590,22 @@ const AboutTopics = ({hideTitle}) => ( const TrendingTopics = () => ( - - Trending Topics - {Sefaria.trendingTopics.map((topic, i) => -
- -
- )} -
+
+ + Trending Topics + {Sefaria.trendingTopics.map((topic, i) => +
+ + + +
+ )} +
+
); diff --git a/static/js/ReaderPanel.jsx b/static/js/ReaderPanel.jsx index 8197774615..d87d136218 100644 --- a/static/js/ReaderPanel.jsx +++ b/static/js/ReaderPanel.jsx @@ -618,15 +618,21 @@ class ReaderPanel extends Component { highlighted.click(); } getPanelType() { - const {menuOpen, tab} = this.state; + const {menuOpen, tab, navigationTopic, navigationTopicCategory} = this.state; if (menuOpen === "topics") { - return `${menuOpen}_${tab}`; + if (navigationTopicCategory) { + return "Topic Navigation"; + } else if (navigationTopic) { + return `${menuOpen}_${tab}`; + } else { + return "Topic Landing"; + } } } getPanelName() { const {menuOpen, navigationTopic, navigationTopicCategory} = this.state; if (menuOpen === "topics") { - return navigationTopicCategory || navigationTopic; + return navigationTopicCategory || navigationTopic || "Explore by Topic"; } } getPanelNumber() { diff --git a/static/js/TopicPage.jsx b/static/js/TopicPage.jsx index 198b974f22..b4455b794f 100644 --- a/static/js/TopicPage.jsx +++ b/static/js/TopicPage.jsx @@ -247,6 +247,9 @@ const TopicCategory = ({topic, topicTitle, setTopic, setNavTopic, compare, initi return (
@@ -272,10 +275,14 @@ const TopicCategory = ({topic, topicTitle, setTopic, setNavTopic, compare, initi } return ( -
+
-
+

@@ -546,11 +553,15 @@ const PortalNavSideBar = ({portal, entriesToDisplayList}) => { ) }; +const getPanelCategory = (slug) => { + return Sefaria.topicTocCategories(slug)?.map(({slug}) => slug)?.join('|'); +} + const getTopicPageAnalyticsData = (slug, langPref) => { return { project: "topics", content_lang: langPref || "bilingual", - panel_category: Sefaria.topicTocCategories(slug)?.map(({slug}) => slug)?.join('|'), + panel_category: getPanelCategory(slug), }; }; diff --git a/static/js/TopicsPage.jsx b/static/js/TopicsPage.jsx index c1b2b4fdfd..2a9e4d0c2d 100644 --- a/static/js/TopicsPage.jsx +++ b/static/js/TopicsPage.jsx @@ -18,7 +18,14 @@ const TopicsPage = ({setNavTopic, multiPanel, initialWidth}) => { const openCat = e => {e.preventDefault(); setNavTopic(cat.slug, {en: cat.en, he: cat.he})}; return (
- +
@@ -57,10 +64,15 @@ const TopicsPage = ({setNavTopic, multiPanel, initialWidth}) => { return ( -
+
-
+

Explore by Topic

diff --git a/static/js/analyticsEventTracker.js b/static/js/analyticsEventTracker.js index 5e0a43b925..3a4b622043 100644 --- a/static/js/analyticsEventTracker.js +++ b/static/js/analyticsEventTracker.js @@ -3,7 +3,7 @@ const AnalyticsEventTracker = (function() { 'project', 'panel_type', 'panel_number', 'item_id', 'version', 'content_lang', 'content_id', 'content_type', 'panel_name', 'panel_category', 'position', 'ai', 'text', 'experiment', 'feature_name', 'from', 'to', 'action', 'engagement_value', - 'engagement_type', 'logged_in', 'site_lang', 'traffic_type', 'promotion_name' + 'engagement_type', 'logged_in', 'site_lang', 'traffic_type', 'promotion_name', 'link_type', ]); const EVENT_ATTR = 'data-anl-event'; const FIELD_ATTR_PREFIX = 'data-anl-'; diff --git a/static/js/sefaria/sefaria.js b/static/js/sefaria/sefaria.js index aae230fedd..520fde8d89 100644 --- a/static/js/sefaria/sefaria.js +++ b/static/js/sefaria/sefaria.js @@ -2785,8 +2785,8 @@ _media: {}, this._topicTocCategory = this.topic_toc.reduce(this._initTopicTocCategoryReducer, {}); }, _initTopicTocCategoryReducer: function(a,c) { + a[c.slug] = c.parents; if (!c.children) { - a[c.slug] = c.parents; return a; } if (!c.parents) {