Skip to content

omar/eng-67-invite-modal-if-no-teams-disable-add-user-to-team #602

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

OmarMcAdam
Copy link
Member

@OmarMcAdam OmarMcAdam commented Jul 24, 2024

TL;DR

Added a tooltip to the teams switch in the invite modal to inform users when no teams are available.

What changed?

  • Imported Tooltip components from '@/src/components/shadcn-ui/tooltip'.
  • Wrapped the teams switch with a TooltipProvider and TooltipTrigger when no teams are present.
  • Added a TooltipContent to display a message when the switch is disabled.
  • Ensured that the switch is only enabled and functional if there are teams available.

How to test?

  1. Navigate to the invite modal in the settings under org users.
  2. Check the teams switch functionality when teams are present and when no teams are available.
  3. Verify that the tooltip appears with the appropriate message when there are no teams.

Why make this change?

To improve the user experience by providing contextual information about the teams switch's disabled state.


What does this PR do?

Fixes # (issue)

If there is not an issue for this, please create one first. This is used to tracking purposes and also helps use understand why this PR exists

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Chore (refactoring code, technical debt, workflow improvements)
  • Enhancement (small improvements)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist

Required

  • Read Contributing Guide
  • Self-reviewed my own code
  • Tested my code in a local environment
  • Commented on my code in hard-to-understand areas
  • Checked for warnings, there are none
  • Removed all console.logs
  • Merged the latest changes from main onto my branch with git pull origin main
  • My changes don't cause any responsiveness issues

Appreciated

  • If a UI change was made: Added a screen recording or screenshots to this PR
  • Updated the UnInbox Docs if changes were necessary

Copy link
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @McPizza0 and the rest of your teammates on Graphite Graphite

@OmarMcAdam OmarMcAdam marked this pull request as ready for review July 24, 2024 14:54
Copy link
Member

@BlankParticle BlankParticle left a comment

Choose a reason for hiding this comment

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

I tested the tooltip won't work if the switch is disabled

@OmarMcAdam OmarMcAdam force-pushed the omar/eng-67-invite-modal-if-no-teams-disable-add-user-to-team branch from 5ec2e9c to cb9df2b Compare July 24, 2024 16:30
Copy link
Member Author

I tested the tooltip won't work if the switch is disabled

z-index issue
fixed in latest

@OmarMcAdam OmarMcAdam requested a review from BlankParticle July 24, 2024 16:30
@OmarMcAdam OmarMcAdam force-pushed the omar/eng-67-invite-modal-if-no-teams-disable-add-user-to-team branch from cb9df2b to ca9ecfe Compare July 24, 2024 16:46
Copy link
Member Author

OmarMcAdam commented Jul 24, 2024

Merge activity

  • Jul 24, 12:47 PM EDT: Graphite rebased this pull request as part of a merge.
  • Jul 24, 12:47 PM EDT: @McPizza0 merged this pull request with Graphite.

@OmarMcAdam OmarMcAdam merged commit 2e3cace into main Jul 24, 2024
3 checks passed
@BlankParticle BlankParticle deleted the omar/eng-67-invite-modal-if-no-teams-disable-add-user-to-team branch July 24, 2024 17:07
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