From 47dc4cd889636e4046476cc8ee4e42c4547cf662 Mon Sep 17 00:00:00 2001 From: Matilde Park Date: Fri, 30 Oct 2020 15:50:30 -0400 Subject: [PATCH 01/14] launch: remove sigil tile --- pkg/interface/src/views/apps/launch/app.js | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/pkg/interface/src/views/apps/launch/app.js b/pkg/interface/src/views/apps/launch/app.js index 6acaae577..dbe8451ac 100644 --- a/pkg/interface/src/views/apps/launch/app.js +++ b/pkg/interface/src/views/apps/launch/app.js @@ -20,12 +20,6 @@ export default class LaunchApp extends React.Component { render() { const { props } = this; - const contact = props.contacts?.['/~/default']?.[window.ship]; - const sigilColor = contact?.color - ? `#${uxToHex(contact.color)}` - : props.dark - ? '#FFFFFF' - : '#000000'; return ( <> @@ -58,15 +52,6 @@ export default class LaunchApp extends React.Component { - -
- -
-
Date: Fri, 30 Oct 2020 15:55:25 -0400 Subject: [PATCH 02/14] chat: messages lined up with input --- pkg/interface/src/views/apps/chat/components/ChatMessage.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/interface/src/views/apps/chat/components/ChatMessage.tsx b/pkg/interface/src/views/apps/chat/components/ChatMessage.tsx index 6979e0bab..46605e5a7 100644 --- a/pkg/interface/src/views/apps/chat/components/ChatMessage.tsx +++ b/pkg/interface/src/views/apps/chat/components/ChatMessage.tsx @@ -94,7 +94,7 @@ export default class ChatMessage extends Component { const dayBreak = nextMsg && new Date(msg.when).getDate() !== new Date(nextMsg.when).getDate(); const containerClass = `${renderSigil - ? `cf pt2 pl3 lh-copy` + ? `cf pt2 pl2 lh-copy` : `items-top cf hide-child`} ${isPending ? 'o-40' : ''} ${className}` const timestamp = moment.unix(msg.when / 1000).format(renderSigil ? 'hh:mm a' : 'hh:mm'); @@ -249,7 +249,7 @@ export class MessageWithSigil extends PureComponent { export const MessageWithoutSigil = ({ timestamp, msg, remoteContentPolicy, measure }) => ( <> - {timestamp} + {timestamp} From 00dee222eb1b0cac62bdfb044a7cec768da03fb4 Mon Sep 17 00:00:00 2001 From: Matilde Park Date: Fri, 30 Oct 2020 15:56:53 -0400 Subject: [PATCH 03/14] chat: nicknames use inter medium --- pkg/interface/src/views/apps/chat/components/ChatMessage.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/interface/src/views/apps/chat/components/ChatMessage.tsx b/pkg/interface/src/views/apps/chat/components/ChatMessage.tsx index 46605e5a7..6122a62b4 100644 --- a/pkg/interface/src/views/apps/chat/components/ChatMessage.tsx +++ b/pkg/interface/src/views/apps/chat/components/ChatMessage.tsx @@ -229,6 +229,7 @@ export class MessageWithSigil extends PureComponent { fontSize={0} mr={3} mono={!showNickname} + fontWeight={(showNickname) ? '500' : '400'} className={`mw5 db truncate pointer`} ref={e => nameSpan = e} onClick={() => { From 2688497c4afbc9384e9986d149927704a86cc70e Mon Sep 17 00:00:00 2001 From: Matilde Park Date: Fri, 30 Oct 2020 16:02:24 -0400 Subject: [PATCH 04/14] chat: message containers use pt3 to stay level --- pkg/interface/src/views/apps/chat/components/ChatMessage.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/interface/src/views/apps/chat/components/ChatMessage.tsx b/pkg/interface/src/views/apps/chat/components/ChatMessage.tsx index 6122a62b4..92c4e5187 100644 --- a/pkg/interface/src/views/apps/chat/components/ChatMessage.tsx +++ b/pkg/interface/src/views/apps/chat/components/ChatMessage.tsx @@ -94,7 +94,7 @@ export default class ChatMessage extends Component { const dayBreak = nextMsg && new Date(msg.when).getDate() !== new Date(nextMsg.when).getDate(); const containerClass = `${renderSigil - ? `cf pt2 pl2 lh-copy` + ? `cf pl2 lh-copy` : `items-top cf hide-child`} ${isPending ? 'o-40' : ''} ${className}` const timestamp = moment.unix(msg.when / 1000).format(renderSigil ? 'hh:mm a' : 'hh:mm'); @@ -130,6 +130,7 @@ export default class ChatMessage extends Component { width='100%' display='flex' flexWrap='wrap' + pt={renderSigil ? 3 : 0} pr={3} pb={isLastMessage ? 3 : 0} ref={this.divRef} From 8458b40e3411d68c8ca22665ab76e9ec9060a907 Mon Sep 17 00:00:00 2001 From: Matilde Park Date: Fri, 30 Oct 2020 16:04:45 -0400 Subject: [PATCH 05/14] chat: code blocks are rounded, levelled padding --- pkg/interface/src/views/apps/chat/components/content/code.js | 2 ++ pkg/interface/src/views/apps/chat/components/content/text.js | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/interface/src/views/apps/chat/components/content/code.js b/pkg/interface/src/views/apps/chat/components/content/code.js index 29589f02e..356c5c778 100644 --- a/pkg/interface/src/views/apps/chat/components/content/code.js +++ b/pkg/interface/src/views/apps/chat/components/content/code.js @@ -15,6 +15,7 @@ export default class CodeContent extends Component { mono p='1' my='0' + borderRadius='1' fontSize='14px' overflow='auto' maxHeight='10em' @@ -33,6 +34,7 @@ export default class CodeContent extends Component { mono my='0' p='1' + borderRadius='1' fontSize='14px' overflow='auto' maxHeight='10em' diff --git a/pkg/interface/src/views/apps/chat/components/content/text.js b/pkg/interface/src/views/apps/chat/components/content/text.js index be66a6177..03a5034f7 100644 --- a/pkg/interface/src/views/apps/chat/components/content/text.js +++ b/pkg/interface/src/views/apps/chat/components/content/text.js @@ -30,10 +30,11 @@ const renderers = { }, code: ({language, value}) => { return Date: Fri, 30 Oct 2020 16:09:25 -0400 Subject: [PATCH 06/14] launch: tile borders use scales.black20 --- pkg/interface/src/views/apps/launch/components/tiles/tile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/interface/src/views/apps/launch/components/tiles/tile.js b/pkg/interface/src/views/apps/launch/components/tiles/tile.js index 64124351f..348234d5e 100644 --- a/pkg/interface/src/views/apps/launch/components/tiles/tile.js +++ b/pkg/interface/src/views/apps/launch/components/tiles/tile.js @@ -46,7 +46,7 @@ export default class Tile extends React.Component { borderRadius={2} overflow="hidden" bg={bg || "white"} - color={props?.color || 'washedGray'} + color={props?.color || 'scales.black20'} boxShadow={boxShadow || '0 0 0px 1px inset'} > Date: Fri, 30 Oct 2020 16:13:17 -0400 Subject: [PATCH 07/14] landscape: remove reverse alphabetical sort --- pkg/interface/src/types/index.ts | 5 ----- .../src/views/landscape/components/Sidebar/SidebarList.tsx | 3 +-- .../views/landscape/components/Sidebar/SidebarListHeader.tsx | 1 - .../src/views/landscape/components/Sidebar/types.ts | 2 +- 4 files changed, 2 insertions(+), 9 deletions(-) diff --git a/pkg/interface/src/types/index.ts b/pkg/interface/src/types/index.ts index 10135b03d..32d4b2166 100644 --- a/pkg/interface/src/types/index.ts +++ b/pkg/interface/src/types/index.ts @@ -8,13 +8,8 @@ export * from './group-update'; export * from './graph-update'; export * from './invite-update'; export * from './launch-update'; -export * from './link-listen-update'; -export * from './link-update'; export * from './local-update'; export * from './metadata-update'; export * from './noun'; -export * from './permission-update'; -export * from './publish-response'; -export * from './publish-update'; export * from './s3-update'; export * from './workspace'; diff --git a/pkg/interface/src/views/landscape/components/Sidebar/SidebarList.tsx b/pkg/interface/src/views/landscape/components/Sidebar/SidebarList.tsx index 56ef356f7..fa0a8100c 100644 --- a/pkg/interface/src/views/landscape/components/Sidebar/SidebarList.tsx +++ b/pkg/interface/src/views/landscape/components/Sidebar/SidebarList.tsx @@ -31,8 +31,7 @@ function sidebarSort( return { asc: alphabetical, - desc: (a, b) => alphabetical(b, a), - lastUpdated, + lastUpdated }; } diff --git a/pkg/interface/src/views/landscape/components/Sidebar/SidebarListHeader.tsx b/pkg/interface/src/views/landscape/components/Sidebar/SidebarListHeader.tsx index 9ed71ac86..209ba11f2 100644 --- a/pkg/interface/src/views/landscape/components/Sidebar/SidebarListHeader.tsx +++ b/pkg/interface/src/views/landscape/components/Sidebar/SidebarListHeader.tsx @@ -87,7 +87,6 @@ export function SidebarListHeader(props: { Sort Order - diff --git a/pkg/interface/src/views/landscape/components/Sidebar/types.ts b/pkg/interface/src/views/landscape/components/Sidebar/types.ts index a861be523..7cdc970e0 100644 --- a/pkg/interface/src/views/landscape/components/Sidebar/types.ts +++ b/pkg/interface/src/views/landscape/components/Sidebar/types.ts @@ -5,7 +5,7 @@ export type SidebarItemStatus = | "disconnected" | "loading"; -export type SidebarSort = "asc" | "desc" | "lastUpdated"; +export type SidebarSort = "asc" | "lastUpdated"; export interface SidebarListConfig { sortBy: SidebarSort; From d2c8939fb07300e12a563d6bc0e09cd41795cbc4 Mon Sep 17 00:00:00 2001 From: Matilde Park Date: Fri, 30 Oct 2020 16:14:19 -0400 Subject: [PATCH 08/14] landscape: default to 'last updated' sort --- .../src/views/landscape/components/Sidebar/Sidebar.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/interface/src/views/landscape/components/Sidebar/Sidebar.tsx b/pkg/interface/src/views/landscape/components/Sidebar/Sidebar.tsx index 6205658d7..4d751dc12 100644 --- a/pkg/interface/src/views/landscape/components/Sidebar/Sidebar.tsx +++ b/pkg/interface/src/views/landscape/components/Sidebar/Sidebar.tsx @@ -87,7 +87,7 @@ export function Sidebar(props: SidebarProps) { const [config, setConfig] = useLocalStorageState( `group-config:${groupPath || "home"}`, { - sortBy: "asc", + sortBy: "lastUpdated", hideUnjoined: false, } ); From 8a09a216c3c5885d993870f6f1294aadda79775e Mon Sep 17 00:00:00 2001 From: Matilde Park Date: Fri, 30 Oct 2020 16:16:28 -0400 Subject: [PATCH 09/14] landscape: invite uses 'Users' icon --- .../src/views/landscape/components/GroupSwitcher.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/interface/src/views/landscape/components/GroupSwitcher.tsx b/pkg/interface/src/views/landscape/components/GroupSwitcher.tsx index ecfe50f38..3ece5b214 100644 --- a/pkg/interface/src/views/landscape/components/GroupSwitcher.tsx +++ b/pkg/interface/src/views/landscape/components/GroupSwitcher.tsx @@ -156,7 +156,7 @@ export function GroupSwitcher(props: { Invite to group @@ -179,7 +179,7 @@ export function GroupSwitcher(props: { From bef97699e2c08de92362866e5bb78f56ff3590d4 Mon Sep 17 00:00:00 2001 From: Matilde Park Date: Fri, 30 Oct 2020 16:20:41 -0400 Subject: [PATCH 10/14] landscape: new channel surfaces 'back' button on mobile --- pkg/interface/src/views/landscape/components/GroupsPane.tsx | 3 ++- pkg/interface/src/views/landscape/components/NewChannel.tsx | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg/interface/src/views/landscape/components/GroupsPane.tsx b/pkg/interface/src/views/landscape/components/GroupsPane.tsx index 6c3aecd37..09f4bb7b6 100644 --- a/pkg/interface/src/views/landscape/components/GroupsPane.tsx +++ b/pkg/interface/src/views/landscape/components/GroupsPane.tsx @@ -80,7 +80,7 @@ export function GroupsPane(props: GroupsPaneProps) { workspace={workspace} /> - ) + ) return ( @@ -168,6 +168,7 @@ export function GroupsPane(props: GroupsPaneProps) { + history.push(props.baseUrl)}> + {'<- Back'} + New Channel From 5c84ba514f49d4871730f2c8565c06c41172b34e Mon Sep 17 00:00:00 2001 From: Matilde Park Date: Fri, 30 Oct 2020 16:28:47 -0400 Subject: [PATCH 11/14] groups: only surface invite if admin Fixes #3803. --- .../src/views/landscape/components/GroupSwitcher.tsx | 12 ++++++------ .../views/landscape/components/Sidebar/Sidebar.tsx | 1 + 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/pkg/interface/src/views/landscape/components/GroupSwitcher.tsx b/pkg/interface/src/views/landscape/components/GroupSwitcher.tsx index 3ece5b214..86afa5738 100644 --- a/pkg/interface/src/views/landscape/components/GroupSwitcher.tsx +++ b/pkg/interface/src/views/landscape/components/GroupSwitcher.tsx @@ -77,7 +77,7 @@ export function GroupSwitcher(props: { baseUrl: string; recentGroups: string[]; }) { - const { associations, workspace } = props; + const { associations, workspace, isAdmin } = props; const title = getTitleFromWorkspace(associations, workspace); const navTo = (to: string) => `${props.baseUrl}${to}`; return ( @@ -152,14 +152,14 @@ export function GroupSwitcher(props: { /> Group Settings - + {isAdmin && ( Invite to group - + )} )} @@ -173,15 +173,15 @@ export function GroupSwitcher(props: { - {workspace.type === "group" && ( + {(workspace.type === "group") && ( <> - + {isAdmin && ( - + )} diff --git a/pkg/interface/src/views/landscape/components/Sidebar/Sidebar.tsx b/pkg/interface/src/views/landscape/components/Sidebar/Sidebar.tsx index 4d751dc12..eb2afb2a1 100644 --- a/pkg/interface/src/views/landscape/components/Sidebar/Sidebar.tsx +++ b/pkg/interface/src/views/landscape/components/Sidebar/Sidebar.tsx @@ -119,6 +119,7 @@ export function Sidebar(props: SidebarProps) { associations={associations} recentGroups={props.recentGroups} baseUrl={props.baseUrl} + isAdmin={isAdmin} workspace={props.workspace} /> Date: Mon, 2 Nov 2020 15:40:40 -0500 Subject: [PATCH 12/14] landscape/sidebar: hide new channel container The previous write left some padding, preventing users from clicking the bottom channel in a long sidebar for no reason. --- .../src/views/landscape/components/Sidebar/Sidebar.tsx | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/pkg/interface/src/views/landscape/components/Sidebar/Sidebar.tsx b/pkg/interface/src/views/landscape/components/Sidebar/Sidebar.tsx index 6205658d7..b69a90472 100644 --- a/pkg/interface/src/views/landscape/components/Sidebar/Sidebar.tsx +++ b/pkg/interface/src/views/landscape/components/Sidebar/Sidebar.tsx @@ -97,10 +97,6 @@ export function Sidebar(props: SidebarProps) { const role = props.groups?.[groupPath] ? roleForShip(props.groups[groupPath], window.ship) : undefined; const isAdmin = (role === "admin") || (workspace?.type === 'home'); - const newStyle = { - display: isAdmin ? "block" : "none" - }; - return ( Date: Mon, 2 Nov 2020 16:03:44 -0500 Subject: [PATCH 13/14] chat: remove daybreak from unread marker --- pkg/interface/src/views/apps/chat/components/ChatMessage.tsx | 3 --- 1 file changed, 3 deletions(-) diff --git a/pkg/interface/src/views/apps/chat/components/ChatMessage.tsx b/pkg/interface/src/views/apps/chat/components/ChatMessage.tsx index 6979e0bab..34441143c 100644 --- a/pkg/interface/src/views/apps/chat/components/ChatMessage.tsx +++ b/pkg/interface/src/views/apps/chat/components/ChatMessage.tsx @@ -18,9 +18,6 @@ export const UnreadMarker = React.forwardRef(({ dayBreak, when }, ref) => ( New messages below - {dayBreak - ? {moment(when).calendar(null, { sameElse: DATESTAMP_FORMAT })} - : null} )); From c4cdf415c9dae0eef7eb62409cc1d5e6024de3b7 Mon Sep 17 00:00:00 2001 From: Tyler Brown Cifu Shuster Date: Mon, 2 Nov 2020 12:17:21 -0800 Subject: [PATCH 14/14] publish: return JS number revision fixes #3859, fixes #3844 --- pkg/interface/src/logic/lib/publish.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/interface/src/logic/lib/publish.ts b/pkg/interface/src/logic/lib/publish.ts index 1e1770582..4317f069c 100644 --- a/pkg/interface/src/logic/lib/publish.ts +++ b/pkg/interface/src/logic/lib/publish.ts @@ -87,7 +87,7 @@ export function getLatestRevision(node: GraphNode): [number, string, string, Pos return empty } const [title, body] = rev.post.contents as TextContent[]; - return [revNum, title.text, body.text, rev.post]; + return [revNum.toJSNumber(), title.text, body.text, rev.post]; } export function getComments(node: GraphNode): GraphNode {