Commit Graph

7 Commits

Author SHA1 Message Date
John Knox
2f3b9e1be9 Increase line height of markdown text
Summary: Lines were a bit squashed together. Taken the value from workplace, as that's the style we've been copying so far.

Reviewed By: priteshrnandgaonkar

Differential Revision: D19430279

fbshipit-source-id: 52cc8167d6acaa6af42caaa67a693b5fda492701
2020-01-16 09:39:52 -08:00
Anton Nikolaev
c0f902f81a Upgrade to emotion v10
Summary: React 16 is not compatible with react-emotion 9 (it prints warnings, see also https://github.com/emotion-js/emotion/issues/644). So we should upgrade to 10.

Reviewed By: mweststrate

Differential Revision: D18905889

fbshipit-source-id: c00d2dbbadb1c08544632cb9bfcd63f2b1818a25
2019-12-11 09:43:24 -08:00
John Knox
beff2c4cac Display post preview before submitting support request
Summary:
The Markdown component wasn't rendering a single component, so I put it in a container.
Also added a margin bottom so it didn't look out of place. There's probably a nicer way to do that.

Reviewed By: mweststrate

Differential Revision: D18749381

fbshipit-source-id: ea7827dc7e6141fb0dbd5886356736da4b50f5dc
2019-12-02 04:28:10 -08:00
John Knox
3f7fa0eb1a Use workplace markdown style
Summary: Mimicking the workplace markdown style so people feel more familiar with it and don't get surprises when posting.

Reviewed By: passy

Differential Revision: D18639041

fbshipit-source-id: 0097087b8ae4da8e29609604eeffd5b349ebe7ab
2019-11-22 07:02:49 -08:00
John Knox
018ed212bc Improve markdown header spacing
Summary:
The spacing above headings didn't look right.

Also workplace purposely limits the different heading sizes to 2 to encourage using notes for large posts. So I'm changing this to match. If we need to have arbitrary depth in future, we can add a `workplaceMode` toggle, but so far that's the only use case we have.

Reviewed By: mweststrate

Differential Revision: D18638861

fbshipit-source-id: 3949a37515e4282bb8435c2740ef45a55e5a97cc
2019-11-22 07:02:49 -08:00
John Knox
d7cfefb2bd Add markdown preview to support request composer
Summary:
Adds a side-by-side markdown preview to the support form.
No time spent on UI because it makes sense to do it all together.

There also seems to be a problem with state updates not propagating when values are changed, so currently it never gets updated.

Reviewed By: passy

Differential Revision: D18638025

fbshipit-source-id: c4a49286434c7e2e85d532aef3a36924e02a4467
2019-11-22 07:02:48 -08:00
John Knox
352d9c82cb Add Markdown component to render markdown
Summary:
Adds a Markdown component to the component library.

The react-markdown library doesn't work out of the box because elements it outputs don't have any styles, e.g. h1, h2, p, em, etc.

So I've added a custom renderer to give styles to each of these that workplace markdown uses.
The only one I haven't done at the moment that I'm aware of is numbered-lists.

There's probably a way to get back the original styling of these elements so we don't need a custom renderer, but this works for now, and also allows us to customise their appearance.

Reviewed By: passy

Differential Revision: D18533085

fbshipit-source-id: a4332a11d34d577a6300074e4dde126362d46a6b
2019-11-19 05:52:51 -08:00