From bb7061b5917b5e111d1621f6a480e2137616355a Mon Sep 17 00:00:00 2001 From: Matilde Park Date: Tue, 4 Feb 2020 18:28:05 -0500 Subject: [PATCH 1/4] chat: filter empty groups from peer search --- pkg/interface/chat/src/js/components/lib/invite-search.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/interface/chat/src/js/components/lib/invite-search.js b/pkg/interface/chat/src/js/components/lib/invite-search.js index efe9b02d16..df5007d2c4 100644 --- a/pkg/interface/chat/src/js/components/lib/invite-search.js +++ b/pkg/interface/chat/src/js/components/lib/invite-search.js @@ -36,7 +36,9 @@ export class InviteSearch extends Component { let peers = [], peerSet = new Set(); Object.keys(this.props.groups).map(group => { - peerSet.add(...this.props.groups[group]); + if (this.props.groups[group].size > 0) { + peerSet.add(...this.props.groups[group]); + } }); peers = Array.from(peerSet); From 980b3be8bb23ec18e4ebd11d81b56fd18d99f62d Mon Sep 17 00:00:00 2001 From: Jimmy Date: Wed, 5 Feb 2020 15:35:20 -0800 Subject: [PATCH 2/4] markdown spacing --- pkg/interface/publish/src/css/custom.css | 31 +++++++++++++++++++ .../src/js/components/lib/note-navigation.js | 2 +- .../publish/src/js/components/lib/note.js | 14 ++++----- 3 files changed, 39 insertions(+), 8 deletions(-) diff --git a/pkg/interface/publish/src/css/custom.css b/pkg/interface/publish/src/css/custom.css index 06e7ae1c47..27ef2978b4 100644 --- a/pkg/interface/publish/src/css/custom.css +++ b/pkg/interface/publish/src/css/custom.css @@ -176,3 +176,34 @@ a { .no-scrollbar::-webkit-scrollbar { display: none; } + +.md h1, .md h2, .md h3, .md h4, .md h5, .md p, .md a, .md ul, .md blockquote,.md code,.md pre { + font-size: 14px; + margin-bottom: 16px; +} + +.md h2, .md h3, .md h4, .md h5, .md p, .md a, .md ul { + font-weight: 400; +} + +.md h1 { + font-weight: 600; +} + +.md h2, .md h3, .md h4, .md h5 { + color:var(--gray); +} + +.md p { + line-height: 1.5; +} +.md code, .md pre { + font-family: "Source Code Pro", mono; +} +.md ul>li { + line-height: 1.5; +} +.md a { + border-bottom-style: solid; + border-bottom-width: 1px; +} diff --git a/pkg/interface/publish/src/js/components/lib/note-navigation.js b/pkg/interface/publish/src/js/components/lib/note-navigation.js index a0d87382ec..f6dfc12e9e 100644 --- a/pkg/interface/publish/src/js/components/lib/note-navigation.js +++ b/pkg/interface/publish/src/js/components/lib/note-navigation.js @@ -51,7 +51,7 @@ export class NoteNavigation extends Component { } return ( -
+
{prevComponent} {nextComponent}
diff --git a/pkg/interface/publish/src/js/components/lib/note.js b/pkg/interface/publish/src/js/components/lib/note.js index 1bd2cdddae..59e19b6233 100644 --- a/pkg/interface/publish/src/js/components/lib/note.js +++ b/pkg/interface/publish/src/js/components/lib/note.js @@ -2,8 +2,7 @@ import React, { Component } from 'react'; import { Comments } from './comments'; import { NoteNavigation } from './note-navigation'; import moment from 'moment'; -import ReactMarkdown from 'react-markdown' -// import test from 'test.json'; +import ReactMarkdown from 'react-markdown'; //TODO ask for note if we don't have it //TODO initialise note if no state @@ -129,13 +128,14 @@ export class Note extends Component {
{title}
-
-
{author}
-
{date}
+
+
{author}
+
{date}
- - +
+ +
Date: Wed, 5 Feb 2020 15:41:51 -0800 Subject: [PATCH 3/4] add pointer hover state --- pkg/interface/publish/src/js/components/lib/comments.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/interface/publish/src/js/components/lib/comments.js b/pkg/interface/publish/src/js/components/lib/comments.js index fbf81bad56..14fc1370c4 100644 --- a/pkg/interface/publish/src/js/components/lib/comments.js +++ b/pkg/interface/publish/src/js/components/lib/comments.js @@ -45,7 +45,7 @@ export class Comments extends Component {
-
From e0451770318f8dc2a7de70c8c0324bb5889d4e81 Mon Sep 17 00:00:00 2001 From: Jimmy Date: Wed, 5 Feb 2020 15:47:54 -0800 Subject: [PATCH 4/4] give some small padding on image to make it vertical spacing more even --- pkg/interface/publish/src/css/custom.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/interface/publish/src/css/custom.css b/pkg/interface/publish/src/css/custom.css index 27ef2978b4..59e0dc780a 100644 --- a/pkg/interface/publish/src/css/custom.css +++ b/pkg/interface/publish/src/css/custom.css @@ -207,3 +207,7 @@ a { border-bottom-style: solid; border-bottom-width: 1px; } + +md img { + margin-bottom: 8px; +}