diff --git a/packages/common/src/store/playlist-library/helpers.ts b/packages/common/src/store/playlist-library/helpers.ts index 5e819312eb..02e7fb6021 100644 --- a/packages/common/src/store/playlist-library/helpers.ts +++ b/packages/common/src/store/playlist-library/helpers.ts @@ -310,7 +310,7 @@ export const addFolderToLibrary = ( ): PlaylistLibrary => { return { ...(library || {}), - contents: [...(library?.contents || []), folder] + contents: [folder, ...(library?.contents || [])] } } diff --git a/packages/stems/src/assets/styles/animations.css b/packages/stems/src/assets/styles/animations.css index b20e41efcf..55313b50d3 100644 --- a/packages/stems/src/assets/styles/animations.css +++ b/packages/stems/src/assets/styles/animations.css @@ -8,5 +8,6 @@ :root, root { --quick: 0.07s ease-in-out; - --calm: 0.2s ease-in-out; + --expressive: 0.2s ease-in-out; + --calm: 0.5s ease-in-out; } diff --git a/packages/stems/src/components/Button/Button.module.css b/packages/stems/src/components/Button/Button.module.css index 046613706a..4b4f319ce5 100644 --- a/packages/stems/src/components/Button/Button.module.css +++ b/packages/stems/src/components/Button/Button.module.css @@ -59,7 +59,7 @@ } .button .icon.left.noText { - margin: 0; + margin: 0 !important; } .button .icon.right { @@ -67,7 +67,7 @@ } .button .icon.right.noText { - margin: 0; + margin: 0 !important; } .button .icon { diff --git a/packages/web/src/components/collection/desktop/CollectionHeader.module.css b/packages/web/src/components/collection/desktop/CollectionHeader.module.css index dace2234ca..117f39c740 100644 --- a/packages/web/src/components/collection/desktop/CollectionHeader.module.css +++ b/packages/web/src/components/collection/desktop/CollectionHeader.module.css @@ -1,3 +1,12 @@ +.hide { + opacity: 0; +} + +.show { + opacity: 1; + transition: opacity var(--calm); +} + .collectionHeader { padding: 16px 16px 24px 16px; margin: 0 auto; @@ -22,6 +31,7 @@ } .coverArt { + background-color: var(--neutral-light-6) !important; background-size: cover; background-position: center; background-repeat: no-repeat; @@ -29,7 +39,6 @@ .infoSection { margin-left: 38px; - flex-direction: column; width: 100%; } @@ -51,7 +60,6 @@ align-items: center; column-gap: var(--unit-2); margin-bottom: var(--unit-1); - width: 100%; position: relative; } @@ -64,7 +72,7 @@ font-size: var(--font-4xl); line-height: 40px; font-weight: var(--font-bold); - transition: color var(--quick); + transition: opacity var(--calm), color var(--quick); } .editableTitle:hover .titleHeader { @@ -189,15 +197,6 @@ fill: var(--neutral-light-4); } -.hide { - opacity: 0; -} - -.show { - opacity: 1; - transition: opacity ease-in-out 0.5s; -} - .skeleton { position: absolute; top: 0; @@ -221,7 +220,7 @@ .imageEditButtonWrapper { opacity: 0; - transition: opacity var(--calm); + transition: opacity var(--expressive); position: absolute; bottom: var(--unit-4); } diff --git a/packages/web/src/components/collection/desktop/FavoriteButton.tsx b/packages/web/src/components/collection/desktop/FavoriteButton.tsx index c2bbf69677..fd3be2428f 100644 --- a/packages/web/src/components/collection/desktop/FavoriteButton.tsx +++ b/packages/web/src/components/collection/desktop/FavoriteButton.tsx @@ -17,8 +17,6 @@ import { Tooltip } from 'components/tooltip' import { EntityActionButton } from '../../entity-page/EntityActionButton' -import { BUTTON_COLLAPSE_WIDTHS } from './utils' - const { getCollection } = collectionPageSelectors const { getAccountCollections } = accountSelectors const { @@ -87,7 +85,6 @@ export const FavoriteButton = (props: FavoriteButtonProps) => { text={isSaved ? messages.favorited : messages.favorite} leftIcon={} onClick={handleFavorite} - widthToHideText={BUTTON_COLLAPSE_WIDTHS.second} {...other} /> diff --git a/packages/web/src/components/collection/desktop/OwnerActionButtons.tsx b/packages/web/src/components/collection/desktop/OwnerActionButtons.tsx index b0a9112f2c..f1373e4f0b 100644 --- a/packages/web/src/components/collection/desktop/OwnerActionButtons.tsx +++ b/packages/web/src/components/collection/desktop/OwnerActionButtons.tsx @@ -27,11 +27,18 @@ export const OwnerActionButtons = (props: OwnerActionButtonProps) => { <> + - {is_private && !is_album ? ( - + ) : null} {!is_private ? ( diff --git a/packages/web/src/components/collection/desktop/PublishButton.tsx b/packages/web/src/components/collection/desktop/PublishButton.tsx index 8c62ca707a..d93926eb3d 100644 --- a/packages/web/src/components/collection/desktop/PublishButton.tsx +++ b/packages/web/src/components/collection/desktop/PublishButton.tsx @@ -15,7 +15,6 @@ import { EntityActionButton } from '../../entity-page/EntityActionButton' import styles from './CollectionHeader.module.css' import { PublishConfirmationModal } from './PublishConfirmationModal' -import { BUTTON_COLLAPSE_WIDTHS } from './utils' const { getCollection } = collectionPageSelectors const { getCollecitonHasHiddenTracks } = cacheCollectionsSelectors @@ -63,7 +62,6 @@ export const PublishButton = (props: PublishButtonProps) => { ) } onClick={_is_publishing ? undefined : toggleIsConfirming} - widthToHideText={BUTTON_COLLAPSE_WIDTHS.second} disabled={isDisabled} {...other} /> diff --git a/packages/web/src/components/collection/desktop/PublishConfirmationModal.tsx b/packages/web/src/components/collection/desktop/PublishConfirmationModal.tsx index 343a15dbe5..e98fbe08e2 100644 --- a/packages/web/src/components/collection/desktop/PublishConfirmationModal.tsx +++ b/packages/web/src/components/collection/desktop/PublishConfirmationModal.tsx @@ -40,7 +40,8 @@ export const PublishConfirmationModal = ( const handlePublish = useCallback(() => { dispatch(publishPlaylist(collectionId)) - }, [dispatch, collectionId]) + onClose() + }, [dispatch, collectionId, onClose]) return ( diff --git a/packages/web/src/components/collection/desktop/RepostButton.tsx b/packages/web/src/components/collection/desktop/RepostButton.tsx index ca54909ca5..87331a7333 100644 --- a/packages/web/src/components/collection/desktop/RepostButton.tsx +++ b/packages/web/src/components/collection/desktop/RepostButton.tsx @@ -15,8 +15,6 @@ import { Tooltip } from 'components/tooltip' import { EntityActionButton } from '../../entity-page/EntityActionButton' -import { BUTTON_COLLAPSE_WIDTHS } from './utils' - const { getCollection } = collectionPageSelectors const { repostCollection, undoRepostCollection } = collectionsSocialActions @@ -59,7 +57,6 @@ export const RepostButton = (props: RepostButtonProps) => { text={has_current_user_reposted ? messages.reposted : messages.repost} leftIcon={} onClick={handleRepost} - widthToHideText={BUTTON_COLLAPSE_WIDTHS.third} {...other} /> diff --git a/packages/web/src/components/collection/desktop/ShareButton.tsx b/packages/web/src/components/collection/desktop/ShareButton.tsx index ebbbf5ea51..a1c6679d0a 100644 --- a/packages/web/src/components/collection/desktop/ShareButton.tsx +++ b/packages/web/src/components/collection/desktop/ShareButton.tsx @@ -13,8 +13,6 @@ import { Tooltip } from 'components/tooltip' import { EntityActionButton } from '../../entity-page/EntityActionButton' -import { BUTTON_COLLAPSE_WIDTHS } from './utils' - const { requestOpen: requestOpenShareModal } = shareModalUIActions const messages = { @@ -61,7 +59,6 @@ export const ShareButton = (props: ShareButtonProps) => { type={type ?? ButtonType.COMMON} text={messages.share} leftIcon={} - widthToHideText={BUTTON_COLLAPSE_WIDTHS.second} onClick={handleShare} {...other} /> diff --git a/packages/web/src/components/collection/desktop/SmartCollectionActionButtons.tsx b/packages/web/src/components/collection/desktop/SmartCollectionActionButtons.tsx index a9326356e7..f809756ba7 100644 --- a/packages/web/src/components/collection/desktop/SmartCollectionActionButtons.tsx +++ b/packages/web/src/components/collection/desktop/SmartCollectionActionButtons.tsx @@ -2,6 +2,7 @@ import { ID, SmartCollectionVariant } from '@audius/common' import { FavoriteButton } from './FavoriteButton' import { ShareButton } from './ShareButton' +import { BUTTON_COLLAPSE_WIDTHS } from './utils' type SmartCollectionActionButtonsProps = { collectionId: SmartCollectionVariant @@ -14,8 +15,12 @@ export const SmartCollectionActionButtons = ( const { collectionId, userId } = props return collectionId === SmartCollectionVariant.AUDIO_NFT_PLAYLIST ? ( - + ) : ( - + ) } diff --git a/packages/web/src/components/image-selection/ImageSelectionButton.js b/packages/web/src/components/image-selection/ImageSelectionButton.js index 8b2f9e773c..759f36bb3d 100644 --- a/packages/web/src/components/image-selection/ImageSelectionButton.js +++ b/packages/web/src/components/image-selection/ImageSelectionButton.js @@ -18,6 +18,7 @@ const messages = { } const ImageSelectionButton = ({ + anchorRef: anchorRefProp, wrapperClassName, buttonClassName, hasImage, @@ -32,7 +33,7 @@ const ImageSelectionButton = ({ source, defaultPopupOpen = false }) => { - const anchorRef = useRef() + const anchorRefInner = useRef() const [showModal, setShowModal] = useState(defaultPopupOpen) const closeModal = () => { @@ -65,7 +66,7 @@ const ImageSelectionButton = ({ {includePopup ? ( <>