Skip to content

Conversation

@ItzNotABug
Copy link
Member

@ItzNotABug ItzNotABug commented Nov 12, 2025

What does this PR do?

Adds NULL badge when no data.

Test Plan

Manual.

Related PRs and Issues

N/A.

Have you read the Contributing Guidelines on issues?

Yes.

Summary by CodeRabbit

  • Bug Fixes

    • Improved handling and display of null/empty values in database row suggestions; a visible NULL badge now appears for empty cells to reduce confusion.
  • Style

    • Updated styling for suggestion placeholder cells to ensure consistent layout and visual alignment with other table content.
  • Performance

    • Reduced the artificial delay before mock suggestions are applied for snappier UI feedback.

update: cell class name.
@ItzNotABug ItzNotABug self-assigned this Nov 12, 2025
@appwrite
Copy link

appwrite bot commented Nov 12, 2025

Console (appwrite/console)

Project ID: 688b7bf400350cbd60e9

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

Tip

Environment variable changes require redeployment to take effect

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 12, 2025

Walkthrough

A single component file (empty.svelte) was modified: the mock suggestions delay was reduced from NOTIFICATION_AND_MOCK_DELAY * 100 to NOTIFICATION_AND_MOCK_DELAY; row rendering was changed to compute rowData and an isNullOrUndefined flag, rendering a new span with class suggestions-empty-fake-cell that shows a NULL Badge when rowData is null or undefined and otherwise renders the value; the CSS selector was renamed from .fake-cell to .suggestions-empty-fake-cell.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

  • Verify the delay reduction from NOTIFICATION_AND_MOCK_DELAY * 100 to NOTIFICATION_AND_MOCK_DELAY is intentional and acceptable for UX and tests.
  • Confirm isNullOrUndefined correctly detects null and undefined edge cases and that the NULL Badge renders only when intended.
  • Ensure the .suggestions-empty-fake-cell CSS is present and applies correctly without regressing layout or visuals.

Pre-merge checks and finishing touches

✅ 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 'Add: default null badge' directly matches the PR's main objective of adding a NULL badge when no data is present, which is reflected in the code changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch add-default-data

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c6aae23 and 85b3662.

📒 Files selected for processing (1)
  • src/routes/(console)/project-[region]-[project]/databases/database-[database]/(suggestions)/empty.svelte (3 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/routes/(console)/project-[region]-[project]/databases/database-[database]/(suggestions)/empty.svelte
⏰ 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

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.

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

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between eecf4e9 and c6aae23.

📒 Files selected for processing (1)
  • src/routes/(console)/project-[region]-[project]/databases/database-[database]/(suggestions)/empty.svelte (3 hunks)
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: ItzNotABug
Repo: appwrite/console PR: 2425
File: src/routes/(console)/project-[region]-[project]/databases/database-[database]/(suggestions)/empty.svelte:454-468
Timestamp: 2025-09-30T07:41:06.679Z
Learning: In `src/routes/(console)/project-[region]-[project]/databases/database-[database]/(suggestions)/empty.svelte`, the column suggestions API (console.suggestColumns) has a maximum limit of 7 columns returned, which aligns with the initial placeholder count of 7 in customColumns.
📚 Learning: 2025-09-30T07:41:06.679Z
Learnt from: ItzNotABug
Repo: appwrite/console PR: 2425
File: src/routes/(console)/project-[region]-[project]/databases/database-[database]/(suggestions)/empty.svelte:454-468
Timestamp: 2025-09-30T07:41:06.679Z
Learning: In `src/routes/(console)/project-[region]-[project]/databases/database-[database]/(suggestions)/empty.svelte`, the column suggestions API (console.suggestColumns) has a maximum limit of 7 columns returned, which aligns with the initial placeholder count of 7 in customColumns.

Applied to files:

  • src/routes/(console)/project-[region]-[project]/databases/database-[database]/(suggestions)/empty.svelte
📚 Learning: 2025-10-07T14:17:11.597Z
Learnt from: ItzNotABug
Repo: appwrite/console PR: 2413
File: src/routes/(console)/project-[region]-[project]/databases/database-[database]/(entity)/helpers/terminology.ts:28-28
Timestamp: 2025-10-07T14:17:11.597Z
Learning: In src/routes/(console)/project-[region]-[project]/databases/database-[database]/(entity)/helpers/terminology.ts, the empty `vectordb: {}` entry in baseTerminology is intentional. The vectordb database type is not currently used because the backend API is not finalized, and no database type returns 'vectordb' at the moment.

Applied to files:

  • src/routes/(console)/project-[region]-[project]/databases/database-[database]/(suggestions)/empty.svelte
⏰ 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: e2e
  • GitHub Check: build
🔇 Additional comments (2)
src/routes/(console)/project-[region]-[project]/databases/database-[database]/(suggestions)/empty.svelte (2)

638-638: LGTM! Mock delay reduction improves UX.

Reducing the delay from 125 seconds to 1.25 seconds for mock suggestions is a sensible improvement for development/testing experience.


2001-2007: LGTM! CSS class rename improves specificity.

Renaming .fake-cell to .suggestions-empty-fake-cell provides better namespacing and reduces potential naming conflicts with other components.

@ItzNotABug ItzNotABug merged commit efb2d0e into main Nov 12, 2025
3 of 4 checks passed
@ItzNotABug ItzNotABug deleted the add-default-data branch November 12, 2025 11:10
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.

3 participants