Giveth / DeVouch-BE

DeVouch - Decentralized Vouching via Attestations
GNU General Public License v3.0
22 stars 2 forks source link

Convert project description responses to HTML #69

Closed divine-comedian closed 3 months ago

divine-comedian commented 3 months ago

I've fixed the length, but to show the styled version, we need to convert it to the html on BE, I'll do it after the MVP.

Originally posted by @MohammadPCh in https://github.com/Giveth/DeVouch-FE/issues/65#issuecomment-2151937354


In order to properly handle markdown formatted responses received in the project description we'll need to convert it to HTML in the back-end. This will allow us to show properly formatted project descriptions

e.g. of the visual problems we hope to solve: image

image

divine-comedian commented 3 months ago

for retrofunding projects we are not considering the line breaks provided in the response to format the descriptions on the devouch UI

image

also some projects have markdown formatting for headers we should consider, either show the headers or remove the markdown syntax image

query MyQuery {
  projectById(id: "rf4-0x897d6172efca2d24a6b14f235db5127f7d747d923287ede38d776126bf02cbfe") {
    description
    id
  }
}
MohammadPCh commented 3 months ago

@maryjaf READY TO TEST

maryjaf commented 3 months ago

also some projects have markdown formatting for headers we should consider, either show the headers or remove the markdown syntax

It seems it hasn't been fixed. @MohammadPCh https://staging.devouch.xyz/project/rf4/0x2a3435d9ce08d7c960819e627601ce3907ff0fea5ae7e7d111a869d815a2eb89

MohammadPCh commented 3 months ago

@maryjaf It's looking fine for me:

Screenshot 2024-06-12 at 9 44 01 PM

Maybe it was in the build queue when you tested it. can you check it again?

divine-comedian commented 3 months ago

@maryjaf It's looking fine for me: Screenshot 2024-06-12 at 9 44 01 PM Maybe it was in the build queue when you tested it. can you check it again?

Is it possible to also handle the markdown formatting?

aminlatifi commented 3 months ago

@maryjaf It's looking fine for me: Screenshot 2024-06-12 at 9 44 01 PM Maybe it was in the build queue when you tested it. can you check it again?

Is it possible to also handle the markdown formatting?

We have handled md formatting, for gitcoin. But we are not sure Retro Funding 4 projects' description are text or md?

maryjaf commented 3 months ago

It's looking fine for me:

Screenshot 2024-06-12 at 9 44 01 PM

Maybe it was in the build queue when you tested it. can you check it again?

I meant these headers, Is this the expected result ? @MohammadPCh

Giveth supports P2P donations on Optimism and Base.

How it works

divine-comedian commented 3 months ago

Good question!

I can only find the Giveth project that makes use of markdown formatting - I'm not sure we can find other applications that also use markdown, at any rate, if we can at least handle header types and space breaks I think it will satisfy the requirements for now.