Attribute Select - handle {[table]}#514
Merged
Merged
Conversation
* Introduced functions to handle table rows and retrieve block UIDs from table cells. * Enhanced event management for attribute buttons to prevent default actions and improve user interaction. * Refactored attribute button rendering to include new event handlers for better focus and click behavior. * Updated various function calls to maintain consistency and prevent potential errors. * Improved code readability and maintainability with structured event handling.
This comment was marked as resolved.
This comment was marked as resolved.
Collaborator
Author
|
@coderabbitai full review |
✅ Actions performedFull review triggered. |
mdroidian
commented
May 19, 2026
| const getAttributeBlockUidFromTarget = (target: HTMLElement): string => { | ||
| if (target.closest(".rm-block-ref")) return getBlockUidFromTarget(target); | ||
|
|
||
| const tableCellUid = getTableCellBlockUidFromTarget(target); |
Collaborator
Author
There was a problem hiding this comment.
Should move this to roamjs-components getBlockUidFromTarget
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/features/attributeSelect.tsx`:
- Around line 109-135: getTableCellBlockUidFromTarget mixes undefined and
empty-string sentinels which lets an empty string slip past the caller's check
in getAttributeBlockUidFromTarget; change getTableCellBlockUidFromTarget to
consistently return undefined when no valid uid is found (update its return type
to string | undefined and replace all "" returns with undefined), and then
update getAttributeBlockUidFromTarget to treat a missing table result by
checking for undefined (or falsy) and falling back to getBlockUidFromTarget;
ensure callers that relied on "" are adjusted to handle undefined.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 4fce43e9-cbbb-4d96-be87-14d431924020
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (2)
package.jsonsrc/features/attributeSelect.tsx
Collaborator
Author
|
@coderabbitai full review |
✅ Actions performedFull review triggered. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://www.loom.com/share/a5e5b42301db4bbeb02dfc7fed8c12e8
Summary by CodeRabbit
Bug Fixes
Chores