Skip to content

fix: nameless in sidebar for orgs#10318

Merged
PeerRich merged 2 commits into
mainfrom
fix/nameless-in-sidebar
Jul 24, 2023
Merged

fix: nameless in sidebar for orgs#10318
PeerRich merged 2 commits into
mainfrom
fix/nameless-in-sidebar

Conversation

@hariombalhara
Copy link
Copy Markdown
Member

@hariombalhara hariombalhara commented Jul 23, 2023

What does this PR do?

  • Revert stale Infinite from getBranding query so that it is updated when org updates. It is easier then manually retching when some data changes. This actually fixes the bug where nameless is shown when a new org is created.
  • Replace useOrgBrandingValues with useOrgBranding which gets the value from Provider. This would avoid unnecessary refetch of getBranding data which doesn't change frequently.

Fixes #10310

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How should this be tested?

Mandatory Tasks

  • Make sure you have self-reviewed the code. A decent size PR without self-review might be rejected.

Checklist

  • I haven't added tests that prove my fix is effective or that my feature works

@vercel
Copy link
Copy Markdown

vercel Bot commented Jul 23, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
api ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 24, 2023 10:26am
cal-demo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 24, 2023 10:26am
dev ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 24, 2023 10:26am
ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 24, 2023 10:26am
2 Ignored Deployments
Name Status Preview Comments Updated (UTC)
cal ⬜️ Ignored (Inspect) Jul 24, 2023 10:26am
qa ⬜️ Ignored (Inspect) Jul 24, 2023 10:26am

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jul 23, 2023

Thank you for following the naming conventions! 🙏

@github-actions github-actions Bot added High priority Created by Linear-GitHub Sync organizations area: organizations, orgs 🐛 bug Something isn't working labels Jul 23, 2023
@zomars zomars added the core area: core, team members only label Jul 23, 2023
@hariombalhara hariombalhara force-pushed the fix/nameless-in-sidebar branch from 86946c3 to 3077daa Compare July 23, 2023 09:08
@hariombalhara hariombalhara changed the title Avoid flicker of nameless in sidebar for orgs fix: nameless in sidebar for orgs Jul 23, 2023
@hariombalhara hariombalhara marked this pull request as ready for review July 23, 2023 09:09
@hariombalhara hariombalhara requested a review from a team July 23, 2023 09:09
@hariombalhara hariombalhara force-pushed the fix/nameless-in-sidebar branch from 3077daa to 0236cdf Compare July 23, 2023 09:20
*/
export function useOrgBranding() {
const orgBrandingContext = useContext(OrganizationBrandingContext);
if (orgBrandingContext === null)
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The value can itself be null if the user isn't an org member. So, make a wrapper object that has orgBrand and that wrapper objet can be checked if it's nullish or not.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jul 23, 2023

📦 Next.js Bundle Analysis for @calcom/web

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

@alwaysmeticulous
Copy link
Copy Markdown

alwaysmeticulous Bot commented Jul 23, 2023

🤖 Meticulous spotted visual differences in 36 of 149 screens tested: view and approve differences detected.

Last updated for commit a5f0731. This comment will update as new commits are pushed.

@deploysentinel
Copy link
Copy Markdown

deploysentinel Bot commented Jul 23, 2023

Current Playwright Test Results Summary

✅ 93 Passing - ⚠️ 1 Flaky

Run may still be in progress, this comment will be updated as current testing workflow or job completes...

(Last updated on 07/24/2023 10:25:26am UTC)

Run Details

Running Workflow PR Update on Github Actions

Commit: a5f0731

Started: 07/24/2023 10:23:16am UTC

⚠️ Flakes

📄   packages/embeds/embed-core/playwright/tests/action-based.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Popup Tests should be able to reschedule
Retry 2Retry 1Initial Attempt
1.80% (3) 3 / 167 runs
failed over last 7 days
97.01% (162) 162 / 167 runs
flaked over last 7 days

View Detailed Build Results


Copy link
Copy Markdown
Member

@sean-brydon sean-brydon left a comment

Choose a reason for hiding this comment

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

Tested -> Works great!

Nice work on fetching from provider instread of trpc each time we need it. We could likely do this across the app for a few things!

@PeerRich PeerRich enabled auto-merge (squash) July 24, 2023 10:23
@PeerRich PeerRich merged commit 4e1e586 into main Jul 24, 2023
@PeerRich PeerRich deleted the fix/nameless-in-sidebar branch July 24, 2023 10:25
fritterhoff pushed a commit to hm-edu/cal.com that referenced this pull request Jul 25, 2023
Co-authored-by: sean-brydon <55134778+sean-brydon@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐛 bug Something isn't working core area: core, team members only High priority Created by Linear-GitHub Sync organizations area: organizations, orgs

Projects

No open projects
Status: No status

Development

Successfully merging this pull request may close these issues.

[CAL-2218] Organizations: Shows as nameless in top left profile

4 participants