From 02ba41e759fce7ddffb99f8bcb6143d7ca769d65 Mon Sep 17 00:00:00 2001 From: infinite-persistence Date: Wed, 1 Dec 2021 18:52:01 +0800 Subject: [PATCH 1/5] File description (collapsed): show ~3 lines instead of ~1 ## Ticket - Closes https://github.com/lbryio/lbry-desktop/issues/7222 - Also felt it's too squished for the longest time. Previously fixed comments but didn't handle this. --- ui/scss/component/_media.scss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/scss/component/_media.scss b/ui/scss/component/_media.scss index c5efb2124..06bd1c822 100644 --- a/ui/scss/component/_media.scss +++ b/ui/scss/component/_media.scss @@ -75,7 +75,7 @@ .media__info-text--contracted { margin-top: var(--spacing-m); - max-height: 3rem; + max-height: 5rem; overflow: hidden; } @@ -90,7 +90,7 @@ } .media__info-text--fade { - -webkit-mask-image: -webkit-gradient(linear, left 30%, left bottom, from(rgba(0, 0, 0, 1)), to(rgba(0, 0, 0, 0))); + -webkit-mask-image: -webkit-gradient(linear, left 55%, left bottom, from(rgba(0, 0, 0, 1)), to(rgba(0, 0, 0, 0))); overflow-wrap: anywhere; } -- 2.45.3 From 338688031779b6bba4eb3f8918606e2c63479818 Mon Sep 17 00:00:00 2001 From: zeppi Date: Thu, 2 Dec 2021 01:00:55 -0500 Subject: [PATCH 2/5] collection reordering changes --- static/app-strings.json | 1 + ui/component/claimList/view.jsx | 2 - .../claimPreview/collection-buttons.jsx | 121 ++++++++++++++++++ ui/component/claimPreview/view.jsx | 55 +++++++- ui/component/common/icon-custom.jsx | 16 ++- ui/component/fileDescription/view.jsx | 2 +- ui/constants/icons.js | 2 + ui/page/collection/view.jsx | 2 +- ui/scss/component/_button.scss | 45 +++++-- ui/scss/component/_claim-list.scss | 5 + ui/scss/component/_collection.scss | 31 +++-- 11 files changed, 247 insertions(+), 35 deletions(-) create mode 100644 ui/component/claimPreview/collection-buttons.jsx diff --git a/static/app-strings.json b/static/app-strings.json index b36842566..4c6fb6ac3 100644 --- a/static/app-strings.json +++ b/static/app-strings.json @@ -2220,5 +2220,6 @@ "filtered": "filtered", "View All Playlists": "View All Playlists", "Your wallet is not currently using a cloud sync service. You are in control of backing up your wallet.": "Your wallet is not currently using a cloud sync service. You are in control of backing up your wallet.", + "%action% %collection%": "%action% %collection%", "--end--": "--end--" } diff --git a/ui/component/claimList/view.jsx b/ui/component/claimList/view.jsx index 456c23e0f..3531e4d59 100644 --- a/ui/component/claimList/view.jsx +++ b/ui/component/claimList/view.jsx @@ -78,8 +78,6 @@ export default function ClaimList(props: Props) { noEmpty, } = props; - console.log('noempty', noEmpty); - const [currentSort, setCurrentSort] = usePersistedState(persistedStorageKey, SORT_NEW); // Exclude prefix uris in these results variables. We don't want to show diff --git a/ui/component/claimPreview/collection-buttons.jsx b/ui/component/claimPreview/collection-buttons.jsx new file mode 100644 index 000000000..c9b2e40e4 --- /dev/null +++ b/ui/component/claimPreview/collection-buttons.jsx @@ -0,0 +1,121 @@ +// @flow +import React from 'react'; +import Button from 'component/button'; +import * as ICONS from 'constants/icons'; +type Props = { + collectionIndex?: number, + editCollection: (string, CollectionEditParams) => void, + listId?: string, + lastCollectionIndex?: number, + claim: ?Claim, +}; + +function CollectionButtons(props: Props) { + const { collectionIndex, editCollection, listId, lastCollectionIndex, claim } = props; + const [confirmDelete, setConfirmDelete] = React.useState(false); + return ( +
+
+
+
+
+ {!confirmDelete && ( +
+
+ )} + {confirmDelete && ( +
+
+ )} +
+ ); +} + +export default CollectionButtons; diff --git a/ui/component/claimPreview/view.jsx b/ui/component/claimPreview/view.jsx index f5735efcd..37cdbf044 100644 --- a/ui/component/claimPreview/view.jsx +++ b/ui/component/claimPreview/view.jsx @@ -25,6 +25,7 @@ import ClaimMenuList from 'component/claimMenuList'; import ClaimPreviewLoading from './claim-preview-loading'; import ClaimPreviewHidden from './claim-preview-no-mature'; import ClaimPreviewNoContent from './claim-preview-no-content'; +import CollectionEditButtons from './collection-buttons'; import Button from 'component/button'; import * as ICONS from 'constants/icons'; @@ -151,7 +152,7 @@ const ClaimPreview = forwardRef((props: Props, ref: any) => { } = props; const isCollection = claim && claim.value_type === 'collection'; const collectionClaimId = isCollection && claim && claim.claim_id; - const listId = collectionId || collectionClaimId; + const listId = collectionId || collectionClaimId || null; const WrapperElement = wrapperElement || 'li'; const shouldFetch = claim === undefined || (claim !== null && claim.value_type === 'channel' && isEmpty(claim.meta) && !pending); @@ -160,6 +161,7 @@ const ClaimPreview = forwardRef((props: Props, ref: any) => { const shouldHideActions = hideActions || isMyCollection || type === 'small' || type === 'tooltip'; const canonicalUrl = claim && claim.canonical_url; const lastCollectionIndex = collectionUris ? collectionUris.length - 1 : 0; + console.log('type', type); const channelSubscribers = React.useMemo(() => { if (channelSubCount === undefined) { return ; @@ -347,8 +349,18 @@ const ClaimPreview = forwardRef((props: Props, ref: any) => { 'claim-preview--channel': isChannelUri, 'claim-preview--visited': !isChannelUri && !claimIsMine && hasVisitedUri, 'claim-preview--pending': pending, + 'claim-preview--collection-mine': isMyCollection && listId && type === 'listview', })} > + {isMyCollection && listId && type === 'listview' && ( + + )} {isChannelUri && claim ? ( @@ -396,13 +408,27 @@ const ClaimPreview = forwardRef((props: Props, ref: any) => { {!pending && ( <> {renderActions && claim && renderActions(claim)} - {Boolean(isMyCollection && listId) && ( + {false && Boolean(isMyCollection && listId) && ( <>
-
-
-
- - )} {shouldHideActions || renderActions ? null : actions !== undefined ? ( actions ) : ( -- 2.45.3 From d60fc23611e6a068e31ef087f2bafb36af2f873c Mon Sep 17 00:00:00 2001 From: zeppi Date: Thu, 2 Dec 2021 14:09:16 -0500 Subject: [PATCH 4/5] appstrings --- static/app-strings.json | 1 - 1 file changed, 1 deletion(-) diff --git a/static/app-strings.json b/static/app-strings.json index 4c6fb6ac3..b36842566 100644 --- a/static/app-strings.json +++ b/static/app-strings.json @@ -2220,6 +2220,5 @@ "filtered": "filtered", "View All Playlists": "View All Playlists", "Your wallet is not currently using a cloud sync service. You are in control of backing up your wallet.": "Your wallet is not currently using a cloud sync service. You are in control of backing up your wallet.", - "%action% %collection%": "%action% %collection%", "--end--": "--end--" } -- 2.45.3 From b0746d8a618e65a620ad26bda9f42238ad983a33 Mon Sep 17 00:00:00 2001 From: zeppi Date: Thu, 2 Dec 2021 14:59:49 -0500 Subject: [PATCH 5/5] list publish page listview type --- ui/component/collectionEdit/view.jsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ui/component/collectionEdit/view.jsx b/ui/component/collectionEdit/view.jsx index 9a0fa3b98..108e21493 100644 --- a/ui/component/collectionEdit/view.jsx +++ b/ui/component/collectionEdit/view.jsx @@ -358,7 +358,12 @@ function CollectionForm(props: Props) { - +