fix: tooltips and Correct relationship text on many side#2875
fix: tooltips and Correct relationship text on many side#2875HarshMN2345 merged 2 commits intomainfrom
Conversation
Console (appwrite/console)Project ID: Tip GraphQL API works alongside REST and WebSocket protocols |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review infoConfiguration used: Organization UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughThis pull request adjusts tooltip presentation across multiple console pages by wrapping tooltip text content in a div styled with Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
src/routes/(console)/project-[region]-[project]/databases/database-[database]/table-[table]/columns/relationship.svelte (1)
232-233: Consider movingisManySideto the<script>section.The component uses
$:reactive declarations throughout. DefiningisManySideas{@const}in the template is valid but inconsistent. Placing it in<script>aligns with the file's existing pattern and makes it easier to reuse or test.♻️ Proposed refactor
In
<script lang="ts">:+ $: isManySide = + data.side === 'child' && ['oneToMany', 'manyToOne'].includes(data.relationType);In the template, remove the
{@const}line and useisManySidedirectly:- {`@const` isManySide = - data.side === 'child' && ['oneToMany', 'manyToOne'].includes(data.relationType)} <div> {`#if` isManySide}🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/routes/`(console)/project-[region]-[project]/databases/database-[database]/table-[table]/columns/relationship.svelte around lines 232 - 233, Move the template-local {`@const` isManySide = ...} into the component script: add a reactive declaration in <script lang="ts"> such as "$: isManySide = data.side === 'child' && ['oneToMany','manyToOne'].includes(data.relationType)" so it updates with reactive data, remove the {`@const` isManySide ...} line from the template, and update template usages to reference the script variable isManySide directly; reference the existing symbols data.side, data.relationType and isManySide when making the change.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In
`@src/routes/`(console)/project-[region]-[project]/databases/database-[database]/table-[table]/columns/relationship.svelte:
- Around line 232-261: The current isManySide boolean causes the "many" wording
to render for cases where data.side === 'child' AND relationType is 'manyToOne',
producing inverted semantics; change the condition to only treat the child as
the many side for oneToMany relationships (e.g., set isManySide to data.side ===
'child' && data.relationType === 'oneToMany' or use
['oneToMany'].includes(data.relationType)); update the conditional branch that
renders the two paragraphs (which uses camelize(currentTable.name) and
camelize(data.key)) to rely on this narrowed isManySide so that 'manyToOne +
child' falls into the else branch and text reflects the correct one/many roles.
---
Nitpick comments:
In
`@src/routes/`(console)/project-[region]-[project]/databases/database-[database]/table-[table]/columns/relationship.svelte:
- Around line 232-233: Move the template-local {`@const` isManySide = ...} into
the component script: add a reactive declaration in <script lang="ts"> such as
"$: isManySide = data.side === 'child' &&
['oneToMany','manyToOne'].includes(data.relationType)" so it updates with
reactive data, remove the {`@const` isManySide ...} line from the template, and
update template usages to reference the script variable isManySide directly;
reference the existing symbols data.side, data.relationType and isManySide when
making the change.
ℹ️ Review info
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (6)
src/routes/(console)/project-[region]-[project]/databases/+page.sveltesrc/routes/(console)/project-[region]-[project]/databases/database-[database]/table-[table]/columns/relationship.sveltesrc/routes/(console)/project-[region]-[project]/functions/+page.sveltesrc/routes/(console)/project-[region]-[project]/overview/platforms/action.sveltesrc/routes/(console)/project-[region]-[project]/settings/webhooks/+page.sveltesrc/routes/(console)/project-[region]-[project]/storage/+page.svelte
...t-[region]-[project]/databases/database-[database]/table-[table]/columns/relationship.svelte
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Pull request overview
This PR fixes tooltip formatting and corrects relationship description text for the "many side" of database relationships.
Changes:
- Enhanced tooltip formatting by removing restrictive width constraints and adding
white-space: pre-linestyling for better text rendering - Fixed relationship description text to correctly display the relationship direction when viewing from the "many" side (child side) of oneToMany or manyToOne relationships
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/routes/(console)/project-[region]-[project]/storage/+page.svelte | Updated bucket creation tooltip formatting |
| src/routes/(console)/project-[region]-[project]/settings/webhooks/+page.svelte | Updated webhook creation tooltip formatting |
| src/routes/(console)/project-[region]-[project]/overview/platforms/action.svelte | Updated platform creation tooltip formatting |
| src/routes/(console)/project-[region]-[project]/functions/+page.svelte | Updated function creation tooltip formatting |
| src/routes/(console)/project-[region]-[project]/databases/+page.svelte | Updated database creation tooltip formatting |
| src/routes/(console)/project-[region]-[project]/databases/database-[database]/table-[table]/columns/relationship.svelte | Fixed relationship description text to correctly show cardinality from the many side perspective |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

What does this PR do?
before
after
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