Skip to content

Commit

Permalink
Merge pull request #1651 from Sefaria/clean_versions
Browse files Browse the repository at this point in the history
feat: Remove version notes from translation selection sidebar.  Keep …
  • Loading branch information
EliezerIsrael committed Sep 21, 2023
2 parents 3fca137 + b8931f6 commit a91d5d0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions static/js/TranslationsBox.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ class TranslationsBox extends Component {
openVersionInSidebar={this.openVersionInSidebar}
viewExtendedNotes={this.props.viewExtendedNotes}
inTranslationBox={true}
showNotes={false}
/>
</>
);
Expand Down
5 changes: 5 additions & 0 deletions static/js/VersionBlock.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,9 @@ class VersionBlock extends Component {
}
}
makeVersionNotes(){
if (!this.props.showNotes) {
return null;
}
if(Sefaria.interfaceLang=="english" && !!this.props.version.versionNotes){
return this.props.version.versionNotes;
}else if(Sefaria.interfaceLang=="hebrew" && !!this.props.version.versionNotesInHebrew){
Expand Down Expand Up @@ -459,6 +462,7 @@ class VersionsBlocksList extends Component{
viewExtendedNotes={this.props.viewExtendedNotes}
isCurrent={this.isVersionCurrent(v)}
inTranslationBox={this.props.inTranslationBox}
showNotes={this.props.showNotes}
/>
))
}
Expand All @@ -480,6 +484,7 @@ VersionsBlocksList.propTypes={
viewExtendedNotes: PropTypes.func,
showLanguageHeaders: PropTypes.bool,
inTranslationBox: PropTypes.bool,
showNotes: PropTypes.bool,
};
VersionsBlocksList.defaultProps = {
displayCurrentVersions: true,
Expand Down

0 comments on commit a91d5d0

Please sign in to comment.