Sefaria-Project
Sefaria-Project copied to clipboard
Feature/sc 26953/frontend for sheets topics component
Description
This PR implements the core functionality of the Sheets Homepage -- displaying the upcoming parasha, upcoming holiday, and the first level of the topics TOC.
Code Changes
- There are no changes to TopicsPage.jsx -- I had originally made a change there but realized it wasn't necessary, but there is simply spacing differences that remain that make it appear in this PR.
- The first level of the topics TOC is implemented by the component SheetsTopicsTOC. ReaderApp's setNavigationTopic is passed down the tree to this component so that it can set menuOpen to "topics" to avoid having to call the server in case the topic is in cache.
- The parasha and holiday are implemented by the component SheetsCalendar, which gets its data by calling Sefaria.getUpcomingDay(day) where day can be 'holiday' or 'parasha'. ReaderApp's setTopic is passed down the tree to this component so that it can set menuOpen to "topics" to avoid having to call the server in case the topic is in cache.
- Mobile design is different than desktop and so
multiPanelis passed down to SheetsHomePage to handle the different case. - All topics displayed -- holiday, parasha, and the topics TOC -- are all displayed using the Card component.