Open filipefurtad0 opened 1 year ago
I'm lowering this to S4 considering https://github.com/openfoodfoundation/openfoodnetwork/issues/10537 was only an s4.
Hi, I am newer to this project and was having trouble replicating this locally.
Attached first is how I found this issue on the shopfront as a customer:
Attached second and below is the farthest I got to replicated it locally. I wasn't able to find a way to add the description and add it to an open OC which I think means an order cycle? Any help would be appreciated!
Hey @sumedhavs , welcome :tada:
OC which I think means an order cycle?
Yes - I've updated the description above, with more detailed steps, on how to reproduce the issue. I hope this helps!
Thank you so much, I was able to replicate it! I can work on this issue :)
Just submitted a Pull Request for this issue, https://github.com/openfoodfoundation/openfoodnetwork/pull/10721. Appreciate if you can review at your earliest convenience!
It looks like this was basically done in the attached PR, but a browser (capybara) spec needs adjusting to cater for this.
Re-opening this one, as per #12694.
Description
Relates to https://github.com/openfoodfoundation/openfoodnetwork/issues/10537.
If a product description is set without any line breaks, then the three dots
...
are not displayed correctly when truncating it in the shopfront.EDIT
The text is incorrectly truncated not only in width but also in length, as discussed here.
Expected Behavior
A long product description should be truncated correctly (even if it has no line breaks).
Actual Behaviour
If a product description is set without any line breaks, then the three dots
...
are not displayed correctly when truncating it in the shopfront.Steps to Reproduce
As admin
Log in as an enterprise shop and create shipping/payment methods, and then create two products (1. and 2.) and edit the descriptions respectively:
Incorrectly truncated text in width: Set
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi venenatis metus diam, eget scelerisque nibh auctor non. Vestibulum tempor non dolor id luctus.
as a product description.Incorrectly truncated text in length: Set
<div>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi venenatis metus diam, eget scelerisque nibh auctor non.</div><p><br/></p><p>Vestibulum tempor non dolor id luctus.<br/></p><p><br/></p>
as a product description.Create an order cycle and add the the two products to it. If the order cycle is open, these should be visible in the shopfront. More info on the userguide.
As customer
Please note: this scenario reproduced the S2 regression and requires manual testing of PRs, for this issue.
Animated Gif/Screenshot
Incorrect truncation in width:
Incorrect truncation in length:
Workaround
Add line-breaks to your product description. Details here.
Severity
bug-s3: a feature is broken but there is a workaround
Your Environment
Possible Fix