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: Description not rendered as html in select event types screen when installing an app #18354

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

asadath1395
Copy link
Contributor

What does this PR do?

Description not rendered properly in select event types screen if it has html elements when installing an app

Issue:

Screenshot 2024-12-23 at 5 43 32 PM

After solution:

Screenshot 2024-12-23 at 5 46 54 PM

Note: Right now there is a trimming happening which is similar behaviour we have in /event-types screen

Mandatory Tasks (DO NOT REMOVE)

  • I have self-reviewed the code (A decent size PR without self-review might be rejected).
  • I have updated the developer docs in /docs if this PR makes changes that would require a documentation change. If N/A, write N/A here and check the checkbox.
  • I confirm automated tests are in place that prove my fix is effective or that my feature works.

How should this be tested?

  • Create an event with a description having links, bold or italic components
  • Install any app where selecting event type screen comes like google meet
  • Verify the html is properly rendered similar to other places like event types screen

Copy link

vercel bot commented Dec 23, 2024

@asadath1395 is attempting to deploy a commit to the cal Team on Vercel.

A member of the Team first needs to authorize it.

@graphite-app graphite-app bot added the community Created by Linear-GitHub Sync label Dec 23, 2024
@graphite-app graphite-app bot requested a review from a team December 23, 2024 12:28
@dosubot dosubot bot added event-types area: event types, event-types 🐛 bug Something isn't working labels Dec 23, 2024
Copy link

graphite-app bot commented Dec 23, 2024

Graphite Automations

"Add consumer team as reviewer" took an action on this PR • (12/23/24)

1 reviewer was added to this PR based on Keith Williams's automation.

"Add community label" took an action on this PR • (12/23/24)

1 label was added to this PR based on Keith Williams's automation.

@Praashh Praashh self-assigned this Dec 23, 2024
Copy link
Contributor

@Praashh Praashh left a comment

Choose a reason for hiding this comment

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

It’s working fine for me. On which app is it not rendering HTML? @asadath1395

@@ -4,6 +4,7 @@ import React from "react";
import { useFieldArray, useFormContext } from "react-hook-form";

import { useLocale } from "@calcom/lib/hooks/useLocale";
import { markdownToSafeHTML } from "@calcom/lib/markdownToSafeHTML";
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't we need to use markdownToSafeHTMLClient here? Could you please verify? Apart from this, it's okay

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It seems to throw error for me because of server-side rendering issue with DOMPurify. ref: vercel/next.js#46893. Maybe @SomayChauhan can help here since he implemented that function

@asadath1395
Copy link
Contributor Author

It’s working fine for me. On which app is it not rendering HTML? @asadath1395

Can you share screenshot? I was trying with google meet but the issue should appear in many apps. It is not an issue with any apps but soon after installing the app we ask users to select event types to which we want to install the app.

@Praashh
Copy link
Contributor

Praashh commented Dec 23, 2024

you can see here @asadath1395, am also trying for gmeet.
Screenshot 2024-12-23 at 9 59 21 PM

@asadath1395
Copy link
Contributor Author

asadath1395 commented Dec 23, 2024

you can see here @asadath1395, am also trying for gmeet. Screenshot 2024-12-23 at 9 59 21 PM

You didn't add any description to the event. This is mentioned in steps to reproduce Create an event with a description having links, bold or italic components

@Praashh
Copy link
Contributor

Praashh commented Dec 23, 2024

@asadath1395 can you see
Screenshot 2024-12-23 at 10 06 09 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working community Created by Linear-GitHub Sync event-types area: event types, event-types
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants