cleaner selection get methods#199
Conversation
| * tile until we find the nth match. | ||
| * | ||
| * @param i the index of the row to get. If less than zero, will return | ||
| * @param returnQid if true, returns a tuple of [tile index, row index] instead of the row data |
There was a problem hiding this comment.
The JSDoc for the get method still references the returnQid parameter which has been removed from this method. Since this functionality has been split into the separate getQid method, this parameter description should be removed from the get method's documentation to accurately reflect the current implementation.
Spotted by Diamond
Is this helpful? React 👍 or 👎 to let us know.
There was a problem hiding this comment.
Caution
Changes requested ❌
Reviewed everything up to 5b0f5a9 in 1 minute and 42 seconds. Click for details.
- Reviewed
69lines of code in1files - Skipped
0files when reviewing. - Skipped posting
3draft comments. View those below. - Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. src/selection.ts:820
- Draft comment:
Nice separation of the API by splitting get() and getQid() into two distinct methods. This improves readability and adheres to DRY principles. - Reason this comment was not posted:
Confidence changes required:0%<= threshold70%None
2. src/selection.ts:828
- Draft comment:
Refactoring the shared logic into the private getBase() method is a good move. Note the improved variable naming (using 'rix' for the row index) for clarity. Consider whether the linear scan through tiles might become a performance bottleneck for many tiles and if a cached cumulative count or binary search could help. - Reason this comment was not posted:
Confidence changes required:33%<= threshold70%None
3. src/selection.ts:847
- Draft comment:
The caching pattern using 'cachedWhiches.get([relevantTile])' relies on wrapping the tile in an array. Ensure that FifoTupleMap is intended to use arrays as keys; if not, consider using the selection tile object directly to avoid potential key-matching issues. - Reason this comment was not posted:
Confidence changes required:66%<= threshold70%None
Workflow ID: wflow_kvCPXJIoXWtbU6aR
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
5b0f5a9 to
8489ba4
Compare
There was a problem hiding this comment.
Important
Looks good to me! 👍
Reviewed 8489ba4 in 1 minute and 6 seconds. Click for details.
- Reviewed
101lines of code in1files - Skipped
0files when reviewing. - Skipped posting
2draft comments. View those below. - Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. src/selection.ts:792
- Draft comment:
The JSDoc for the newgetmethod still mentions areturnQidparameter, even though the method no longer accepts it. Please update the comment so it only documents thatgetreturns a row, and thatgetQidreturns the [tile index, row index] tuple. - Reason this comment was not posted:
Comment was not on a location in the diff, so it can't be submitted as a review comment.
2. src/selection.ts:1110
- Draft comment:
ThegetandgetQidmethods in SortedDataSelection duplicate the same error‐checking pattern as in DataSelection. If their behavior is identical (aside from the different getBase implementations), consider reusing the inherited versions to reduce duplication or add a brief comment explaining why they must be redefined. - Reason this comment was not posted:
Comment was not on a location in the diff, so it can't be submitted as a review comment.
Workflow ID: wflow_aJG4rWxUuSZO4Obk
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
| * tile until we find the nth match. | ||
| * | ||
| * @param i the index of the row to get. If less than zero, will return | ||
| * @param returnQid if true, returns a tuple of [tile index, row index] instead of the row data |
There was a problem hiding this comment.
| * @param returnQid if true, returns a tuple of [tile index, row index] instead of the row data |
Merge activity
|

Split the new qid-getting method back off
Important
Refactor
get()method inDataSelectionandSortedDataSelectionby splitting logic intoget(),getQid(), andgetBase()for improved clarity.get()method inDataSelectionandSortedDataSelectionintoget(),getQid(), andgetBase()for clarity.get()now callsgetBase()withreturnQidset tofalse.getQid()added to return a tuple of[tile index, row index]by callinggetBase()withreturnQidset totrue.getBase()contains the core logic for retrieving elements based on index.This description was created by
for 8489ba4. You can customize this summary. It will automatically update as commits are pushed.