sindresorhus/refined-github

Do you want to work on this issue?

You can request for a bounty in order to promote it!

`preview-hidden-comments` includes the whole comment in the preview #4524

fregante posted onGitHub


I tried "troubleshooting" this. My finding:

  • First of all, what's "unusual" with this comment by me (and hidden by me), is its <details> which contains a <code> block
  • There are no console errors.
  • (in a fresh Chrome profile with only RG having login to GitHub) I copied-pasted these two comments in a test PR (as draft/non-draft) in my own test repo, where (as admin, I can unhide them) and they are rendered ok: 2021-06-29_235311 Therefore, if it helps, the only difference I can spot between the linked PR in the RG repo and a PR in my test repo, is that in the RG repo, once I hide a comment, I can't unhide it.
posted by darkred almost 4 years ago

Disabled via hotfix, I'm seeing a even-worse behavior in on https://github.com/darkred/test/pull/6

Thank you for looking into it @darkred, but this is what I see, I don’t think it depends on whether one can hide the comments:

<img width="1161" alt="Screen Shot 4" src="https://user-images.githubusercontent.com/1402241/124352032-18ee3900-dc28-11eb-9fa2-d88e5fd85e10.png">

And this is Chrome too, Refined GitHub just installed in a semi-new profile:

<img width="975" alt="Screen Shot" src="https://user-images.githubusercontent.com/1402241/124352124-b184b900-dc28-11eb-8329-ae04c9c0a08a.png">

posted by fregante almost 4 years ago

As a fix, 2 changes are necessary:

  • limit the text via JS, like ${commentText.slice(100)}}</span>`
  • fix the CSS that was used to enable the ellipsis
  • ensure that the "Show comment" toggle stays on the right side instead of collapsing
posted by fregante almost 4 years ago

Test comment

posted by fregante almost 4 years ago

Test comment Test commentTest comment Test commentTest comment Test commentTest comment Test commentTest comment Test commentTest comment Test commentTest comment Test commentTest comment Test commentTest comment Test commentTest comment Test commentTest comment Test commentTest comment Test commentTest comment Test commentTest comment Test commentTest comment Test commentTest comment Test commentTest comment Test commentTest comment Test commentTest comment Test commentTest comment Test commentTest comment Test commentTest comment Test commentTest comment Test commentTest comment Test comment

posted by fregante almost 4 years ago

Fund this Issue

$0.00
Funded
Only logged in users can fund an issue

Pull requests