Skip to content

fix: mobile event types and avatars#11184

Merged
PeerRich merged 2 commits intomainfrom
fix/mobile-event-types
Sep 6, 2023
Merged

fix: mobile event types and avatars#11184
PeerRich merged 2 commits intomainfrom
fix/mobile-event-types

Conversation

@leog
Copy link
Copy Markdown
Contributor

@leog leog commented Sep 6, 2023

What does this PR do?

Mobile event types needed some love, empty personal event types now show an empty state, and also some subteam avatars were not loading for orgs.

Before After
image

Same applies for desktop:

Before After

Type of change

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

How should this be tested?

Open event types page and shrink the window to get mobile treatment and see how it behaves like the pictures.

@leog leog requested a review from a team September 6, 2023 20:51
@leog leog self-assigned this Sep 6, 2023
@vercel
Copy link
Copy Markdown

vercel Bot commented Sep 6, 2023

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

Name Status Preview Comments Updated (UTC)
ai ❌ Failed (Inspect) Sep 6, 2023 9:00pm
api ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 6, 2023 9:00pm
cal-demo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 6, 2023 9:00pm
dev ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 6, 2023 9:00pm
3 Ignored Deployments
Name Status Preview Comments Updated (UTC)
cal ⬜️ Ignored (Inspect) Visit Preview Sep 6, 2023 9:00pm
qa ⬜️ Ignored (Inspect) Visit Preview Sep 6, 2023 9:00pm
ui ⬜️ Ignored (Inspect) Visit Preview Sep 6, 2023 9:00pm

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Sep 6, 2023

Thank you for following the naming conventions! 🙏

@zomars zomars added the core area: core, team members only label Sep 6, 2023
name: item.profile.name ?? "",
href: item.teamId ? `/event-types?teamId=${item.teamId}` : "/event-types",
avatar: item.profile.image ?? `${orgBranding?.fullDomain ?? WEBAPP_URL}/${item.profile.slug}/avatar.png`,
href: item.teamId ? `/event-types?teamId=${item.teamId}` : "/event-types?noTeam",
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We need to differentiate a team pathname+query from personal account so the horizontal tabs can correctly identify the active tab

href: item.teamId ? `/event-types?teamId=${item.teamId}` : "/event-types?noTeam",
avatar: orgBranding
? `${orgBranding.fullDomain}${item.teamId ? "/team" : ""}/${item.profile.slug}/avatar.png`
: item.profile.image ?? `${WEBAPP_URL + (item.teamId && "/team")}/${item.profile.slug}/avatar.png`,
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This was preventing org subteams to render correctly

<div>
<HorizontalTabs tabs={tabs} />
{events.length && (
{events.length > 0 ? (
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This was showing a "0" in the UI

readOnly={events[0].metadata.readOnly}
/>
) : (
<CreateFirstEventTypeView />
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We want to show an empty screen

}, []);

if (!types.length) {
return group.teamId ? <EmptyEventTypeList group={group} /> : <CreateFirstEventTypeView />;
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

To show correct empty screen

href={teamId ? `/settings/teams/${teamId}/profile` : "/settings/my-account/profile"}
imageSrc={`${orgBranding?.fullDomain ?? WEBAPP_URL}/${profile.slug}/avatar.png` || undefined}
imageSrc={
`${orgBranding?.fullDomain ?? WEBAPP_URL}${teamId ? "/team" : ""}/${profile.slug}/avatar.png` ||
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Somehow we were missing the "/team" part of the avatar URL to correctly show a team or user avatar for orgs

buttonRaw={
<Button href="?dialog=new" variant="button">
{t("create")}
</Button>
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Added the "create" button to simplify the action for mobile users mainly

) : group.teamId ? (
<EmptyEventTypeList group={group} />
) : (
<CreateFirstEventTypeView />
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Empty screen FTW

Comment thread apps/web/pages/signup.tsx
addOnLeading={
orgSlug
? getOrgFullDomain(orgSlug, { protocol: true })
? `${getOrgFullDomain(orgSlug, { protocol: true })}/`
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Missing trailing "/" on invite

return {
// don't display event teams without event types,
eventTypeGroups: eventTypeGroups.filter((groupBy) => groupBy.parentId || !!groupBy.eventTypes?.length),
eventTypeGroups,
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We now show any event type group even if it is empty, as we show empty screens for them now

Icon && "mt-6"
)}>
{headline}
</h2>
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

When no icon is present and no description is passed, there was an extra margin on the title that didn't look good

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Sep 6, 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! 🙌

@deploysentinel
Copy link
Copy Markdown

deploysentinel Bot commented Sep 6, 2023

Current Playwright Test Results Summary

✅ 117 Passing - ⚠️ 1 Flaky

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

(Last updated on 09/06/2023 09:03:33pm UTC)

Run Details

Running Workflow PR Update on Github Actions

Commit: 3e3a281

Started: 09/06/2023 09:01:42pm 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 1Initial Attempt
1.88% (6) 6 / 320 runs
failed over last 7 days
96.88% (310) 310 / 320 runs
flaked over last 7 days

View Detailed Build Results


Copy link
Copy Markdown
Member

@PeerRich PeerRich left a comment

Choose a reason for hiding this comment

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

thank you!!

@PeerRich PeerRich merged commit b7ae8c9 into main Sep 6, 2023
@PeerRich PeerRich deleted the fix/mobile-event-types branch September 6, 2023 21:41
sean-brydon added a commit that referenced this pull request Sep 7, 2023
* Pass organization name & logo

* Overflow hidden

* Show org icon on public page

* Add org logo to large user avatars

* Clean up

* Add org name and logo to context

* Get org logo from /avatar.png endpoint

* Do not query for logo

* Remove name and logo from session middleware

* Type fix

* Set user onboarding org logo

* feat: organization avatar component (#10788)

Co-authored-by: sean-brydon <55134778+sean-brydon@users.noreply.github.com>

* Type fixes

* Type fix

* Transition to org slug for organization avatar

* Address feedback

* Clean up

* Clean up

* Type fix

* fix: set avatar cache control (#11163)

* test: Integration tests for handleNewBooking (#11044)

Co-authored-by: Shivam Kalra <shivamkalra98@gmail.com>
Co-authored-by: Joe Au-Yeung <65426560+joeauyeung@users.noreply.github.com>

* fix: booking_paid webhook and added new payment metadata (#11093)

* app store improvements, logos, dark mode, added screenshots, fixed author names (#11164)

* fix: mobile event types and avatars (#11184)

* New Crowdin translations by Github Action

* fix: updateProfile metadata overwrite (#11188)

Co-authored-by: alannnc <alannnc@gmail.com>

* New Crowdin translations by Github Action

---------

Co-authored-by: Sean Brydon <sean@cal.com>
Co-authored-by: sean-brydon <55134778+sean-brydon@users.noreply.github.com>
Co-authored-by: Omar López <zomars@me.com>
Co-authored-by: Hariom Balhara <hariombalhara@gmail.com>
Co-authored-by: Shivam Kalra <shivamkalra98@gmail.com>
Co-authored-by: alannnc <alannnc@gmail.com>
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
Co-authored-by: Leo Giovanetti <hello@leog.me>
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
ashwintelmore pushed a commit to ashwintelmore/cal.com that referenced this pull request Sep 19, 2023
* Pass organization name & logo

* Overflow hidden

* Show org icon on public page

* Add org logo to large user avatars

* Clean up

* Add org name and logo to context

* Get org logo from /avatar.png endpoint

* Do not query for logo

* Remove name and logo from session middleware

* Type fix

* Set user onboarding org logo

* feat: organization avatar component (calcom#10788)

Co-authored-by: sean-brydon <55134778+sean-brydon@users.noreply.github.com>

* Type fixes

* Type fix

* Transition to org slug for organization avatar

* Address feedback

* Clean up

* Clean up

* Type fix

* fix: set avatar cache control (calcom#11163)

* test: Integration tests for handleNewBooking (calcom#11044)

Co-authored-by: Shivam Kalra <shivamkalra98@gmail.com>
Co-authored-by: Joe Au-Yeung <65426560+joeauyeung@users.noreply.github.com>

* fix: booking_paid webhook and added new payment metadata (calcom#11093)

* app store improvements, logos, dark mode, added screenshots, fixed author names (calcom#11164)

* fix: mobile event types and avatars (calcom#11184)

* New Crowdin translations by Github Action

* fix: updateProfile metadata overwrite (calcom#11188)

Co-authored-by: alannnc <alannnc@gmail.com>

* New Crowdin translations by Github Action

---------

Co-authored-by: Sean Brydon <sean@cal.com>
Co-authored-by: sean-brydon <55134778+sean-brydon@users.noreply.github.com>
Co-authored-by: Omar López <zomars@me.com>
Co-authored-by: Hariom Balhara <hariombalhara@gmail.com>
Co-authored-by: Shivam Kalra <shivamkalra98@gmail.com>
Co-authored-by: alannnc <alannnc@gmail.com>
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
Co-authored-by: Leo Giovanetti <hello@leog.me>
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core area: core, team members only

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants