Skip to content

Comments

fix: tooltips and Correct relationship text on many side#2875

Merged
HarshMN2345 merged 2 commits intomainfrom
fix-SER-1123-relationship-text-many-side
Feb 23, 2026
Merged

fix: tooltips and Correct relationship text on many side#2875
HarshMN2345 merged 2 commits intomainfrom
fix-SER-1123-relationship-text-many-side

Conversation

@HarshMN2345
Copy link
Member

@HarshMN2345 HarshMN2345 commented Feb 23, 2026

What does this PR do?

before

image image

after

image image

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

  • Bug Fixes
    • Preserved line breaks in multiple tooltip messages so multi-line notices render correctly.
    • Removed restrictive tooltip width in several console pages to improve layout and readability.
    • Updated relationship description wording to clearly reflect the “many” vs “one” sides for relationship directions.

@appwrite
Copy link

appwrite bot commented Feb 23, 2026

Console (appwrite/console)

Project ID: 688b7bf400350cbd60e9

Sites (1)
Site Status Logs Preview QR
 console-stage
688b7cf6003b1842c9dc
Ready Ready View Logs Preview URL QR Code

Tip

GraphQL API works alongside REST and WebSocket protocols

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 23, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 040f68f and 15da4e7.

📒 Files selected for processing (1)
  • src/routes/(console)/project-[region]-[project]/databases/database-[database]/table-[table]/columns/relationship.svelte
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/routes/(console)/project-[region]-[project]/databases/database-[database]/table-[table]/columns/relationship.svelte

Walkthrough

This pull request adjusts tooltip presentation across multiple console pages by wrapping tooltip text content in a div styled with white-space: pre-line to preserve line breaks and by removing maxWidth props from several Tooltip components. Separately, relationship.svelte adds a computed constant isManySide and replaces previously static paragraphs with conditional rendering that outputs different descriptive text when the current table is the "many" side of a relationship.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main changes: fixing tooltips (white-space formatting and maxWidth removal) and correcting relationship text for the 'many side' scenario.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix-SER-1123-relationship-text-many-side

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@HarshMN2345 HarshMN2345 requested a review from Meldiron February 23, 2026 10:40
Copy link
Contributor

@coderabbitai coderabbitai bot left a 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]/columns/relationship.svelte (1)

232-233: Consider moving isManySide to the <script> section.

The component uses $: reactive declarations throughout. Defining isManySide as {@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 use isManySide directly:

-            {`@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

📥 Commits

Reviewing files that changed from the base of the PR and between 078e57f and 040f68f.

📒 Files selected for processing (6)
  • src/routes/(console)/project-[region]-[project]/databases/+page.svelte
  • src/routes/(console)/project-[region]-[project]/databases/database-[database]/table-[table]/columns/relationship.svelte
  • src/routes/(console)/project-[region]-[project]/functions/+page.svelte
  • src/routes/(console)/project-[region]-[project]/overview/platforms/action.svelte
  • src/routes/(console)/project-[region]-[project]/settings/webhooks/+page.svelte
  • src/routes/(console)/project-[region]-[project]/storage/+page.svelte

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-line styling 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.

@HarshMN2345 HarshMN2345 merged commit 35c23ea into main Feb 23, 2026
4 checks passed
@HarshMN2345 HarshMN2345 deleted the fix-SER-1123-relationship-text-many-side branch February 23, 2026 11:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants