Skip to content
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

fix(invitations): hide invitation accepted banner for users who are no longer members of organization TASK-1585 #5532

Merged

Conversation

magicznyleszek
Copy link
Member

@magicznyleszek magicznyleszek commented Feb 18, 2025

💭 Notes

I've renamed showBanner to isBannerDismissed for clarity and improved the ifs list. The actual fix is verifying orgQuery.data.is_mmo.

👀 Preview steps

Bug template:

  1. ℹ️ have two accounts: "joe" and "bo"; "joe" is org owner, "bo" is not
  2. send invite from "joe" to "bo" for joining organization
  3. accept invite as "bo" (mind https://www.notion.so/kobotoolbox/Display-invite-accepted-banner-immediately-19d7e515f6548087afedf3644410c72d?pvs=4)
  4. 🟢 as "bo" notice that the invite accepted banner shows up (on top of /#/projects/home route) (make sure not to dismiss the banner with "x" button)
  5. as "joe" then remove "bo" from organization
  6. 🔴 [on main] as "bo" notice that the banner is still visible
  7. 🟢 [on PR] as "bo" notice that the banner is not visible

@magicznyleszek magicznyleszek self-assigned this Feb 18, 2025
@magicznyleszek magicznyleszek marked this pull request as ready for review February 18, 2025 11:25
Copy link
Contributor

@jamesrkiger jamesrkiger left a comment

Choose a reason for hiding this comment

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

lgtm

@magicznyleszek magicznyleszek merged commit 93e73f2 into main Feb 18, 2025
5 checks passed
@magicznyleszek magicznyleszek deleted the leszek/task-1585-hide-banner-for-removed-org-member branch February 18, 2025 12:40
rgraber pushed a commit that referenced this pull request Feb 18, 2025
…o longer members of organization TASK-1585 (#5532)

### 💭 Notes
I've renamed `showBanner` to `isBannerDismissed` for clarity and
improved the `if`s list. The actual fix is verifying
`orgQuery.data.is_mmo`.

### 👀 Preview steps

Bug template:
1. ℹ️ have two accounts: "joe" and "bo"; "joe" is org owner, "bo" is not
2. send invite from "joe" to "bo" for joining organization
3. accept invite as "bo" (mind
https://www.notion.so/kobotoolbox/Display-invite-accepted-banner-immediately-19d7e515f6548087afedf3644410c72d?pvs=4)
4. 🟢 as "bo" notice that the invite accepted banner shows up (on top of
`/#/projects/home` route) (make sure not to dismiss the banner with "x"
button)
5. as "joe" then remove "bo" from organization
6. 🔴 [on main] as "bo" notice that the banner is still visible
7. 🟢 [on PR] as "bo" notice that the banner is not visible
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants