Chat/comment markdown and style fixes #7193

Closed
saltrafael wants to merge 6 commits from chat-markdown into master
saltrafael commented 2021-09-30 14:19:31 +02:00 (Migrated from github.com)

Fixes

Issue Number: Closes #5560, closes #5845, closes #5561

PR Checklist

Toggle...

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting)
  • Refactoring (no functional changes)
  • Documentation changes
  • Other - Please describe:

Please check all that apply to this PR using "x":

  • I have checked that this PR is not a duplicate of an existing PR (open, closed or merged)
  • I added a line describing my change to CHANGELOG.md
  • I have checked that this PR does not introduce a breaking change
  • This PR introduces breaking changes and I have provided a detailed explanation below
## Fixes Issue Number: Closes #5560, closes #5845, closes #5561 ## PR Checklist <!-- For the checkbox formatting to work properly, make sure there are no spaces on either side of the "x" --> <details><summary>Toggle...</summary> What kind of change does this PR introduce? - [X] Bugfix - [ ] Feature - [ ] Code style update (formatting) - [ ] Refactoring (no functional changes) - [ ] Documentation changes - [ ] Other - Please describe: Please check all that apply to this PR using "x": - [X] I have checked that this PR is not a duplicate of an existing PR (open, closed or merged) - [ ] I added a line describing my change to CHANGELOG.md - [X] I have checked that this PR does not introduce a breaking change - [ ] This PR introduces breaking changes and I have provided a detailed explanation below </details>
tzarebczan commented 2021-09-30 20:06:03 +02:00 (Migrated from github.com)

Does this require a certain level to do markdown?

Does this require a certain level to do markdown?
saltrafael commented 2021-10-08 15:33:22 +02:00 (Migrated from github.com)

I think this might be ready for merge now. Just did fixes around markdown and styles and can handle what to do with image embeds later with stickers

embeds that require channel stake weren't resized properly:
image.png image.png

fixed overflow on embed on super-chat causing scroll issues:
image

removed "copy comment link" from chat comments:
image.png

multiple quotes will show once and won't break live chat:
image.png image.png

I think this might be ready for merge now. Just did fixes around markdown and styles and can handle what to do with image embeds later with stickers embeds that require channel stake weren't resized properly: [![image.png](https://i.postimg.cc/zfP6yPQt/image.png)](https://postimg.cc/KKBJVQxB) [![image.png](https://i.postimg.cc/6pJPRvYK/image.png)](https://postimg.cc/hfsMRhkZ) fixed overflow on embed on super-chat causing scroll issues: ![image](https://user-images.githubusercontent.com/76502841/136565493-26194302-dcad-425b-a270-10a21872667f.png) removed "copy comment link" from chat comments: [![image.png](https://i.postimg.cc/HWPwf1yP/image.png)](https://postimg.cc/8sMf63wh) multiple quotes will show once and won't break live chat: [![image.png](https://i.postimg.cc/hPxtBNj0/image.png)](https://postimg.cc/svjrP65B) [![image.png](https://i.postimg.cc/mD60zZdF/image.png)](https://postimg.cc/CBkv90pF)
infinite-persistence (Migrated from github.com) requested changes 2021-10-11 18:29:52 +02:00
infinite-persistence (Migrated from github.com) commented 2021-10-11 18:20:59 +02:00

Not sure why, but with a level 5 account, the comment menu button doesn't popup after I send the following message. After I refresh, then it allows me to Remove my comment. Was using Brave (not sure if it matters)

- Just http link (should not embed):
https://www.google.com

- Just http link of claim (should embed):
https://lbry.tv/@lbry:3f/levelsonodysee:c


Using iframe with lbry link (should embed):
<iframe src="lbry://@lbry#3f/befreeonlbry#5"></iframe>

Using iframe with http link of claim (should embed):
<iframe src="https://lbry.tv/@lbry:3f/levelsonodysee:c"></iframe>

lbry link (should embed):
lbry://@lbry#3f/befreeonlbry#5
Not sure why, but with a level 5 account, the comment menu button doesn't popup after I send the following message. After I refresh, then it allows me to Remove my comment. Was using Brave (not sure if it matters) ``` - Just http link (should not embed): https://www.google.com - Just http link of claim (should embed): https://lbry.tv/@lbry:3f/levelsonodysee:c Using iframe with lbry link (should embed): <iframe src="lbry://@lbry#3f/befreeonlbry#5"></iframe> Using iframe with http link of claim (should embed): <iframe src="https://lbry.tv/@lbry:3f/levelsonodysee:c"></iframe> lbry link (should embed): lbry://@lbry#3f/befreeonlbry#5 ```
@ -12,3 +12,3 @@
import defaultSchema from 'hast-util-sanitize/lib/github.json';
import { formatedLinks, inlineLinks } from 'util/remark-lbry';
import { formattedLinks, inlineLinks } from 'util/remark-lbry';
import { formattedTimestamp, inlineTimestamp } from 'util/remark-timestamp';
infinite-persistence (Migrated from github.com) commented 2021-10-11 17:50:36 +02:00

Dash parsing in channel name broken

I think this issue came from changes in Channel Mention. Can fix together if possible:

In a post,

----
Playlist:
<iframe id="lbry-iframe" width="560" height="315" src="https://lbry.tv/$/embed/Wrestling/e9a586dcf13c5fe8f30692c6b39d1c8e9323ea69?r=4bWsJBCcfyXoHwYBHEXV61pTrf3RW5Fe" allowfullscreen></iframe>

<iframe src="lbry://@ip-test-2#c/Wrestling#e"></iframe>

<iframe id="lbry-iframe" width="560" height="315" src="lbry://@ip-test-2#c/Wrestling#e" allowfullscreen></iframe>
----

yields:
image

The commit before Channel Mention yields (the correct version):
image

## Dash parsing in channel name broken I think this issue came from changes in Channel Mention. Can fix together if possible: In a post, ``` ---- Playlist: <iframe id="lbry-iframe" width="560" height="315" src="https://lbry.tv/$/embed/Wrestling/e9a586dcf13c5fe8f30692c6b39d1c8e9323ea69?r=4bWsJBCcfyXoHwYBHEXV61pTrf3RW5Fe" allowfullscreen></iframe> <iframe src="lbry://@ip-test-2#c/Wrestling#e"></iframe> <iframe id="lbry-iframe" width="560" height="315" src="lbry://@ip-test-2#c/Wrestling#e" allowfullscreen></iframe> ---- ``` yields: ![image](https://user-images.githubusercontent.com/64950861/136819141-830232df-31d2-464c-82c7-30c7b795add5.png) The commit before Channel Mention yields (the correct version): ![image](https://user-images.githubusercontent.com/64950861/136819409-1d3c06c9-a927-4e7f-8bc6-7a1ac5a9d81d.png)
@ -13,3 +13,3 @@
import { formatedLinks, inlineLinks } from 'util/remark-lbry';
import { formattedLinks, inlineLinks } from 'util/remark-lbry';
import { formattedTimestamp, inlineTimestamp } from 'util/remark-timestamp';
import ZoomableImage from 'component/zoomableImage';
infinite-persistence (Migrated from github.com) commented 2021-10-11 17:54:20 +02:00

Some embeds not showing

The picture on the left is before the Channel Mention commit. The picture on the right is this PR.

image

The markdown is:

----
Video 1:
<iframe src="lbry://@Tasteshow#9/the-crispiest-chicken-wings-recipe-with#9"></iframe>
----
## Some embeds not showing The picture on the left is before the Channel Mention commit. The picture on the right is this PR. ![image](https://user-images.githubusercontent.com/64950861/136819818-d82f98c8-50a4-4e5c-86eb-3e0fe3376767.png) The markdown is: ``` ---- Video 1: <iframe src="lbry://@Tasteshow#9/the-crispiest-chicken-wings-recipe-with#9"></iframe> ---- ```
@ -14,3 +13,4 @@
import { formattedLinks, inlineLinks } from 'util/remark-lbry';
import { formattedTimestamp, inlineTimestamp } from 'util/remark-timestamp';
import ZoomableImage from 'component/zoomableImage';
import { CHANNEL_STAKED_LEVEL_VIDEO_COMMENTS, SIMPLE_SITE } from 'config';
infinite-persistence (Migrated from github.com) commented 2021-10-11 18:08:37 +02:00

#5845 says "don't allow embeds on livestreams", but with a level 5 account, I was able to.

image

#5845 says "don't allow embeds on livestreams", but with a level 5 account, I was able to. ![image](https://user-images.githubusercontent.com/64950861/136821799-5d0ef4f4-7804-4a94-a991-0e996560d1bd.png)
@ -274,3 +276,4 @@
}
}
p {
infinite-persistence (Migrated from github.com) commented 2021-10-11 18:11:16 +02:00

On large layout, the bullet appears correctly, but on small, it doesn't appear.

image

On large layout, the bullet appears correctly, but on small, it doesn't appear. ![image](https://user-images.githubusercontent.com/64950861/136822121-33cf9a8a-6df7-4fbe-9926-4526df5b45d6.png)
infinite-persistence (Migrated from github.com) reviewed 2021-10-11 18:34:52 +02:00
@ -14,3 +13,4 @@
import { formattedLinks, inlineLinks } from 'util/remark-lbry';
import { formattedTimestamp, inlineTimestamp } from 'util/remark-timestamp';
import ZoomableImage from 'component/zoomableImage';
import { CHANNEL_STAKED_LEVEL_VIDEO_COMMENTS, SIMPLE_SITE } from 'config';
infinite-persistence (Migrated from github.com) commented 2021-10-11 18:34:51 +02:00

Same goes for images. I thought we were supposed to disable them in favor of stickers (I could be wrong)

image

Same goes for images. I thought we were supposed to disable them in favor of stickers (I could be wrong) ![image](https://user-images.githubusercontent.com/64950861/136824947-24f39aac-e43c-402b-9883-e0e657729320.png)
saltrafael (Migrated from github.com) reviewed 2021-10-12 14:59:51 +02:00
@ -14,3 +13,4 @@
import { formattedLinks, inlineLinks } from 'util/remark-lbry';
import { formattedTimestamp, inlineTimestamp } from 'util/remark-timestamp';
import ZoomableImage from 'component/zoomableImage';
import { CHANNEL_STAKED_LEVEL_VIDEO_COMMENTS, SIMPLE_SITE } from 'config';
saltrafael (Migrated from github.com) commented 2021-10-12 14:59:51 +02:00

yeah those will be disabled along with the stickers, so it's okay for now

yeah those will be disabled along with the stickers, so it's okay for now
saltrafael (Migrated from github.com) reviewed 2021-10-12 15:01:37 +02:00
saltrafael (Migrated from github.com) commented 2021-10-12 15:01:37 +02:00

Didn't get this one, weird... let me know if it happens again or in another way

Didn't get this one, weird... let me know if it happens again or in another way

Pull request closed

Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: LBRYCommunity/lbry-desktop#7193
No description provided.