8000 fix: add tooltip on disabled button by HarshMN2345 · Pull Request #2070 · appwrite/console · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix: add tooltip on disabled button #2070

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

Merged

Conversation

HarshMN2345
Copy link
Member
@HarshMN2345 HarshMN2345 commented Jul 2, 2025

Fix: Restore Tooltip for Disabled "Invite" Button on Free Orgs

Problem:
Disabled "Invite" button on free orgs lacked tooltip, leaving users unclear on how to enable it.

Solution:
Added missing tooltip in:
image

  • /organization-[org]/members
  • Header invite button (top-right)

Tooltip Behavior:

  • Shown only on FREE plans with 1+ members
  • Message: "Upgrade to add more members"
  • Position: bottom-end (below, right-aligned)

Testing:

  • On FREE orgs with 1+ members, hover over disabled "Invite" button
  • Tooltip should appear below and say "Upgrade to add more members"

@HarshMN2345 HarshMN2345 requested review from Copilot and ItzNotABug July 2, 2025 08:20
Copy link
@Copilot 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 restores a missing tooltip on disabled "Invite" buttons for free-tier organizations with existing members, improving UX by clarifying the upgrade path.

  • Wrapped the "Invite" buttons on both the members page and the header in a Tooltip component.
  • Added reactive logic (isFreeWithMembers, isButtonDisabled) to control when the button is disabled and when the tooltip appears.
  • Imported Tooltip, BillingPlan, and tierToPlan to drive the tooltip’s conditional content.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/routes/(console)/organization-[organization]/members/+page.svelte Added imports for Tooltip, BillingPlan, and tierToPlan; introduced reactive statements; wrapped the invite button in Tooltip.
src/routes/(console)/organization-[organization]/header.svelte Wrapped header invite button in Tooltip; updated billing imports to include tierToPlan.
Comments suppressed due to low confidence (3)

src/routes/(console)/organization-[organization]/members/+page.svelte:47

  • Consider adding unit or integration tests for the new tooltip and disable logic (isFreeWithMembers and isButtonDisabled) to verify that the tooltip only appears on FREE plans with 1+ members.
    // Calculate if button should be disabled and tooltip should show

src/routes/(console)/organization-[organization]/header.svelte:123

  • The variable areMembersLimited is used but not defined or imported, leading to a runtime reference error. Define this reactive boolean or import it from the appropriate store.
                        <Tooltip disabled={!areMembersLimited} placement="bottom-end">

src/routes/(console)/organization-[organization]/header.svelte:135

  • The constant BillingPlan is referenced here but not imported. Add import { BillingPlan } from '$lib/constants'; to ensure it's available in this file.
                                {organization?.billingPlan === BillingPlan.FREE

@ItzNotABug ItzNotABug merged commit 82d3777 into appwrite:main Jul 3, 2025
2 checks passed
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
0