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

UI is not rendering the HTML description Properly #1893

Closed
victors1682 opened this issue Jul 18, 2023 · 7 comments
Closed

UI is not rendering the HTML description Properly #1893

victors1682 opened this issue Jul 18, 2023 · 7 comments
Labels
bug Something isn't working

Comments

@victors1682
Copy link
Contributor

victors1682 commented Jul 18, 2023

Describe the bug
UI is not rendering the HTML description of the product properly

Steps to reproduce
Go to any PDP page

Screenshot
Screenshot 2023-07-18 at 1 01 31 PM

#evergreen
"@faststore/core": "2.1.43",

@victors1682 victors1682 added the bug Something isn't working label Jul 18, 2023
@hellofanny
Copy link
Contributor

Thanks for reporting!
How are you passing this description data to this component?

@victors1682
Copy link
Contributor Author

the descriptions are coming from the CMS

<p><span style="color: rgb(0,0,0);background-color: rgb(255,255,255);font-size: 16px;font-family: Work Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;">Our Rest Day shirt is the perfect long sleeve tee that is incredibly soft with great drape, stretch, and recovery with a vintage look.</span></p>

Screenshot 2023-07-18 at 1 43 12 PM

This is how it looks old version of Strorefront

Screenshot 2023-07-18 at 1 45 13 PM

@batzlerg
Copy link
Contributor

to clarify:

the descriptions are coming from the CMS

the descriptions are coming from the product description field in the catalog data model, not the headless CMS backing FastStore.

for parity with the corresponding Store Framework component, the ProductDescription component should handle HTML text instead of assuming plaintext...whether that's the FS team's design intention or not is unclear.

@eduardoformiga
Copy link
Member

So far this field comes from the catalog as mentioned above, and is being rendered as String inside a <p> tag (reference link). Initially, that's the intention, but I'll open this conversation with the team so that we could analyze if we can create html handles here.

@Lucaspoladore
Copy link

Giving my 2 cents here while following-up:

@hellofanny @eduardoformiga since Portal and Storeframework this is a fairly common way of utilizing product descriptions to render differently.

I'm ok with this changing and finding another way to properly render if we don't create html handles, but this should be well communicated to the community, since it's an old practice =)

@emersonlaurentino
Copy link
Member

Hi folks, the problem here is the fact the description renders pure HTML with your tags to avoid the content stylized?

@icazevedo
Copy link
Contributor

#2050 fixed this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants