-
Notifications
You must be signed in to change notification settings - Fork 191
Update: open side sheet when many
type relationships
#2290
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
Conversation
ConsoleProject ID: Sites (2)
Note Cursor pagination performs better than offset pagination when loading further pages. |
WalkthroughAdds a boolean prop Possibly related PRs
Suggested reviewers
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 💡 Knowledge Base configuration:
You can enable these sources in your CodeRabbit configuration. 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 1
🧹 Nitpick comments (1)
src/routes/(console)/project-[region]-[project]/databases/database-[database]/table-[table]/spreadsheet.svelte (1)
902-906
: Coalesce count to 0; optional: make the to-many chip open the side sheet
row[columnId]?.length
can yieldundefined
; show 0 for clarity.- UX: consider making the “Items” chip clickable to open the row side sheet directly (discoverability), mirroring the to-one behavior.
- {@const itemsNum = row[columnId]?.length} - Items <Badge - content={itemsNum} + {@const itemsNum = Array.isArray(row[columnId]) ? row[columnId].length : 0} + Items <Badge + content={itemsNum} variant="secondary" size="s" />Optional click-to-open (if desired):
- Items <Badge + <Link.Button + variant="muted" + on:click={() => { + $databaseRowSheetOptions.show = true; + $databaseRowSheetOptions.row = row; + $databaseRowSheetOptions.title = 'Update row'; + }}> + Items <Badge content={itemsNum} variant="secondary" - size="s" /> + size="s" /> + </Link.Button>
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (3)
src/routes/(console)/project-[region]-[project]/databases/database-[database]/table-[table]/rows/cell/edit.svelte
(2 hunks)src/routes/(console)/project-[region]-[project]/databases/database-[database]/table-[table]/rows/store.ts
(1 hunks)src/routes/(console)/project-[region]-[project]/databases/database-[database]/table-[table]/spreadsheet.svelte
(2 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
src/routes/(console)/project-[region]-[project]/databases/database-[database]/table-[table]/rows/store.ts (1)
src/routes/(console)/project-[region]-[project]/databases/database-[database]/table-[table]/store.ts (1)
Columns
(9-18)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: build
- GitHub Check: e2e
🔇 Additional comments (3)
src/routes/(console)/project-[region]-[project]/databases/database-[database]/table-[table]/rows/store.ts (1)
5-16
: Correct child‐side classification implemented
The updated logic now treats onlymanyToMany
as to‐many on the child side andoneToMany
/manyToMany
on the parent side, which aligns with all downstream usages of isRelationshipToMany.src/routes/(console)/project-[region]-[project]/databases/database-[database]/table-[table]/rows/cell/edit.svelte (1)
13-21
: Prop addition and typing look good
noInlineEdit?: boolean
with defaultfalse
preserves backward compatibility.src/routes/(console)/project-[region]-[project]/databases/database-[database]/table-[table]/spreadsheet.svelte (1)
955-961
: noInlineEdit binding depends on corrected to-many detectionAfter fixing
isRelationshipToMany
child-side logic, this will correctly keep inline editing for many-to-one and route to side sheet for one-to-many/many-to-many.Please sanity-check:
- Parent one-to-many: double-click cell opens row side sheet.
- Child many-to-one: inline editor opens as before.
- Many-to-many: row side sheet opens.
...project-[region]-[project]/databases/database-[database]/table-[table]/rows/cell/edit.svelte
Show resolved
Hide resolved
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.
Actionable comments posted: 1
🧹 Nitpick comments (1)
src/routes/(console)/project-[region]-[project]/databases/database-[database]/table-[table]/spreadsheet.svelte (1)
908-911
: Avoid “undefined” badge; default count to 0 (and consider singular/plural later).If
row[columnId]
is null,itemsNum
isundefined
. Default to 0 to prevent odd UI.-Items <Badge - content={itemsNum} +Items <Badge + content={itemsNum ?? 0} variant="secondary" size="s" />
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
src/routes/(console)/project-[region]-[project]/databases/database-[database]/table-[table]/spreadsheet.svelte
(3 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: build
- GitHub Check: e2e
🔇 Additional comments (2)
src/routes/(console)/project-[region]-[project]/databases/database-[database]/table-[table]/spreadsheet.svelte (2)
961-961
: LGTM: Disabling inline edit for to-many via noInlineEdit.This aligns with the new side-sheet flow and avoids confusing inline editors on collection relationships.
471-475
: RefineopenSideSheetForRelationsToMany
and widenrows
type
- Rename the first parameter to
relatedTableId
to avoid shadowing the outertableId
.- Allow
rows
to bestring[]
as well asModels.Row[]
: update the function signature in spreadsheet.svelte and therows
type in store.ts tostring[] | Models.Row[]
.
...e)/project-[region]-[project]/databases/database-[database]/table-[table]/spreadsheet.svelte
Show resolved
Hide resolved
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.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (2)
src/routes/(console)/project-[region]-[project]/databases/database-[database]/table-[table]/rows/columns/types/integer.svelte
(1 hunks)src/routes/(console)/project-[region]-[project]/databases/database-[database]/table-[table]/spreadsheet.svelte
(3 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- src/routes/(console)/project-[region]-[project]/databases/database-[database]/table-[table]/spreadsheet.svelte
What does this PR do?
Open side sheet when many relations -
Screen.Recording.2025-08-31.at.6.01.08.PM.mov
Test Plan
(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work.)
Related PRs and Issues
(If this PR is related to any other PR or resolves any issue or related to any issue link all related PR and issues here.)
Have you read the Contributing Guidelines on issues?
(Write your answer here.)
Summary by CodeRabbit
New Features
Changes