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

[USERSNAP] Parse markdown in Posts, Applications, Profiles #2712

Closed
4 tasks
dmtrjsg opened this issue Mar 28, 2022 · 11 comments
Closed
4 tasks

[USERSNAP] Parse markdown in Posts, Applications, Profiles #2712

dmtrjsg opened this issue Mar 28, 2022 · 11 comments
Assignees
Labels
bug Something isn't working community-dev issue suitable for community-dev pipeline enhancement New feature or request high-prio qa-task release:stabilisation7 SP:5 ux user experience improvements

Comments

@dmtrjsg
Copy link
Contributor

dmtrjsg commented Mar 28, 2022

Scope

Add markdown interpretation in all fields initially created with CK Editor (Description/ Forum posts etc)

  • Interpret internal identifiers
  • external links
  • headings in text fields
  • Line breaks

⚠️ We do not use markdown in Field form Entries (like titles etc..)


This should cover all text fields, but specifically:

  • Proposal/ bounty discussion
  • Forum post
  • Widgets with text shown in them
  • Application
  • proposals descriptions
  • proposal rationales
  • wg roles applications
  • election candidates
  • bounty descriptions Bounty descriptions do not work correctly #3218
  • work submitted
  • Oracle rationale for judgement

Out of scope:

  • Widgets with text shown in them

Context


Taken at: https://dao.joystream.org/#/working-groups/openings/operationsWorkingGroupAlpha-1
Fields:

  • Houston, we have a problem.: Parse markdown in Posts, Applications, Profiles
  • Give us some details: There are several places where user can input text but markdown links and headings are usually not interpreted.
  • This is a downgrade from previous Pioneer.

SCREENSHOT
Download original image

Browser: Chrome 99 (Linux)
Screen size: 1920x1080
Browser size: 2390x1216
Labels: enhancement
Open #159 in Usersnap

Powered by Usersnap.

@dmtrjsg dmtrjsg added the bug Something isn't working label Mar 28, 2022
@dmtrjsg dmtrjsg self-assigned this Mar 28, 2022
@dmtrjsg dmtrjsg added enhancement New feature or request ux user experience improvements labels Mar 31, 2022
@dmtrjsg dmtrjsg added the community-dev issue suitable for community-dev pipeline label Apr 22, 2022
@dmtrjsg dmtrjsg removed their assignment Apr 25, 2022
@bit2world
Copy link
Contributor

@talentdev0807

@singulart
Copy link
Contributor

The component used at Joystream as WYSIWYG editor (CK Editor) has an open issue ckeditor/ckeditor5#2321 that is exactly about being able to paste md content to a text area and then seeing that text as html. I am not sure if Joystream Builders are in the position to fix any downstream components issues, such as the above. For now I am closing this issue as Won't Fix

@singulart singulart assigned dmtrjsg and unassigned bit2world May 11, 2022
@thesan
Copy link
Collaborator

thesan commented May 11, 2022

@singulart @talentdev0807 I tried to clarify the description a bit, but this issue is not about parsing markdown in CK editor. It's about using <MarkdownPreview /> component to parse the markdown on the app, e.g here:

SCREENSHOT
Download original image

We mentioned CK Editor because it's hard to know which fields are markdown vs plain text (they're all Strings in the QN schema), thus the fields that are initially created with CK Editor are those that should be parse in other places with <MarkdownPreview />

@thesan thesan reopened this May 11, 2022
@bit2world
Copy link
Contributor

When it comes to talk about , it is just for converting markdown to React JSX to display it on web page
so if the input of is wrong I mean it is not a Markdown format, we will get wrong result
The input of comes from CK Editor

@traumschule
Copy link
Collaborator

The input for existing posts should come from the QN / chain. My suggestion: If Markdown parser succeeds display that otherwise render with CK.

@thesan
Copy link
Collaborator

thesan commented May 11, 2022

@talentdev0807 if I understand correctly you mean that the text (in the screenshot for example) gets rendered through <MarkdownPreview /> but ReactMarkdown fails to render it ? If it's the case could you post an example of the text which doesn't get parsed correctly please ? Maybe the text gets wrongly escaped somewhere.

In any case I don't think rendering CKE is a viable solution, it would be confusing and if the text is escaped somewhere else CKE wouldn't render it well either...

@oleksanderkorn
Copy link
Contributor

oleksanderkorn commented May 30, 2022

image

Text which comes to MarkdownPreview is escaped with backslash. When i put normal markdown inside the MardkdownPreview component it works as exepected:

image

When I strip slashes using regexp it seems to be working as expected:
image

@thesan wdyt?

@dmtrjsg dmtrjsg added the qa-task label Jun 2, 2022
@polikosi
Copy link
Collaborator

polikosi commented Jun 3, 2022

⚠️ Proposal discussion:
strikethrough, block quote and bulleted list don't work correctly
Screenshot_65
Screenshot_66

Bounty discussion:
Screenshot_82
Screenshot_83

⚠️ Forum post:
strikethrough, block quote and bulleted list don't work correctly
Screenshot_63
Screenshot_64

Widgets with text shown in them:

🚫 Application:
Screenshot_67

⚠️ Proposals descriptions:
strikethrough, block quote and bulleted list don't work correctly
Screenshot_69
Screenshot_70

⚠️Proposal rationales:
strikethrough, block quote and bulleted list don't work correctly
Screenshot_68
Screenshot_71

🚫 WG roles applications:
Screenshot_72

⚠️Election candidates:
strikethrough, block quote and bulleted list don't work correctly
Screenshot_73
Screenshot_74

⚠️Bounty descriptions:
strikethrough, block quote and bulleted list don't work correctly
Screenshot_80
Screenshot_81

🚫Work submitted:
Screenshot_84

Oracle rationale for judgement:
Screenshot_85

@dmtrjsg
Copy link
Contributor Author

dmtrjsg commented Jun 14, 2022

⚠️ pls address all areas outside of Bounties module, since it is being deprecated very soon in the light of new version upgrade later.

@polikosi
Copy link
Collaborator

polikosi commented Jun 14, 2022

Proposal discussion:
Screenshot_114

Forum post:
Screenshot_116

⚠️Widgets with text shown in them:
Can you explain what you mean?
because I do not fully understand what it is and how to do it right

🚫Application:
Screenshot_117

proposals descriptions:
Screenshot_119

proposal rationales:
Screenshot_120

🚫wg roles applications:
Screenshot_122

election candidates:
Screenshot_121

@dmtrjsg
Copy link
Contributor Author

dmtrjsg commented Jun 20, 2022

@polikosi it certainly did make total sense at the time of writing it up and grooming, but cannot connect the dots now. Pls skip this point and I will mark this as a strike-through and out of scope. Thank you for asking!

@dmtrjsg dmtrjsg closed this as completed Jun 23, 2022
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-dev issue suitable for community-dev pipeline enhancement New feature or request high-prio qa-task release:stabilisation7 SP:5 ux user experience improvements
Projects
None yet
Development

No branches or pull requests

7 participants