-
-
Notifications
You must be signed in to change notification settings - Fork 278
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/sc 27825/add to sheet2 #2179
base: feature/sc-27327/source-click-should-open-in-new-tab2
Are you sure you want to change the base?
Feature/sc 27825/add to sheet2 #2179
Conversation
…e/sc-27825/add-to-sheet
…e/sc-27825/add-to-sheet
…e/sc-27825/add-to-sheet
…e/sc-27825/add-to-sheet
…e/sc-27825/add-to-sheet
This reverts commit f3d7ed5.
…s so I can style it appropriately
…e/sc-27825/add-to-sheet
…e/sc-27825/add-to-sheet
…-27825/add-to-sheet
…e/sc-27825/add-to-sheet
…e/sc-27825/add-to-sheet
…e/sc-27825/add-to-sheet
…e/sc-27825/add-to-sheet
…re/sc-27825/add-to-sheet2
…re/sc-27825/add-to-sheet2
…re/sc-27825/add-to-sheet2
…re/sc-27825/add-to-sheet2
…re/sc-27825/add-to-sheet2
Feature/sc 27826/styling
data-node={this.props.source.node} | ||
aria-label={"Click to see connections to this source"} | ||
tabIndex="0" | ||
onKeyPress={function(e) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like this function is duplicated a few times, can we re-use it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a prop handleKeyPress to deal with this case
static/js/sheets/SheetContent.jsx
Outdated
let ComponentToRender; | ||
if ("ref" in source) { | ||
const highlightedRef = this.props.highlightedRefsInSheet ? Sefaria.normRefList(this.props.highlightedRefsInSheet) : null; | ||
highlighted = highlightedNode ? highlightedNode === source.node : highlightedRef ? Sefaria.refContains(source.ref, highlightedRef) : false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is dufficult to follow
…re/sc-27825/add-to-sheet2
…into feature/sc-27825/add-to-sheet2
Description
The feature this PR implements is that it attaches an "Add to Sheet" button to every segment of the sheet. The button is hidden, but when the user clicks on the segment, the "Add to Sheet" button appears. After the user clicks the "Add to Sheet" button, a modal appears allowing the user to select which of the user's sheets to add the segment to.
Code Changes