From ac47cd45948c20f555c15036bde104a7a19549a7 Mon Sep 17 00:00:00 2001 From: Matilde Park Date: Tue, 6 Oct 2020 21:07:39 -0400 Subject: [PATCH 1/6] interface: replace icons for group settings --- .../src/views/landscape/components/GroupSettings.tsx | 4 ++-- .../src/views/landscape/components/GroupSwitcher.tsx | 4 ++-- .../src/views/landscape/components/PopoverRoutes.tsx | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/pkg/interface/src/views/landscape/components/GroupSettings.tsx b/pkg/interface/src/views/landscape/components/GroupSettings.tsx index 7f21bc6fa..7b7d8c9a6 100644 --- a/pkg/interface/src/views/landscape/components/GroupSettings.tsx +++ b/pkg/interface/src/views/landscape/components/GroupSettings.tsx @@ -40,8 +40,8 @@ export function GroupSettings(props: GroupSettingsProps) { const { metadata } = association; const currentPrivate = "invite" in props.group.policy; const initialValues: FormSchema = { - name: metadata.title, - description: metadata.description, + name: metadata?.title, + description: metadata?.description, isPrivate: currentPrivate, }; diff --git a/pkg/interface/src/views/landscape/components/GroupSwitcher.tsx b/pkg/interface/src/views/landscape/components/GroupSwitcher.tsx index f320d041b..e6c33d47c 100644 --- a/pkg/interface/src/views/landscape/components/GroupSwitcher.tsx +++ b/pkg/interface/src/views/landscape/components/GroupSwitcher.tsx @@ -127,7 +127,7 @@ export function GroupSwitcher(props: { Participants @@ -156,7 +156,7 @@ export function GroupSwitcher(props: { {title} - + diff --git a/pkg/interface/src/views/landscape/components/PopoverRoutes.tsx b/pkg/interface/src/views/landscape/components/PopoverRoutes.tsx index 11bd16c05..90a99aa29 100644 --- a/pkg/interface/src/views/landscape/components/PopoverRoutes.tsx +++ b/pkg/interface/src/views/landscape/components/PopoverRoutes.tsx @@ -25,7 +25,7 @@ const SidebarItem = ({ selected, icon, text, to }) => { px={3} py={1} > - + {text} ); @@ -90,19 +90,19 @@ export function PopoverRoutes( borderRightColor="washedGray" > Date: Tue, 6 Oct 2020 21:19:35 -0400 Subject: [PATCH 2/6] interface: use cursor:pointer on buttons --- .../src/views/apps/chat/components/profile-overlay.js | 2 +- .../src/views/apps/profile/components/lib/BucketList.tsx | 2 +- .../src/views/apps/profile/components/lib/DisplayForm.tsx | 2 +- .../src/views/apps/profile/components/lib/RemoteContent.tsx | 2 +- .../src/views/apps/profile/components/lib/S3Form.tsx | 2 +- .../src/views/apps/profile/components/lib/Security.tsx | 4 ++-- pkg/interface/src/views/apps/publish/components/Notebook.tsx | 3 ++- pkg/interface/src/views/apps/publish/components/Settings.tsx | 2 +- .../src/views/apps/publish/components/Subscribers.tsx | 2 +- pkg/interface/src/views/components/RemoteContent.tsx | 1 + pkg/interface/src/views/components/UnjoinedResource.tsx | 2 +- 11 files changed, 13 insertions(+), 11 deletions(-) diff --git a/pkg/interface/src/views/apps/chat/components/profile-overlay.js b/pkg/interface/src/views/apps/chat/components/profile-overlay.js index 52c4d82a6..07a69183f 100644 --- a/pkg/interface/src/views/apps/chat/components/profile-overlay.js +++ b/pkg/interface/src/views/apps/chat/components/profile-overlay.js @@ -119,7 +119,7 @@ export class ProfileOverlay extends PureComponent { )}
{cite(`~${ship}`)}
{!isOwn && ( - )} diff --git a/pkg/interface/src/views/apps/profile/components/lib/BucketList.tsx b/pkg/interface/src/views/apps/profile/components/lib/BucketList.tsx index cfe4725ba..335aad10c 100644 --- a/pkg/interface/src/views/apps/profile/components/lib/BucketList.tsx +++ b/pkg/interface/src/views/apps/profile/components/lib/BucketList.tsx @@ -93,7 +93,7 @@ export function BucketList({ ))} - diff --git a/pkg/interface/src/views/apps/profile/components/lib/DisplayForm.tsx b/pkg/interface/src/views/apps/profile/components/lib/DisplayForm.tsx index 952f94ceb..ef76a10fc 100644 --- a/pkg/interface/src/views/apps/profile/components/lib/DisplayForm.tsx +++ b/pkg/interface/src/views/apps/profile/components/lib/DisplayForm.tsx @@ -126,7 +126,7 @@ export default function DisplayForm(props: DisplayFormProps) { id="nicknames" caption="Do not show user-set nicknames" /> - diff --git a/pkg/interface/src/views/apps/profile/components/lib/RemoteContent.tsx b/pkg/interface/src/views/apps/profile/components/lib/RemoteContent.tsx index afd5fac5f..852a6ebe7 100644 --- a/pkg/interface/src/views/apps/profile/components/lib/RemoteContent.tsx +++ b/pkg/interface/src/views/apps/profile/components/lib/RemoteContent.tsx @@ -76,7 +76,7 @@ export default function RemoteContentForm(props: RemoteContentFormProps) { id="oembedShown" caption="Embedded content may contain scripts" /> - diff --git a/pkg/interface/src/views/apps/profile/components/lib/S3Form.tsx b/pkg/interface/src/views/apps/profile/components/lib/S3Form.tsx index 1647bda19..963e2feb1 100644 --- a/pkg/interface/src/views/apps/profile/components/lib/S3Form.tsx +++ b/pkg/interface/src/views/apps/profile/components/lib/S3Form.tsx @@ -78,7 +78,7 @@ export default function S3Form(props: S3FormProps) { label="Secret Access Key" id="s3secretAccessKey" /> - + diff --git a/pkg/interface/src/views/apps/profile/components/lib/Security.tsx b/pkg/interface/src/views/apps/profile/components/lib/Security.tsx index 0fdfaac52..fe8731906 100644 --- a/pkg/interface/src/views/apps/profile/components/lib/Security.tsx +++ b/pkg/interface/src/views/apps/profile/components/lib/Security.tsx @@ -19,7 +19,7 @@ export default function SecuritySettings({ api }: SecuritySettingsProps) { You will be logged out of your Urbit on this browser.
-
@@ -31,7 +31,7 @@ export default function SecuritySettings({ api }: SecuritySettingsProps) { You will be logged out of all browsers that have currently logged into your Urbit.
-
diff --git a/pkg/interface/src/views/apps/publish/components/Notebook.tsx b/pkg/interface/src/views/apps/publish/components/Notebook.tsx index eb3819eac..d8596941c 100644 --- a/pkg/interface/src/views/apps/publish/components/Notebook.tsx +++ b/pkg/interface/src/views/apps/publish/components/Notebook.tsx @@ -108,7 +108,7 @@ export class Notebook extends PureComponent< {isWriter && ( - @@ -124,6 +124,7 @@ export class Notebook extends PureComponent< diff --git a/pkg/interface/src/views/apps/publish/components/Subscribers.tsx b/pkg/interface/src/views/apps/publish/components/Subscribers.tsx index db986541f..6124f8377 100644 --- a/pkg/interface/src/views/apps/publish/components/Subscribers.tsx +++ b/pkg/interface/src/views/apps/publish/components/Subscribers.tsx @@ -82,7 +82,7 @@ export class Subscribers extends Component { return ( { role === 'admin' && ( - )} diff --git a/pkg/interface/src/views/components/RemoteContent.tsx b/pkg/interface/src/views/components/RemoteContent.tsx index 28ed350b7..14384281e 100644 --- a/pkg/interface/src/views/components/RemoteContent.tsx +++ b/pkg/interface/src/views/components/RemoteContent.tsx @@ -151,6 +151,7 @@ export default class RemoteContent extends PureComponent {this.state.unfold ? 'collapse' : 'expand'} : null} diff --git a/pkg/interface/src/views/components/UnjoinedResource.tsx b/pkg/interface/src/views/components/UnjoinedResource.tsx index 91d202965..110820773 100644 --- a/pkg/interface/src/views/components/UnjoinedResource.tsx +++ b/pkg/interface/src/views/components/UnjoinedResource.tsx @@ -87,7 +87,7 @@ export function UnjoinedResource(props: UnjoinedResourceProps) { {description} - + Join Channel From 5d600fcc1ff0a6aa84ba4aad4a9298a8798cc1f9 Mon Sep 17 00:00:00 2001 From: Matilde Park Date: Tue, 6 Oct 2020 21:22:29 -0400 Subject: [PATCH 3/6] interface: loading spinner should have gray bg --- pkg/interface/src/views/components/AsyncButton.tsx | 2 +- pkg/interface/src/views/components/StatelessAsyncButton.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/interface/src/views/components/AsyncButton.tsx b/pkg/interface/src/views/components/AsyncButton.tsx index 86f90dc3c..fcb6cb721 100644 --- a/pkg/interface/src/views/components/AsyncButton.tsx +++ b/pkg/interface/src/views/components/AsyncButton.tsx @@ -38,7 +38,7 @@ export function AsyncButton({ {isSubmitting ? ( diff --git a/pkg/interface/src/views/components/StatelessAsyncButton.tsx b/pkg/interface/src/views/components/StatelessAsyncButton.tsx index 6c2aa48fc..fedccd73e 100644 --- a/pkg/interface/src/views/components/StatelessAsyncButton.tsx +++ b/pkg/interface/src/views/components/StatelessAsyncButton.tsx @@ -44,7 +44,7 @@ export function StatelessAsyncButton({ ) : state === "loading" ? ( ) : state === "success" ? ( "Done" From 2e54e7c833824433d5e805ff295e93e20d4b8fe5 Mon Sep 17 00:00:00 2001 From: Matilde Park Date: Tue, 6 Oct 2020 21:41:31 -0400 Subject: [PATCH 4/6] interface: prevent profileoverlay crash, redirect properly --- .../apps/chat/components/profile-overlay.js | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/pkg/interface/src/views/apps/chat/components/profile-overlay.js b/pkg/interface/src/views/apps/chat/components/profile-overlay.js index 07a69183f..03f51f978 100644 --- a/pkg/interface/src/views/apps/chat/components/profile-overlay.js +++ b/pkg/interface/src/views/apps/chat/components/profile-overlay.js @@ -73,7 +73,7 @@ export class ProfileOverlay extends PureComponent { } render() { - const { contact, ship, color, topSpace, bottomSpace, group, association, hideNicknames, hideAvatars } = this.props; + const { contact, ship, color, topSpace, bottomSpace, group, association, hideNicknames, hideAvatars, history } = this.props; let top, bottom; if (topSpace < OVERLAY_HEIGHT / 2) { @@ -104,6 +104,8 @@ export class ProfileOverlay extends PureComponent { /*if (!group.hidden) { }*/ + const isHidden = group.hidden; + return (
)} - {isOwn && !group.hidden ( - (isHidden) ? history.push('/~profile/identity') : history.push(`${history.location.pathname}/popover/profile`)} > - Edit Group Identity - - )} + Edit Identity + + ) :
}
); From db6d32286129d100c8c739ef5755cdcec81f38d3 Mon Sep 17 00:00:00 2001 From: Matilde Park Date: Tue, 6 Oct 2020 21:45:48 -0400 Subject: [PATCH 5/6] interface: amend sidebar to use 'adjust' --- .../views/landscape/components/Sidebar/SidebarListHeader.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/interface/src/views/landscape/components/Sidebar/SidebarListHeader.tsx b/pkg/interface/src/views/landscape/components/Sidebar/SidebarListHeader.tsx index 6f243aea7..b1a224e37 100644 --- a/pkg/interface/src/views/landscape/components/Sidebar/SidebarListHeader.tsx +++ b/pkg/interface/src/views/landscape/components/Sidebar/SidebarListHeader.tsx @@ -70,7 +70,7 @@ export function SidebarListHeader(props: { } > - +
); From 9d5645f8d7e4eaa4fe281454a1a15c3d4c77e6dd Mon Sep 17 00:00:00 2001 From: Matilde Park Date: Wed, 7 Oct 2020 00:32:29 -0400 Subject: [PATCH 6/6] interface: fix default app tiles linking as anchor --- .../src/views/apps/launch/components/tiles/tile.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 ca65f07aa..a76baa34d 100644 --- a/pkg/interface/src/views/apps/launch/components/tiles/tile.js +++ b/pkg/interface/src/views/apps/launch/components/tiles/tile.js @@ -10,7 +10,7 @@ import { Box } from "@tlon/indigo-react"; export default class Tile extends React.Component { render() { const { bg, to, p, ...props } = this.props; - + let childElement = ( {props.children} @@ -18,12 +18,12 @@ export default class Tile extends React.Component { ); if (to) { - if (routeList.indexOf(to) === -1) { + if (routeList.indexOf(to) !== -1 || to === '/~landscape/home' || to === '/~profile') { childElement= ({childElement}); } else { childElement= ({childElement}); } - + } return (