accordproject / web-components

React Components for Accord Project
Apache License 2.0
117 stars 94 forks source link

Discuss how many heading options should be in the markdown editor and contract editor #280

Closed Michael-Grover closed 3 years ago

Michael-Grover commented 3 years ago

In the markdown editor UI, users can currently choose three heading styles (H1, H2, H3), however markdown allows for 6 heading styles. The team needs to decide whether this many styles is necessary for editing contracts. I suggest discussing the topic at the Technology Working Group Call on March 10th so that we can have the input of engineers and lawyers.

Context

The issue was discussed a bit here: https://github.com/accordproject/web-components/issues/276

jeromesimeon commented 3 years ago

For reference:

CommonMark: 6 https://spec.commonmark.org/0.29/#atx-heading

Test In TemplateMark Dingus

HTML: 6 https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Heading_Elements

Google Docs: 3

MS Word: 9

jeromesimeon commented 3 years ago

I think the drawbacks for not following the markdown spec are significant.

It means some markdown document will not properly render in the editor (or cannot be properly modified).

It also means cut-paste from HTML will lose information.

Michael-Grover commented 3 years ago

Based on the tech WG call on March 10, it's my understanding that we are including all 6 headers in the style dropdown, and leaving it up to the consumer of the component how they want to style those headers.

d-e-v-esh commented 3 years ago

@Michael-Grover Should I start to work on including them in the main dropdown list? Should the H1, H2, and H3 get bigger in size?

Michael-Grover commented 3 years ago

@d-e-v-esh yes, let's make h1 = 25px (stays the same) h2 = 25px (keep h2 left aligned to differentiate from H1) h3 = 20px h4 = 18px h5 = 16px h6 = 14px (same size as normal paragraph), but make the font and color the same as what we use for the page break text. H6 should be all capital letters: image

Michael-Grover commented 3 years ago

@d-e-v-esh let me know if you'd like me to create an issue for this. Feel free to create an issue or PR. If you create an issue, @ me and I'll assign it to you.