cal.com icon indicating copy to clipboard operation
cal.com copied to clipboard

feat: add meta and seo tags for new booker component

Open G3root opened this issue 1 year ago • 4 comments

What does this PR do?

Fixes #8522

Type of change

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

G3root avatar May 05 '23 11:05 G3root

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

Name Status Preview Comments Updated (UTC)
cal ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 11, 2023 3:44pm
ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 11, 2023 3:44pm

vercel[bot] avatar May 05 '23 11:05 vercel[bot]

📦 Next.js Bundle Analysis for @calcom/web

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

Five Pages Changed Size

The following pages changed size from the code in this PR compared to its base branch:

Page Size (compressed) First Load % of Budget (350 KB)
/auth/error 100.84 KB 251.73 KB 71.92% (🟢 -0.14%)
/auth/login 149.48 KB 300.37 KB 85.82% (🟢 -0.14%)
/new-booker/[user]/[type] 289.81 KB 440.7 KB 125.92% (🟡 +0.87%)
/new-booker/team/[slug]/[type] 289.82 KB 440.71 KB 125.92% (🟡 +0.87%)
/settings/teams/[id]/onboard-members 160.22 KB 311.11 KB 88.89% (🟢 -0.18%)
Details

Only the gzipped size is provided here based on an expert tip.

First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

The "Budget %" column shows what percentage of your performance budget the First Load total takes up. For example, if your budget was 100kb, and a given page's first load size was 10kb, it would be 10% of your budget. You can also see how much this has increased or decreased compared to the base branch of your PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this. If you see "+/-

github-actions[bot] avatar May 05 '23 12:05 github-actions[bot]

Current Playwright Test Results Summary

✅ 112 Passing - ⚠️ 3 Flaky

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

(Last updated on 05/11/2023 04:01:39pm UTC)

Run Details

Running Workflow PR Update on Github Actions

Commit: 8832625e6acdd752a5d9941ba4d15ada6d1d3024

Started: 05/11/2023 03:52:16pm UTC

⚠️ Flakes

📄   apps/web/playwright/booking-seats.e2e.ts • 2 Flakes

Top 1 Common Error Messages

null

2 Test Cases Affected

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Booking with Seats -- new-booker Reschedule for booking with seats -- old-booker Should reschedule booking with seats and if everyone rescheduled it should be deleted
Retry 1Initial Attempt
0% (0) 0 / 333 runs
failed over last 7 days
39.04% (130) 130 / 333 runs
flaked over last 7 days
Booking with Seats -- old-booker Reschedule for booking with seats -- new-booker Should reschedule booking with seats and if everyone rescheduled it should be deleted
Retry 2Retry 1Initial Attempt
0% (0) 0 / 331 runs
failed over last 7 days
10.27% (34) 34 / 331 runs
flaked over last 7 days

📄   packages/embeds/embed-core/playwright/tests/action-based.test.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
12.72% (22) 22 / 173 runs
failed over last 7 days
61.85% (107) 107 / 173 runs
flaked over last 7 days

View Detailed Build Results


deploysentinel[bot] avatar May 05 '23 12:05 deploysentinel[bot]

@JeroenReumkens pushed some changes. happy to have some feedback :)

G3root avatar May 09 '23 13:05 G3root

Hey @G3root

I was looking at the changes, and I actually came up with something different that might make it even easier.

  • We move the HeadSEO to the pages (so new-booker/[user] and new-booker/team/..). That would be needed anyway because the booker component should not include any SEO meta data (since this is next specific, and the booker should be a standalone component that can be run anywhere).
  • Once we move it there, we can use the query directly in the page (trpc.usequery that is). And because of the prefetching that data is immediately set.
  • Then we can also revert the changes in the useEvent hook
  • Using trpc.useQuery in the page isn't a problem at all, since the only thing that page does is "enhance" the booker component with things like SEO data and for example fetching the booking data SSR in case of a reschedule. These aren't functionalities the booker component itself has, and thus not functionalities people can expect from the booker component when using it as a standalone component. So therefore it makes sense to use the trpc query in the page (but not in the booker component).

Let me know if this makes sense 😁

JeroenReumkens avatar May 10 '23 07:05 JeroenReumkens

@JeroenReumkens that makes sense and clean ❤️ . pushed some changes implementing requested changes.

G3root avatar May 11 '23 04:05 G3root