Skip to content

feat: add quick create-organization button in org header#2664

Merged
ItzNotABug merged 3 commits intomainfrom
feat-SER-360-quick-org-access-button
Dec 5, 2025
Merged

feat: add quick create-organization button in org header#2664
ItzNotABug merged 3 commits intomainfrom
feat-SER-360-quick-org-access-button

Conversation

@HarshMN2345
Copy link
Copy Markdown
Member

@HarshMN2345 HarshMN2345 commented Dec 2, 2025

What does this PR do?

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

  • New Features
    • Header action now either opens an inline "Create organization" modal or routes to the cloud creation page, depending on deployment.
  • UI Improvements
    • Header spacing and layout updated for better alignment and visual balance.
    • Header action icon scaled down to a smaller plus to improve compactness and visual clarity.

✏️ Tip: You can customize this high-level summary in your review settings.

@appwrite
Copy link
Copy Markdown

appwrite Bot commented Dec 2, 2025

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

Each function runs in its own isolated container with custom environment variables

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Dec 2, 2025

Walkthrough

The organization header component was refactored: a plain span was replaced with Layout.Stack (row, center, gap) for alignment/spacing; the header button icon changed from IconPlus to IconPlusSm; clicking the button now conditionally either calls goto('base/create-organization') when isCloud is true or opens the modal via newOrgModal.set(true) otherwise. goto from $app/navigation and newOrgModal (now exported from $lib/stores/organization) are imported into the header. No other behavioral changes are present.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Verify isCloud detection is consistent with existing code.
  • Confirm newOrgModal export/import does not create circular dependencies or affect other consumers.
  • Validate the base/create-organization route exists and is the intended target.
  • Review Layout.Stack change for spacing, alignment, accessibility, and visual regressions.
  • Check the icon size/style change (IconPlusIconPlusSm) for visual consistency.

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 PR title accurately describes the main change: adding a quick create-organization button to the organization header, which aligns with the file changes and objectives.
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 feat-SER-360-quick-org-access-button

📜 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 ea3216d and 2653a93.

📒 Files selected for processing (1)
  • src/routes/(console)/organization-[organization]/header.svelte (5 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/routes/(console)/organization-[organization]/header.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.

<Cover>
<svelte:fragment slot="header">
<span class="u-flex u-cross-center u-gap-8 u-min-width-0">
<span class="u-flex u-cross-center u-gap-12 u-min-width-0">
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Stack.

Copy link
Copy Markdown
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: 0

🧹 Nitpick comments (2)
src/routes/(console)/organization-[organization]/header.svelte (2)

102-102: Confirm increased header gap matches design system

Bumping the header gap to u-gap-12 will visually loosen this header row. Please confirm this matches the current console header spacing tokens so this header stays consistent with similar views.


123-129: Add accessible label and consider permission gating for quick-create button

Nice addition, but two refinements would help:

  1. Icon-only button has no visible text, which is weak for a11y and affordance. Consider adding an accessible label (or visible text) so its intent is clear:
-                <Button
-                    secondary
-                    size="xs"
-                    on:click={() =>
-                        isCloud ? goto(`${base}/create-organization`) : newOrgModal.set(true)}>
+                <Button
+                    secondary
+                    size="xs"
+                    aria-label="Create organization"
+                    on:click={() =>
+                        isCloud ? goto(`${base}/create-organization`) : newOrgModal.set(true)}>
                     <Icon icon={IconPlus} size="s" />
                 </Button>
  1. If there are cases where a user cannot create organizations (role/plan limits), consider mirroring the same gating logic here (hide or disable) so this shortcut doesn’t expose an action that will just error later.
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e977a00 and fa9c9d4.

📒 Files selected for processing (1)
  • src/routes/(console)/organization-[organization]/header.svelte (4 hunks)
🧰 Additional context used
📓 Path-based instructions (5)
**/*.{ts,tsx,js,jsx,svelte}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx,js,jsx,svelte}: Import reusable modules from the src/lib directory using the $lib alias
Use minimal comments in code; reserve comments for TODOs or complex logic explanations
Use $lib, $routes, and $themes aliases instead of relative paths for module imports

Files:

  • src/routes/(console)/organization-[organization]/header.svelte
src/routes/**/*.svelte

📄 CodeRabbit inference engine (AGENTS.md)

Use SvelteKit file conventions: +page.svelte for components, +page.ts for data loaders, +layout.svelte for wrappers, +error.svelte for error handling, and dynamic route params in square brackets like [param]

Files:

  • src/routes/(console)/organization-[organization]/header.svelte
**/*.{ts,tsx,js,jsx,svelte,json}

📄 CodeRabbit inference engine (AGENTS.md)

Use 4 spaces for indentation, single quotes, 100 character line width, and no trailing commas per Prettier configuration

Files:

  • src/routes/(console)/organization-[organization]/header.svelte
**/*.svelte

📄 CodeRabbit inference engine (AGENTS.md)

Use Svelte 5 + SvelteKit 2 syntax with TypeScript for component development

Files:

  • src/routes/(console)/organization-[organization]/header.svelte
src/routes/**

📄 CodeRabbit inference engine (AGENTS.md)

Configure dynamic routes using SvelteKit convention with [param] syntax in route directory names

Files:

  • src/routes/(console)/organization-[organization]/header.svelte
🧠 Learnings (1)
📚 Learning: 2025-10-13T05:13:54.542Z
Learnt from: ItzNotABug
Repo: appwrite/console PR: 2413
File: src/routes/(console)/project-[region]-[project]/databases/table.svelte:33-39
Timestamp: 2025-10-13T05:13:54.542Z
Learning: In Svelte 5, `import { page } from '$app/state'` provides a reactive state proxy that can be accessed directly (e.g., `page.params`), unlike the older `import { page } from '$app/stores'` which returns a readable store requiring the `$page` syntax for auto-subscription in components.

Applied to files:

  • src/routes/(console)/organization-[organization]/header.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
🔇 Additional comments (1)
src/routes/(console)/organization-[organization]/header.svelte (1)

2-23: Imports and organization store usage look consistent

The new imports for navigation and newOrgModal follow the alias guidelines ($app/*, $lib/*) and are scoped appropriately for the header’s responsibilities. No changes needed here.

@ItzNotABug ItzNotABug merged commit 5eac7d7 into main Dec 5, 2025
4 of 5 checks passed
@ItzNotABug ItzNotABug deleted the feat-SER-360-quick-org-access-button branch December 5, 2025 08:15
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