Sefaria / Sefaria-Project

New Interfaces for Jewish Texts
https://www.sefaria.org
654 stars 268 forks source link

Feature/sc 28027/re factor searchresultslist #1943

Closed stevekaplan123 closed 2 months ago

stevekaplan123 commented 3 months ago

In SearchResultList, the prop types are no longer an array but rather a string that is either 'text' or 'sheet'. Many state variables in SearchResultList were dictionaries with keys 'text' and 'sheet' and so were refactored as well. There is also no longer a prop tab and SearchTabs and updateTab have been removed. In SearchPage and SearchResultList, textSearchState and sheetSearchState are collapsed into one searchState but I did not do this throughout the app as I felt this PR was already big enough. I created a new story to address collapsing textSearchState and sheetSearchState into searchState throughout the app.