Skip to content

feat: Support adding links to checkbox type question using markdown[Blocked on another PR]#8943

Merged
hariombalhara merged 3 commits into
mainfrom
hariom/cal-1650-ability-to-hyperlink-in-checkbox-field
Jul 21, 2023
Merged

feat: Support adding links to checkbox type question using markdown[Blocked on another PR]#8943
hariombalhara merged 3 commits into
mainfrom
hariom/cal-1650-ability-to-hyperlink-in-checkbox-field

Conversation

@hariombalhara
Copy link
Copy Markdown
Member

@hariombalhara hariombalhara commented May 17, 2023

What does this PR do?

Fixes #8829

  • Use markdown [text](link) in checkbox type field label to add a link
  • You can use other basic markdown syntax as well. We use markdown-it to generate the HTML from the markdown
  • It can be supported in other fields as well by updating their components accordingly and then updating fieldsThatSupportLabelAsSafeHtml

Demo

https://www.loom.com/share/f6a4423161374fc2a67026505b3e66d6

Followup

  • Possible followup can be to use WYSIWYG editor. Though I feel it might complicate UX for adding fields. Documenting how to add links using the simple markdown syntax might be okay IMHO.

TODO:

Type of change

  • New feature (non-breaking change which adds functionality)

How should this be tested?

  • Simply use markdown test in Checkbox field label
    • Links are shown in Questions list as well.
    • Links are shown on Booking Page
  • A negative test that Long Text type question label won't honour markdown

Checklist

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

@hariombalhara hariombalhara requested a review from a team May 17, 2023 09:56
@hariombalhara hariombalhara requested a review from zomars as a code owner May 17, 2023 09:56
@hariombalhara hariombalhara requested a review from a team May 17, 2023 09:56
@linear
Copy link
Copy Markdown

linear Bot commented May 17, 2023

@vercel
Copy link
Copy Markdown

vercel Bot commented May 17, 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 21, 2023 5:27pm
cal-demo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 21, 2023 5:27pm
dev ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 21, 2023 5:27pm
3 Ignored Deployments
Name Status Preview Comments Updated (UTC)
cal ⬜️ Ignored (Inspect) Visit Preview Jul 21, 2023 5:27pm
qa ⬜️ Ignored (Inspect) Jul 21, 2023 5:27pm
ui ⬜️ Ignored (Inspect) Visit Preview Jul 21, 2023 5:27pm

@hariombalhara hariombalhara marked this pull request as draft May 17, 2023 09:56
@hariombalhara hariombalhara requested a review from CarinaWolli May 17, 2023 09:57
@PeerRich PeerRich changed the title Support adding links to checkbox type question using markdown feat: Support adding links to checkbox type question using markdown May 24, 2023
@PeerRich PeerRich added the Low priority Created by Linear-GitHub Sync label May 25, 2023
@PeerRich
Copy link
Copy Markdown
Member

pretty sure this has been build before, no? am I trippin?

@CarinaWolli
Copy link
Copy Markdown
Member

@PeerRich maybe you saw #8939?
This got accidently merged early to @hariombalhara's working branch, he reverted the changes and opened this draft PR to reduce the size of the PR

@PeerRich
Copy link
Copy Markdown
Member

@CarinaWolli @hariombalhara

ahhh that explains

@PeerRich PeerRich requested review from a team and removed request for a team May 26, 2023 11:52
@PeerRich PeerRich added the ✨ feature New feature or request label May 30, 2023
@hariombalhara hariombalhara changed the title feat: Support adding links to checkbox type question using markdown feat: Support adding links to checkbox type question using markdown[Blocked on another PR] May 30, 2023
@hariombalhara hariombalhara force-pushed the hariom/cal-1650-ability-to-hyperlink-in-checkbox-field branch from 523cea4 to ee9e874 Compare May 30, 2023 10:07
@github-actions
Copy link
Copy Markdown
Contributor

This PR is being marked as stale due to inactivity.

@github-actions github-actions Bot added the Stale label Jun 21, 2023
@github-actions
Copy link
Copy Markdown
Contributor

This PR is being closed due to inactivity. Please reopen if work is intended to be continued.

@github-actions github-actions Bot closed this Jun 29, 2023
@CarinaWolli
Copy link
Copy Markdown
Member

@hariombalhara we still want this to merge after #8671 right?

@CarinaWolli CarinaWolli reopened this Jun 30, 2023
@hariombalhara
Copy link
Copy Markdown
Member Author

Yeah for sure. Been waiting for that to happen 😄

@github-actions github-actions Bot removed the Stale label Jul 1, 2023
@github-actions
Copy link
Copy Markdown
Contributor

This PR is being marked as stale due to inactivity.

@github-actions github-actions Bot added the Stale label Jul 16, 2023
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jul 21, 2023

📦 Next.js Bundle Analysis for @calcom/web

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

Ninety-four 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)
/404 118.23 KB 272.38 KB 77.82% (🟡 +7.57%)
/500 117.22 KB 271.36 KB 77.53% (🟡 +8.14%)
/[user] 240.56 KB 394.71 KB 112.77% (🔴 +28.77%)
/[user]/[type] 394.27 KB 548.42 KB 156.69% (🟢 -0.22%)
/[user]/[type]/embed 394.3 KB 548.45 KB 156.70% (🟢 -0.22%)
/[user]/embed 240.61 KB 394.75 KB 112.79% (🔴 +28.77%)
/apps 277.09 KB 431.24 KB 123.21% (🟡 +2.07%)
/apps/[slug] 295.15 KB 449.29 KB 128.37% (🟡 +2.07%)
/apps/[slug]/setup 115.59 KB 269.74 KB 77.07% (🟡 +7.56%)
/apps/categories 256.25 KB 410.4 KB 117.26% (🟡 +2.06%)
/apps/categories/[category] 260.31 KB 414.45 KB 118.42% (🟡 +2.06%)
/apps/installed/[category] 276.54 KB 430.69 KB 123.05% (🟡 +2.08%)
/auth/error 117.03 KB 271.18 KB 77.48% (🟡 +4.33%)
/auth/forgot-password 162.55 KB 316.7 KB 90.49% (🟡 +7.55%)
/auth/forgot-password/[id] 161.92 KB 316.07 KB 90.30% (🟡 +7.57%)
/auth/login 166.89 KB 321.04 KB 91.73% (🟡 +4.32%)
/auth/logout 116.71 KB 270.85 KB 77.39% (🟡 +7.56%)
/auth/saml-idp 111.62 KB 265.76 KB 75.93% (🟡 +8.14%)
/auth/setup 189.03 KB 343.18 KB 98.05% (🟡 +4.34%)
/auth/signin 111.69 KB 265.84 KB 75.95% (🟡 +8.14%)
/auth/sso/[provider] 111.75 KB 265.9 KB 75.97% (🟡 +8.14%)
/auth/sso/direct 111.66 KB 265.81 KB 75.94% (🟡 +8.14%)
/auth/verify 117.98 KB 272.13 KB 77.75% (🟡 +4.90%)
/auth/verify-email 117.07 KB 271.21 KB 77.49% (🟡 +8.13%)
/availability 261.79 KB 415.93 KB 118.84% (🟡 +2.06%)
/availability/[schedule] 347.96 KB 502.11 KB 143.46% (🟡 +1.90%)
/availability/troubleshoot 256.99 KB 411.14 KB 117.47% (🟡 +2.06%)
/booking/[uid] 321.97 KB 476.11 KB 136.03% (🔴 +28.77%)
/bookings/[status] 341.51 KB 495.66 KB 141.62% (🟢 -0.28%)
/d/[link]/[slug] 394.22 KB 548.37 KB 156.68% (🟢 -0.22%)
/event-types 434.07 KB 588.22 KB 168.06% (🟢 -0.20%)
/event-types/[type] 285.48 KB 439.63 KB 125.61% (🟢 -0.28%)
/getting-started/[[...step]] 411.47 KB 565.62 KB 161.61% (🟡 +2.57%)
/insights 468.05 KB 622.2 KB 177.77% (🟢 -0.29%)
/maintenance 111.83 KB 265.98 KB 75.99% (🟡 +8.14%)
/more 255.88 KB 410.03 KB 117.15% (🟡 +2.07%)
/org/[orgSlug] 226.92 KB 381.07 KB 108.88% (🟢 -0.26%)
/org/[orgSlug]/[user] 246.73 KB 400.87 KB 114.53% (🟢 -0.24%)
/org/[orgSlug]/[user]/[type] 394.42 KB 548.57 KB 156.73% (🟢 -0.21%)
/org/[orgSlug]/[user]/[type]/embed 394.45 KB 548.59 KB 156.74% (🟢 -0.22%)
/org/[orgSlug]/team/[slug] 226.93 KB 381.08 KB 108.88% (🟢 -0.25%)
/org/[orgSlug]/team/[slug]/[type] 394.32 KB 548.46 KB 156.70% (🟢 -0.21%)
/payment/[uid] 132.31 KB 286.45 KB 81.84% (🟡 +2.68%)
/settings/admin 261.64 KB 415.79 KB 118.80% (🟡 +2.06%)
/settings/admin/apps 272.87 KB 427.01 KB 122.00% (🟡 +1.75%)
/settings/admin/apps/[category] 272.82 KB 426.97 KB 121.99% (🟡 +1.74%)
/settings/admin/flags 265.13 KB 419.28 KB 119.79% (🟡 +2.07%)
/settings/admin/impersonation 261.91 KB 416.06 KB 118.87% (🟡 +2.07%)
/settings/admin/organizations 262.71 KB 416.85 KB 119.10% (🟡 +2.06%)
/settings/admin/users 263.68 KB 417.83 KB 119.38% (🟡 +2.06%)
/settings/admin/users/[id]/edit 343.23 KB 497.38 KB 142.11% (🟢 -0.29%)
/settings/admin/users/add 342.91 KB 497.06 KB 142.02% (🟢 -0.30%)
/settings/billing 261.8 KB 415.95 KB 118.84% (🟡 +2.07%)
/settings/developer/api-keys 266.32 KB 420.47 KB 120.13% (🟡 +2.07%)
/settings/developer/webhooks 265.8 KB 419.95 KB 119.99% (🟡 +2.05%)
/settings/developer/webhooks/[id] 267.18 KB 421.33 KB 120.38% (🟡 +2.06%)
/settings/developer/webhooks/new 267.05 KB 421.2 KB 120.34% (🟡 +2.07%)
/settings/my-account/appearance 273.35 KB 427.5 KB 122.14% (🟢 -0.29%)
/settings/my-account/calendars 268.15 KB 422.3 KB 120.66% (🟡 +2.06%)
/settings/my-account/conferencing 267.63 KB 421.78 KB 120.51% (🟡 +2.06%)
/settings/my-account/general 347.31 KB 501.45 KB 143.27% (🟡 +2.07%)
/settings/my-account/profile 389.51 KB 543.66 KB 155.33% (🟡 +2.41%)
/settings/organizations/[id]/about 186.39 KB 340.54 KB 97.30% (🟡 +4.66%)
/settings/organizations/[id]/add-teams 186.43 KB 340.58 KB 97.31% (🟡 +4.66%)
/settings/organizations/[id]/onboard-admins 186.45 KB 340.59 KB 97.31% (🟡 +4.66%)
/settings/organizations/[id]/set-password 186.39 KB 340.54 KB 97.30% (🟡 +4.66%)
/settings/organizations/appearance 268.5 KB 422.65 KB 120.76% (🟡 +2.06%)
/settings/organizations/billing 261.65 KB 415.79 KB 118.80% (🟡 +2.06%)
/settings/organizations/general 342.27 KB 496.42 KB 141.83% (🟡 +2.07%)
/settings/organizations/members 292.47 KB 446.61 KB 127.60% (🟡 +2.37%)
/settings/organizations/new 186.37 KB 340.52 KB 97.29% (🟡 +4.66%)
/settings/organizations/profile 384.2 KB 538.35 KB 153.81% (🟡 +2.38%)
/settings/security/impersonation 264.29 KB 418.44 KB 119.55% (🟡 +2.07%)
/settings/security/password 267.48 KB 421.63 KB 120.46% (🟢 -0.37%)
/settings/security/sso 271.08 KB 425.22 KB 121.49% (🟡 +2.07%)
/settings/security/two-factor-auth 266.88 KB 421.03 KB 120.29% (🟡 +2.06%)
/settings/teams 261.4 KB 415.55 KB 118.73% (🟡 +2.06%)
/settings/teams/[id]/appearance 271.1 KB 425.25 KB 121.50% (🟡 +2.06%)
/settings/teams/[id]/billing 261.65 KB 415.8 KB 118.80% (🟡 +2.06%)
/settings/teams/[id]/onboard-members 183.61 KB 337.76 KB 96.50% (🟡 +4.70%)
/settings/teams/[id]/profile 451.96 KB 606.11 KB 173.17% (🟡 +2.08%)
/settings/teams/[id]/sso 271.17 KB 425.32 KB 121.52% (🟡 +2.06%)
/settings/teams/new 207.01 KB 361.16 KB 103.19% (🟡 +4.67%)
/signup 162.82 KB 316.96 KB 90.56% (🟡 +4.33%)
/team/[slug] 226.88 KB 381.03 KB 108.87% (🟢 -0.26%)
/team/[slug]/[type] 394.28 KB 548.43 KB 156.69% (🟢 -0.21%)
/team/[slug]/[type]/embed 394.31 KB 548.46 KB 156.70% (🟢 -0.21%)
/team/[slug]/embed 226.92 KB 381.07 KB 108.88% (🟢 -0.26%)
/teams 256.03 KB 410.18 KB 117.19% (🟡 +2.07%)
/video/[uid] 248.91 KB 403.06 KB 115.16% (🟡 +2.69%)
/video/meeting-ended/[uid] 116.3 KB 270.45 KB 77.27% (🟡 +5.53%)
/video/meeting-not-started/[uid] 115.94 KB 270.09 KB 77.17% (🟡 +5.53%)
/video/no-meeting-found 115.33 KB 269.48 KB 76.99% (🟡 +7.57%)
/workflows 282.68 KB 436.82 KB 124.81% (🟢 -0.30%)
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 "+/- <0.01%" it means that there was a change in bundle size, but it is a trivial enough amount that it can be ignored.

@hariombalhara
Copy link
Copy Markdown
Member Author

@CarinaWolli Up for review again.

Copy link
Copy Markdown
Member

@CarinaWolli CarinaWolli left a comment

Choose a reason for hiding this comment

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

Getting this when trying to use a link for a booking question of type 'Long Text':

Screenshot 2023-07-21 at 13 13 00

@hariombalhara
Copy link
Copy Markdown
Member Author

Yeah only checkbox is supported at the moment

@hariombalhara
Copy link
Copy Markdown
Member Author

Screenshot_2023-07-21-22-48-36-720_com.github.android.jpg

@hariombalhara
Copy link
Copy Markdown
Member Author

Ah I accidentally pushed textarea 😕

@hariombalhara
Copy link
Copy Markdown
Member Author

Fixed.

@alwaysmeticulous
Copy link
Copy Markdown

alwaysmeticulous Bot commented Jul 21, 2023

🤖 Meticulous spotted visual differences in 76 of 188 screens tested: view and approve differences detected.

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

@deploysentinel
Copy link
Copy Markdown

Current Playwright Test Results Summary

✅ 72 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/21/2023 05:30:30pm UTC)

Run Details

Running Workflow PR Update on Github Actions

Commit: a7aa559

Started: 07/21/2023 05:29:13pm UTC

⚠️ Flakes

📄   apps/web/playwright/integrations-stripe.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Stripe integration Pending payment booking should not be confirmed by default
Retry 1Initial Attempt
1.84% (6) 6 / 326 runs
failed over last 7 days
7.98% (26) 26 / 326 runs
flaked over last 7 days

View Detailed Build Results


Copy link
Copy Markdown
Member

@CarinaWolli CarinaWolli left a comment

Choose a reason for hiding this comment

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

Looks good to me now 🙌🏻

@hariombalhara hariombalhara merged commit 61f1a3b into main Jul 21, 2023
@hariombalhara hariombalhara deleted the hariom/cal-1650-ability-to-hyperlink-in-checkbox-field branch July 21, 2023 18:00
fritterhoff pushed a commit to hm-edu/cal.com that referenced this pull request Jul 25, 2023
…locked on another PR] (calcom#8943)

* Support adding links in boolean checkbox

* Fix and comment

* remove textarea, it was accidentally pushed.
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 ✨ feature New feature or request Low priority Created by Linear-GitHub Sync

Projects

No open projects
Status: No status

Development

Successfully merging this pull request may close these issues.

[CAL-1650] Ability to Hyperlink in Checkbox Field

4 participants