From 08c228739a06e09b6a205feb81b83e1de1040f04 Mon Sep 17 00:00:00 2001 From: Matilde Park Date: Tue, 29 Sep 2020 14:37:33 -0400 Subject: [PATCH 1/3] links: pass contact metadata to link items --- pkg/interface/src/views/apps/links/components/link-list.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/interface/src/views/apps/links/components/link-list.js b/pkg/interface/src/views/apps/links/components/link-list.js index 8595dcd967..6bcafccba8 100644 --- a/pkg/interface/src/views/apps/links/components/link-list.js +++ b/pkg/interface/src/views/apps/links/components/link-list.js @@ -40,7 +40,7 @@ export const LinkList = (props) => {
@@ -71,10 +71,10 @@ export const LinkList = (props) => {
{ Array.from(props.graph).map(([date, node]) => { const { nickname, color, avatar } = - getContactDetails(props.contacts[ship]); - + getContactDetails(props.contacts[node?.post?.author]); return ( Date: Tue, 29 Sep 2020 14:50:32 -0400 Subject: [PATCH 2/3] links: link detail gets author nickname properly --- pkg/interface/src/views/apps/links/components/link-detail.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg/interface/src/views/apps/links/components/link-detail.js b/pkg/interface/src/views/apps/links/components/link-detail.js index ea1f376079..4a4a36d98b 100644 --- a/pkg/interface/src/views/apps/links/components/link-detail.js +++ b/pkg/interface/src/views/apps/links/components/link-detail.js @@ -29,8 +29,7 @@ export const LinkDetail = (props) => { ); } - const { nickname } = getContactDetails(props.contacts[ship]); - const our = getContactDetails(props.contacts[window.ship]); + const { nickname } = getContactDetails(props.contacts[props.node?.post?.author]); const resourcePath = `${props.ship}/${props.name}`; const title = props.resource.metadata.title || resourcePath; From 2c30faecf4e02552c3eca7d1a6a9ed2b990244de Mon Sep 17 00:00:00 2001 From: Matilde Park Date: Tue, 29 Sep 2020 14:50:46 -0400 Subject: [PATCH 3/3] links: fix aggressive overflow scrolling on tab bar --- .../apps/links/components/link-detail.js | 40 +++++++++++-------- .../views/apps/links/components/link-list.js | 19 +++++---- .../views/apps/links/components/settings.js | 20 ++++++---- 3 files changed, 49 insertions(+), 30 deletions(-) diff --git a/pkg/interface/src/views/apps/links/components/link-detail.js b/pkg/interface/src/views/apps/links/components/link-detail.js index 4a4a36d98b..d3a66d93f1 100644 --- a/pkg/interface/src/views/apps/links/components/link-detail.js +++ b/pkg/interface/src/views/apps/links/components/link-detail.js @@ -1,13 +1,13 @@ -import React, { Component, useEffect } from 'react'; +import React, { useEffect } from 'react'; import { TabBar } from '~/views/components/chat-link-tabbar'; import { LinkPreview } from './lib/link-preview'; -import { LinkSubmit } from './lib/link-submit'; import { CommentSubmit } from './lib/comment-submit'; import { SidebarSwitcher } from '~/views/components/SidebarSwitch'; import { Link } from 'react-router-dom'; import { Comments } from './lib/comments'; import { getContactDetails } from '~/logic/lib/util'; +import { Box } from '@tlon/indigo-react'; export const LinkDetail = (props) => { if (!props.node && props.graphResource) { @@ -35,24 +35,30 @@ export const LinkDetail = (props) => { return (
-
+ + to={`/~link/${resourcePath}`} + >

- {`<- ${title}`} + style={{ width: 'max-content' }} + > + {`${title}`}

{ popoutHref={`/~link/popout/${resourcePath}/${props.match.params.index}`} settings={`/~link/${resourcePath}/settings`} /> -
+
{ name={props.name} ship={props.ship} api={props.api} - parentIndex={props.node.post.index} /> + parentIndex={props.node.post.index} + />
{ api={props.api} hideAvatars={props.hideAvatars} hideNicknames={props.hideNicknames} - remoteContentPolicy={props.remoteContentPolicy} /> + remoteContentPolicy={props.remoteContentPolicy} + />
); -} +}; diff --git a/pkg/interface/src/views/apps/links/components/link-list.js b/pkg/interface/src/views/apps/links/components/link-list.js index 6bcafccba8..1afa1a65bc 100644 --- a/pkg/interface/src/views/apps/links/components/link-list.js +++ b/pkg/interface/src/views/apps/links/components/link-list.js @@ -5,6 +5,7 @@ import { SidebarSwitcher } from '~/views/components/SidebarSwitch'; import { Link } from 'react-router-dom'; import { LinkItem } from './lib/link-item'; import LinkSubmit from './lib/link-submit'; +import { Box } from '@tlon/indigo-react'; import { getContactDetails } from '~/logic/lib/util'; @@ -38,12 +39,16 @@ export const LinkList = (props) => { style={{ height: '1rem' }}> {'⟵ All Channels'} -
+ { popoutHref={`/~link/popout/${resource}`} settings={`/~link/${resource}/settings`} /> -
+
diff --git a/pkg/interface/src/views/apps/links/components/settings.js b/pkg/interface/src/views/apps/links/components/settings.js index 01d5389c20..fe5778d93a 100644 --- a/pkg/interface/src/views/apps/links/components/settings.js +++ b/pkg/interface/src/views/apps/links/components/settings.js @@ -7,6 +7,8 @@ import { Spinner } from '~/views/components/Spinner'; import { TabBar } from '~/views/components/chat-link-tabbar'; import SidebarSwitcher from '~/views/components/SidebarSwitch'; +import { Box } from '@tlon/indigo-react'; + import { MetadataSettings } from '~/views/components/metadata/settings'; export class SettingsScreen extends Component { @@ -132,12 +134,16 @@ export class SettingsScreen extends Component { style={{ height: '1rem' }}> {'⟵ All Collections'}
-
+ -
+

Collection Settings

{this.renderRemove()}