From 7e17efbeb5e4713c58b4603f8d96b351dd2d0272 Mon Sep 17 00:00:00 2001 From: Akiva Berger Date: Tue, 25 Jul 2023 12:41:44 +0300 Subject: [PATCH 001/239] feat(editor): add button on hover --- static/css/s2.css | 1 + static/js/Editor.jsx | 10 ++++++++-- static/test/linker_test.html | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/static/css/s2.css b/static/css/s2.css index 1f147ac52c..0d48648d9a 100644 --- a/static/css/s2.css +++ b/static/css/s2.css @@ -9500,6 +9500,7 @@ span.purim-emoji img{ position: relative; pointer-events:none; background-color: transparent; + margin-left: 50px; } .editorAddInterface:before { content: ""; diff --git a/static/js/Editor.jsx b/static/js/Editor.jsx index f5cba6c6a8..344ec63835 100644 --- a/static/js/Editor.jsx +++ b/static/js/Editor.jsx @@ -1062,12 +1062,14 @@ const AddInterface = ({ attributes, children, element }) => { const Element = (props) => { const { attributes, children, element } = props; + const [isHovering, setIsHovering] = useState(false); const sheetItemClasses = { sheetItem: 1, empty: !(Node.string(element)), highlight: (useSlate().highlightedNode === (element.node ? element.node.toString() : null)) }; + switch (element.type) { case 'spacer': const spacerSelected = useSelected(); @@ -1077,8 +1079,12 @@ const Element = (props) => { empty: 1 } return ( -
- {spacerSelected && document.getSelection().isCollapsed ? : <>{children}} +
setIsHovering(true)} + onMouseLeave={() => setIsHovering(false)} + {...attributes}> + {isHovering && } + {children}
); case 'SheetSource': diff --git a/static/test/linker_test.html b/static/test/linker_test.html index 0b318e8040..49f49e0515 100644 --- a/static/test/linker_test.html +++ b/static/test/linker_test.html @@ -96,7 +96,7 @@

השתדרות ד פועל

Hebrew Ranges

שמות, כ"ד, יג - יד

-

שמות, כ"ד, יג-יד


 +

שמות, כ"ד, יג-יד

במדבר, כ"ז, טו - כג

בראשית א לא - ב ו

(en dash) בראשית א לא – ב ו

From 7bdef7e0effc52b3cbe0073808471662b7b63de7 Mon Sep 17 00:00:00 2001 From: Skyler Cohen Date: Thu, 14 Mar 2024 14:34:19 -0400 Subject: [PATCH 002/239] feat(unbounce): Add embed code for Unbounce --- templates/base.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/templates/base.html b/templates/base.html index 71a90be76e..e5884b31f0 100644 --- a/templates/base.html +++ b/templates/base.html @@ -150,6 +150,8 @@ {% endif %} + + From a5e68c986bb57830942ed77106dec37475204cec Mon Sep 17 00:00:00 2001 From: stevekaplan123 Date: Sun, 2 Jun 2024 14:35:06 +0300 Subject: [PATCH 003/239] chore: started SheetsTopics --- static/css/static.css | 4 ++++ static/js/SheetsHomePage.jsx | 18 ++++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/static/css/static.css b/static/css/static.css index 3408c52dd6..9d0355d263 100644 --- a/static/css/static.css +++ b/static/css/static.css @@ -5,6 +5,10 @@ display: flex; flex-direction: row; } +#sheetsHomePage { + display: flex; + flex-direction: row; +} .inApp #staticContentWrapper { display: none; } diff --git a/static/js/SheetsHomePage.jsx b/static/js/SheetsHomePage.jsx index 24fcd196e9..46094eaf56 100644 --- a/static/js/SheetsHomePage.jsx +++ b/static/js/SheetsHomePage.jsx @@ -9,9 +9,27 @@ const SheetsHeroBanner = () => {
; } +const SheetsTopicsTOC = () => { + return "TOC placeholder" +} + +const SheetsTopicsCalendar = () => { + return "Calendar Placeholder" +} + +const SheetsTopics = () => { + return
+} +const SheetsSidebar = () => { + return "Sidebar Placeholder" +} const SheetsHomePage = () => { return
+
+ + +
} export default SheetsHomePage; \ No newline at end of file From 43f712b8f57604cb920f288dd45dee7f6a6370c2 Mon Sep 17 00:00:00 2001 From: stevekaplan123 Date: Sun, 2 Jun 2024 16:56:25 +0300 Subject: [PATCH 004/239] chore: first pass at SheetsTopicTOC --- static/js/SheetsHomePage.jsx | 12 +----------- static/js/SheetsTopics.jsx | 24 ++++++++++++++++++++++++ static/js/TopicsPage.jsx | 14 +++++++++----- 3 files changed, 34 insertions(+), 16 deletions(-) create mode 100644 static/js/SheetsTopics.jsx diff --git a/static/js/SheetsHomePage.jsx b/static/js/SheetsHomePage.jsx index 46094eaf56..0e45458806 100644 --- a/static/js/SheetsHomePage.jsx +++ b/static/js/SheetsHomePage.jsx @@ -1,4 +1,5 @@ import React from 'react'; +import SheetsTopics from "./SheetsTopics"; const SheetsHeroBanner = () => { return
; } -const SheetsTopicsTOC = () => { - return "TOC placeholder" -} - -const SheetsTopicsCalendar = () => { - return "Calendar Placeholder" -} - -const SheetsTopics = () => { - return
-} const SheetsSidebar = () => { return "Sidebar Placeholder" } diff --git a/static/js/SheetsTopics.jsx b/static/js/SheetsTopics.jsx new file mode 100644 index 0000000000..e2f6d65608 --- /dev/null +++ b/static/js/SheetsTopics.jsx @@ -0,0 +1,24 @@ +import { ResponsiveNBox } from "./Misc"; +import React from "react"; +import { getTopicTOCListings } from "./TopicsPage"; + +const SheetsTopicsTOC = () => { + const openCat = () => {alert("Open")} + const categoryListings = getTopicTOCListings(openCat); + return ( +
+
Browse by Topic
+ +
+ ); +} + +const SheetsTopicsCalendar = () => { + return "Calendar Placeholder" +} + +const SheetsTopics = () => { + return
+} + +export default SheetsTopics; \ No newline at end of file diff --git a/static/js/TopicsPage.jsx b/static/js/TopicsPage.jsx index b79ab2c52c..b4b7e598a4 100644 --- a/static/js/TopicsPage.jsx +++ b/static/js/TopicsPage.jsx @@ -12,10 +12,8 @@ import Footer from './Footer'; import {CategoryHeader} from "./Misc"; import Component from 'react-class'; -// The root topics page listing topic categories to browse -const TopicsPage = ({setNavTopic, multiPanel, initialWidth}) => { - let categoryListings = Sefaria.topic_toc.map(cat => { - const openCat = e => {e.preventDefault(); setNavTopic(cat.slug, {en: cat.en, he: cat.he})}; +const getTopicTOCListings = (openCat) => { + return Sefaria.topic_toc.map(cat => { return (
@@ -27,6 +25,12 @@ const TopicsPage = ({setNavTopic, multiPanel, initialWidth}) => {
); }); +} + +// The root topics page listing topic categories to browse +const TopicsPage = ({setNavTopic, multiPanel, initialWidth}) => { + const openCat = e => {e.preventDefault(); setNavTopic(cat.slug, {en: cat.en, he: cat.he})}; + let categoryListings = getTopicTOCListings(openCat); const letter = Sefaria.interfaceLang === "hebrew" ? "א" : "a"; categoryListings.push(
@@ -78,4 +82,4 @@ const TopicsPage = ({setNavTopic, multiPanel, initialWidth}) => { }; -export default TopicsPage; \ No newline at end of file +export { TopicsPage, getTopicTOCListings }; \ No newline at end of file From fa52c50667b8dca0840b48ee002e563eb8d42340 Mon Sep 17 00:00:00 2001 From: stevekaplan123 Date: Sun, 2 Jun 2024 17:39:24 +0300 Subject: [PATCH 005/239] chore: first pass for SheetsSidebar --- static/css/static.css | 6 ++++++ static/js/Misc.jsx | 13 +++++++++++-- static/js/NavSidebar.jsx | 33 +++++++++++++++++++++++++++++++-- static/js/SheetsHomePage.jsx | 12 ++++++++++++ templates/static/sheets.html | 2 +- 5 files changed, 61 insertions(+), 5 deletions(-) diff --git a/static/css/static.css b/static/css/static.css index 3408c52dd6..eaf1425702 100644 --- a/static/css/static.css +++ b/static/css/static.css @@ -5,6 +5,12 @@ display: flex; flex-direction: row; } +#sheetsButton { + display: none; +} +#sheetsLandingPage #sheetsButton { + display: inline; +} .inApp #staticContentWrapper { display: none; } diff --git a/static/js/Misc.jsx b/static/js/Misc.jsx index 409e0f4558..74f3102beb 100644 --- a/static/js/Misc.jsx +++ b/static/js/Misc.jsx @@ -1114,7 +1114,15 @@ const AllAdminButtons = ({ buttonOptions, buttonIDs, adminClasses }) => { ); }; -const CategoryHeader = ({children, type, data = [], toggleButtonIDs = ["subcategory", "edit"], actionButtons = {}}) => { + +const CreateSheetsButton = () => { + return + make a sheet icon + Create + +} + +const CategoryHeader = ({children, type, data = [], toggleButtonIDs = ["subcategory", "edit"], actionButtons = {}}) => { /* Provides an interface for using admin tools. `type` is 'sources', 'cats', 'books' or 'topics' @@ -3382,5 +3390,6 @@ export { requestWithCallBack, OnInView, TopicPictureUploader, - ImageWithCaption + ImageWithCaption, + CreateSheetsButton }; diff --git a/static/js/NavSidebar.jsx b/static/js/NavSidebar.jsx index 1aaadeaee4..61b6c03adf 100644 --- a/static/js/NavSidebar.jsx +++ b/static/js/NavSidebar.jsx @@ -1,7 +1,7 @@ import React, { useState, useEffect } from 'react'; import classNames from 'classnames'; import Sefaria from './sefaria/sefaria'; -import {AppStoreButton, DonateLink, EnglishText, HebrewText, ImageWithCaption} from './Misc' +import {AppStoreButton, CreateSheetsButton, DonateLink, EnglishText, HebrewText, ImageWithCaption} from './Misc' import {NewsletterSignUpForm} from "./NewsletterSignUpForm"; import {InterfaceText, ProfileListing, Dropdown} from './Misc'; import { Promotions } from './Promotions' @@ -44,6 +44,8 @@ const Modules = ({type, props}) => { "GetTheApp": GetTheApp, "StayConnected": StayConnected, "AboutLearningSchedules": AboutLearningSchedules, + "CreateASheet": CreateASheet, + "WhatIsASourceSheet": WhatIsASourceSheet, "AboutTranslatedText": AboutTranslatedText, "AboutCollections": AboutCollections, "ExploreCollections": ExploreCollections, @@ -691,7 +693,34 @@ const StayConnected = () => { // TODO: remove? looks like we are not using this ); }; - +const WhatIsASourceSheet = () => ( + + What is a Source Sheet? + + + Lorem ipsum + Get Started + + + Lorem ipsum + Get Started + + + +); +const CreateASheet = () => ( + + Create A Sheet + + + Mix and match sources along with outside sources, comments, images, and videos. + + + + + + +); const AboutLearningSchedules = () => ( Learning Schedules diff --git a/static/js/SheetsHomePage.jsx b/static/js/SheetsHomePage.jsx index 24fcd196e9..a84996eb53 100644 --- a/static/js/SheetsHomePage.jsx +++ b/static/js/SheetsHomePage.jsx @@ -1,4 +1,5 @@ import React from 'react'; +import {NavSidebar} from "./NavSidebar"; const SheetsHeroBanner = () => { return
; } +const SheetsSidebar = () => { + const sidebarModules = [ + {type: "CreateASheet"}, + {type: "WhatIsASourceSheet"}, + ]; + return +} + + + const SheetsHomePage = () => { return
+
} export default SheetsHomePage; \ No newline at end of file diff --git a/templates/static/sheets.html b/templates/static/sheets.html index 74b1b041e9..4271a1990f 100644 --- a/templates/static/sheets.html +++ b/templates/static/sheets.html @@ -19,7 +19,7 @@ {% endblock %} {% block content %} -
+

Loading...

From 4a98e94ddef081f94f7d9c8e34a9ce07a6e67f43 Mon Sep 17 00:00:00 2001 From: stevekaplan123 Date: Mon, 3 Jun 2024 09:34:11 +0300 Subject: [PATCH 006/239] chore: sheetsLandingPage resourcesLink button CSS --- static/css/static.css | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/static/css/static.css b/static/css/static.css index eaf1425702..ae090216da 100644 --- a/static/css/static.css +++ b/static/css/static.css @@ -11,6 +11,11 @@ #sheetsLandingPage #sheetsButton { display: inline; } +#sheetsLandingPage .resourcesLink { + display: block; + width: 30%; + margin-top: 15px; +} .inApp #staticContentWrapper { display: none; } From 2f7ac644aeaf539f9ed0a71150ab2357b1b233d7 Mon Sep 17 00:00:00 2001 From: stevekaplan123 Date: Mon, 3 Jun 2024 13:51:09 +0300 Subject: [PATCH 007/239] chore: flexbox for sheets page --- static/css/s2.css | 4 ++++ static/js/SheetsHomePage.jsx | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/static/css/s2.css b/static/css/s2.css index 832e49436f..1cbb7ec5a2 100644 --- a/static/css/s2.css +++ b/static/css/s2.css @@ -10057,6 +10057,10 @@ span.purim-emoji img{ line-height: 18px; top: 227px; } +#sheetsFlexbox { + display: flex; + justify-content: space-around; +} .readerPanel.hebrew .sheetContent .sheetItem.segment .sourceContentText.outsideBiText.en { display: none; } diff --git a/static/js/SheetsHomePage.jsx b/static/js/SheetsHomePage.jsx index b50567e380..7296e7887f 100644 --- a/static/js/SheetsHomePage.jsx +++ b/static/js/SheetsHomePage.jsx @@ -20,7 +20,7 @@ const SheetsSidebar = () => { const SheetsHomePage = () => { return
-
+
From 19e86b1fe1b0eaa41fc40fb8ea404acba2cb10dc Mon Sep 17 00:00:00 2001 From: stevekaplan123 Date: Mon, 3 Jun 2024 14:16:11 +0300 Subject: [PATCH 008/239] fix(Sheets Home Page): allow scroll --- static/css/s2.css | 1 + static/js/SheetsHomePage.jsx | 17 +++++++++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/static/css/s2.css b/static/css/s2.css index 1cbb7ec5a2..18198b18a1 100644 --- a/static/css/s2.css +++ b/static/css/s2.css @@ -10011,6 +10011,7 @@ span.purim-emoji img{ } #aboutCover { + margin-top: -90px height: 440px; padding: 180px 0; background-color: #ADA99B; diff --git a/static/js/SheetsHomePage.jsx b/static/js/SheetsHomePage.jsx index 7296e7887f..97b1df1469 100644 --- a/static/js/SheetsHomePage.jsx +++ b/static/js/SheetsHomePage.jsx @@ -1,5 +1,8 @@ import React from 'react'; import SheetsTopics from "./SheetsTopics"; +import Footer from "./Footer"; +import {InterfaceText, ResponsiveNBox} from "./Misc"; +import {NavSidebar} from "./NavSidebar"; const SheetsHeroBanner = () => { return
); diff --git a/static/js/SearchPage.jsx b/static/js/SearchPage.jsx index 438b2bc3c9..9a1511efc7 100644 --- a/static/js/SearchPage.jsx +++ b/static/js/SearchPage.jsx @@ -4,7 +4,6 @@ import $ from './sefaria/sefariaJquery'; import Sefaria from './sefaria/sefaria'; import classNames from 'classnames'; import PropTypes from 'prop-types'; -import Footer from './Footer'; import ComparePanelHeader from './ComparePanelHeader'; import SearchResultList from './SearchResultList'; import SearchFilters from './SearchFilters'; @@ -85,7 +84,6 @@ class SearchPage extends Component {
: null }
- { this.props.panelsOpen === 1 ?
: null }
); diff --git a/static/js/TextCategoryPage.jsx b/static/js/TextCategoryPage.jsx index c8bcb4b9bb..fbaf26c997 100644 --- a/static/js/TextCategoryPage.jsx +++ b/static/js/TextCategoryPage.jsx @@ -4,7 +4,6 @@ import PropTypes from 'prop-types'; import Sefaria from './sefaria/sefaria'; import { ContentLanguageContext } from './context'; import { NavSidebar } from './NavSidebar'; -import Footer from './Footer'; import ComparePanelHeader from './ComparePanelHeader'; import { CategoryAttribution, @@ -77,7 +76,6 @@ const TextCategoryPage = ({category, categories, setCategories, toggleLanguage, heCatTitle={heCatTitle} /> ) : null; - const footer = compare ? null :
; const navMenuClasses = classNames({readerNavCategoryMenu: 1, readerNavMenu: 1, noLangToggleInHebrew: 1, compare: compare}); return (
@@ -103,7 +101,6 @@ const TextCategoryPage = ({category, categories, setCategories, toggleLanguage,
{!compare ? : null}
- {footer} ); diff --git a/static/js/TextsPage.jsx b/static/js/TextsPage.jsx index 53ef228dfb..1fcc4490c7 100644 --- a/static/js/TextsPage.jsx +++ b/static/js/TextsPage.jsx @@ -5,7 +5,6 @@ import Sefaria from './sefaria/sefaria'; import $ from './sefaria/sefariaJquery'; import { NavSidebar, Modules, RecentlyViewed } from './NavSidebar'; import TextCategoryPage from './TextCategoryPage'; -import Footer from './Footer'; import ComparePanelHeader from './ComparePanelHeader'; import { TextBlockLink, @@ -97,7 +96,6 @@ const TextsPage = ({categories, settings, setCategories, onCompareBack, openSear {type: "Resources"}, ]; - const footer = compare ? null :