From 817459536dd51f9a01351aadb255c2118cc2a5b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?marcin=20miko=C5=82ajczak?= Date: Sat, 1 Apr 2023 15:46:21 +0200 Subject: [PATCH 1/2] Update TailwindCSS, fix aspect ratio in ProfileMediaPanel MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: marcin mikołajczak --- .../account-gallery/components/media-item.tsx | 12 +- package.json | 8 +- yarn.lock | 143 +++++++++++------- 3 files changed, 97 insertions(+), 66 deletions(-) diff --git a/app/soapbox/features/account-gallery/components/media-item.tsx b/app/soapbox/features/account-gallery/components/media-item.tsx index ef1aa13822..74ed34ff03 100644 --- a/app/soapbox/features/account-gallery/components/media-item.tsx +++ b/app/soapbox/features/account-gallery/components/media-item.tsx @@ -52,8 +52,8 @@ const MediaItem: React.FC = ({ attachment, onOpenMedia }) => { } }; - const status = attachment.get('status'); - const title = status.get('spoiler_text') || attachment.get('description'); + const status = attachment.status; + const title = status.spoiler_text || attachment.description; let thumbnail: React.ReactNode = ''; let icon; @@ -61,8 +61,8 @@ const MediaItem: React.FC = ({ attachment, onOpenMedia }) => { if (attachment.type === 'unknown') { // Skip } else if (attachment.type === 'image') { - const focusX = Number(attachment.getIn(['meta', 'focus', 'x'])) || 0; - const focusY = Number(attachment.getIn(['meta', 'focus', 'y'])) || 0; + const focusX = Number(attachment.meta.getIn(['focus', 'x'])) || 0; + const focusY = Number(attachment.meta.getIn(['focus', 'y'])) || 0; const x = ((focusX / 2) + .5) * 100; const y = ((focusY / -2) + .5) * 100; @@ -122,9 +122,9 @@ const MediaItem: React.FC = ({ attachment, onOpenMedia }) => { return (
- + = 3.1.0 < 4" + +"thenify@>= 3.1.0 < 4": + version "3.3.1" + resolved "https://registry.yarnpkg.com/thenify/-/thenify-3.3.1.tgz#8932e686a4066038a016dd9e2ca46add9838a95f" + integrity sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw== + dependencies: + any-promise "^1.0.0" + through2@^2.0.0: version "2.0.5" resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.5.tgz#01c1e39eb31d07cb7d03a96a70823260b23132cd" @@ -16885,6 +16911,11 @@ ts-dedent@^2.0.0, ts-dedent@^2.2.0: resolved "https://registry.yarnpkg.com/ts-dedent/-/ts-dedent-2.2.0.tgz#39e4bd297cd036292ae2394eb3412be63f563bb5" integrity sha512-q5W7tVM71e2xjHZTlgfTDoPF/SmqKG5hddq9SzR49CH2hayqRKJtQ4mtRlSxKaJlR/+9rEM+mnBHf7I2/BQcpQ== +ts-interface-checker@^0.1.9: + version "0.1.13" + resolved "https://registry.yarnpkg.com/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz#784fd3d679722bc103b1b4b8030bcddb5db2a699" + integrity sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA== + ts-jest@^29.0.0: version "29.0.3" resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-29.0.3.tgz#63ea93c5401ab73595440733cefdba31fcf9cb77" @@ -18187,7 +18218,7 @@ xmlchars@^2.2.0: resolved "https://registry.yarnpkg.com/xmlchars/-/xmlchars-2.2.0.tgz#060fe1bcb7f9c76fe2a17db86a9bc3ab894210cb" integrity sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw== -xtend@^4.0.0, xtend@^4.0.1, xtend@^4.0.2, xtend@~4.0.1: +xtend@^4.0.0, xtend@^4.0.1, xtend@~4.0.1: version "4.0.2" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== From a1cf627bfd7cdd19694bf621007c78caad5ba7c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?marcin=20miko=C5=82ajczak?= Date: Sat, 1 Apr 2023 20:37:34 +0200 Subject: [PATCH 2/2] Lint MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: marcin mikołajczak --- app/soapbox/components/account.tsx | 2 +- .../components/dropdown-menu/dropdown-menu-item.tsx | 2 +- app/soapbox/components/error-boundary.tsx | 2 +- app/soapbox/components/event-preview.tsx | 4 ++-- app/soapbox/components/gdpr-banner.tsx | 2 +- app/soapbox/components/group-card.tsx | 2 +- .../components/groups/popover/group-popover.tsx | 2 +- app/soapbox/components/icon-with-counter.tsx | 2 +- app/soapbox/components/profile-hover-card.tsx | 2 +- app/soapbox/components/sidebar-menu.tsx | 2 +- app/soapbox/components/still-image.tsx | 2 +- app/soapbox/components/ui/file-input/file-input.tsx | 2 +- app/soapbox/components/ui/icon/icon.tsx | 2 +- app/soapbox/components/ui/menu/menu.tsx | 2 +- app/soapbox/features/account/components/header.tsx | 2 +- app/soapbox/features/admin/tabs/awaiting-approval.tsx | 2 +- app/soapbox/features/ads/components/ad.tsx | 2 +- app/soapbox/features/auth-layout/index.tsx | 2 +- app/soapbox/features/chats/components/chat-list.tsx | 2 +- .../chat-page/components/chat-page-settings.tsx | 2 +- .../chats/components/chat-page/components/welcome.tsx | 2 +- .../features/chats/components/chat-search/results.tsx | 2 +- .../chats/components/chat-widget/chat-pane-header.tsx | 2 +- .../features/directory/components/account-card.tsx | 4 ++-- .../edit-profile/components/profile-preview.tsx | 2 +- app/soapbox/features/group/components/group-header.tsx | 2 +- app/soapbox/features/group/edit-group.tsx | 2 +- .../groups/components/discover/group-grid-item.tsx | 4 ++-- .../onboarding/steps/suggested-accounts-step.tsx | 2 +- .../components/placeholder-event-preview.tsx | 2 +- .../placeholder/components/placeholder-group-card.tsx | 2 +- .../components/placeholder-group-discover.tsx | 2 +- .../features/public-layout/components/footer.tsx | 2 +- .../features/public-layout/components/header.tsx | 2 +- .../features/public-layout/components/sonar.tsx | 10 +++++----- .../modals/compose-event-modal/compose-event-modal.tsx | 2 +- .../modals/manage-group-modal/steps/details-step.tsx | 2 +- .../modals/report-modal/steps/reason-step.tsx | 2 +- app/soapbox/features/ui/components/navbar.tsx | 2 +- app/soapbox/features/ui/components/promo-panel.tsx | 2 +- 40 files changed, 47 insertions(+), 47 deletions(-) diff --git a/app/soapbox/components/account.tsx b/app/soapbox/components/account.tsx index 20150b79df..5ce11c0a22 100644 --- a/app/soapbox/components/account.tsx +++ b/app/soapbox/components/account.tsx @@ -193,7 +193,7 @@ const Account = ({ {emoji && ( diff --git a/app/soapbox/components/dropdown-menu/dropdown-menu-item.tsx b/app/soapbox/components/dropdown-menu/dropdown-menu-item.tsx index f34240d8a2..8b0ca77553 100644 --- a/app/soapbox/components/dropdown-menu/dropdown-menu-item.tsx +++ b/app/soapbox/components/dropdown-menu/dropdown-menu-item.tsx @@ -69,7 +69,7 @@ const DropdownMenuItem = ({ index, item, onClick }: IDropdownMenuItem) => { }, [itemRef.current, index]); if (item === null) { - return
  • ; + return
  • ; } return ( diff --git a/app/soapbox/components/error-boundary.tsx b/app/soapbox/components/error-boundary.tsx index 4ab76e46d1..795596eb7e 100644 --- a/app/soapbox/components/error-boundary.tsx +++ b/app/soapbox/components/error-boundary.tsx @@ -113,7 +113,7 @@ class ErrorBoundary extends React.PureComponent { const errorText = this.getErrorText(); return ( -
    +
    diff --git a/app/soapbox/components/event-preview.tsx b/app/soapbox/components/event-preview.tsx index 0d11382e47..9cfd1da819 100644 --- a/app/soapbox/components/event-preview.tsx +++ b/app/soapbox/components/event-preview.tsx @@ -52,7 +52,7 @@ const EventPreview: React.FC = ({ status, className, hideAction, return (
    -
    +
    {floatingAction && action}
    @@ -65,7 +65,7 @@ const EventPreview: React.FC = ({ status, className, hideAction, {!floatingAction && action} -
    +
    diff --git a/app/soapbox/components/gdpr-banner.tsx b/app/soapbox/components/gdpr-banner.tsx index f8bd28341b..73d90684ea 100644 --- a/app/soapbox/components/gdpr-banner.tsx +++ b/app/soapbox/components/gdpr-banner.tsx @@ -31,7 +31,7 @@ const GdprBanner: React.FC = () => { return ( -
    +
    diff --git a/app/soapbox/components/group-card.tsx b/app/soapbox/components/group-card.tsx index 7b9fa6458e..2aee2bc7f6 100644 --- a/app/soapbox/components/group-card.tsx +++ b/app/soapbox/components/group-card.tsx @@ -37,7 +37,7 @@ const GroupCard: React.FC = ({ group }) => { {/* Group Avatar */} -
    +
    diff --git a/app/soapbox/components/groups/popover/group-popover.tsx b/app/soapbox/components/groups/popover/group-popover.tsx index 776506f991..752deeb8af 100644 --- a/app/soapbox/components/groups/popover/group-popover.tsx +++ b/app/soapbox/components/groups/popover/group-popover.tsx @@ -53,7 +53,7 @@ const GroupPopover = (props: IGroupPopoverContainer) => { {/* Group Avatar */} -
    +
    diff --git a/app/soapbox/components/icon-with-counter.tsx b/app/soapbox/components/icon-with-counter.tsx index b244f932bf..dbc17d9d21 100644 --- a/app/soapbox/components/icon-with-counter.tsx +++ b/app/soapbox/components/icon-with-counter.tsx @@ -16,7 +16,7 @@ const IconWithCounter: React.FC = ({ icon, count, countMax, .. {count > 0 && ( - + )} diff --git a/app/soapbox/components/profile-hover-card.tsx b/app/soapbox/components/profile-hover-card.tsx index 2117768368..2dd6a3fdde 100644 --- a/app/soapbox/components/profile-hover-card.tsx +++ b/app/soapbox/components/profile-hover-card.tsx @@ -142,7 +142,7 @@ export const ProfileHoverCard: React.FC = ({ visible = true } {followedBy && ( -
    +
    } diff --git a/app/soapbox/components/sidebar-menu.tsx b/app/soapbox/components/sidebar-menu.tsx index aad2d7f6be..241e3e8372 100644 --- a/app/soapbox/components/sidebar-menu.tsx +++ b/app/soapbox/components/sidebar-menu.tsx @@ -166,7 +166,7 @@ const SidebarMenu: React.FC = (): JSX.Element | null => { src={require('@tabler/icons/x.svg')} ref={closeButtonRef} iconClassName='h-6 w-6' - className='absolute top-0 right-0 -mr-11 mt-2 text-gray-600 hover:text-gray-600 dark:text-gray-400 dark:hover:text-gray-300' + className='absolute right-0 top-0 -mr-11 mt-2 text-gray-600 hover:text-gray-600 dark:text-gray-400 dark:hover:text-gray-300' />
    diff --git a/app/soapbox/components/still-image.tsx b/app/soapbox/components/still-image.tsx index 098da05796..8dce32f6fb 100644 --- a/app/soapbox/components/still-image.tsx +++ b/app/soapbox/components/still-image.tsx @@ -70,7 +70,7 @@ const StillImage: React.FC = ({ alt, className, src, style, letterb )} {(hoverToPlay && showExt) && ( -
    +
    )} diff --git a/app/soapbox/components/ui/file-input/file-input.tsx b/app/soapbox/components/ui/file-input/file-input.tsx index 89c42f14bc..2a08a934e8 100644 --- a/app/soapbox/components/ui/file-input/file-input.tsx +++ b/app/soapbox/components/ui/file-input/file-input.tsx @@ -8,7 +8,7 @@ const FileInput = forwardRef((props, ref) => { {...props} ref={ref} type='file' - className='block w-full text-sm text-gray-800 file:mr-2 file:cursor-pointer file:rounded-full file:border file:border-solid file:border-gray-200 file:bg-white file:py-1.5 file:px-3 file:text-xs file:font-medium file:leading-4 file:text-gray-700 hover:file:bg-gray-100 dark:text-gray-200 dark:file:border-gray-800 dark:file:bg-gray-900 dark:file:text-gray-500 dark:file:hover:bg-gray-800' + className='block w-full text-sm text-gray-800 file:mr-2 file:cursor-pointer file:rounded-full file:border file:border-solid file:border-gray-200 file:bg-white file:px-3 file:py-1.5 file:text-xs file:font-medium file:leading-4 file:text-gray-700 hover:file:bg-gray-100 dark:text-gray-200 dark:file:border-gray-800 dark:file:bg-gray-900 dark:file:text-gray-500 dark:file:hover:bg-gray-800' /> ); }); diff --git a/app/soapbox/components/ui/icon/icon.tsx b/app/soapbox/components/ui/icon/icon.tsx index 5c294a1a83..f51c3ca38f 100644 --- a/app/soapbox/components/ui/icon/icon.tsx +++ b/app/soapbox/components/ui/icon/icon.tsx @@ -23,7 +23,7 @@ interface IIcon extends Pick, 'strokeWidth'> { const Icon: React.FC = ({ src, alt, count, size, countMax, ...filteredProps }): JSX.Element => (
    {count ? ( - + ) : null} diff --git a/app/soapbox/components/ui/menu/menu.tsx b/app/soapbox/components/ui/menu/menu.tsx index c61cc56d2f..ff18b99eb6 100644 --- a/app/soapbox/components/ui/menu/menu.tsx +++ b/app/soapbox/components/ui/menu/menu.tsx @@ -37,6 +37,6 @@ const MenuList: React.FC = (props) => { }; /** Divides menu items. */ -const MenuDivider = () =>
    ; +const MenuDivider = () =>
    ; export { Menu, MenuButton, MenuDivider, MenuItems, MenuItem, MenuList, MenuLink }; diff --git a/app/soapbox/features/account/components/header.tsx b/app/soapbox/features/account/components/header.tsx index de21618801..ac4fdd66e1 100644 --- a/app/soapbox/features/account/components/header.tsx +++ b/app/soapbox/features/account/components/header.tsx @@ -617,7 +617,7 @@ const Header: React.FC = ({ account }) => {
    {renderHeader()} -
    +
    {info} diff --git a/app/soapbox/features/admin/tabs/awaiting-approval.tsx b/app/soapbox/features/admin/tabs/awaiting-approval.tsx index 36a86b61ad..b59a9a56c6 100644 --- a/app/soapbox/features/admin/tabs/awaiting-approval.tsx +++ b/app/soapbox/features/admin/tabs/awaiting-approval.tsx @@ -36,7 +36,7 @@ const AwaitingApproval: React.FC = () => { className='divide-y divide-solid divide-gray-200 dark:divide-gray-800' > {accountIds.map(id => ( -
    +
    ))} diff --git a/app/soapbox/features/ads/components/ad.tsx b/app/soapbox/features/ads/components/ad.tsx index db28100653..0895093b7d 100644 --- a/app/soapbox/features/ads/components/ad.tsx +++ b/app/soapbox/features/ads/components/ad.tsx @@ -113,7 +113,7 @@ const Ad: React.FC = ({ ad }) => { {showInfo && ( -
    +
    diff --git a/app/soapbox/features/auth-layout/index.tsx b/app/soapbox/features/auth-layout/index.tsx index 2b32d25807..4b1cad917c 100644 --- a/app/soapbox/features/auth-layout/index.tsx +++ b/app/soapbox/features/auth-layout/index.tsx @@ -37,7 +37,7 @@ const AuthLayout = () => {
    -
    +
    diff --git a/app/soapbox/features/chats/components/chat-list.tsx b/app/soapbox/features/chats/components/chat-list.tsx index ff99006277..1832f8b27d 100644 --- a/app/soapbox/features/chats/components/chat-list.tsx +++ b/app/soapbox/features/chats/components/chat-list.tsx @@ -80,7 +80,7 @@ const ChatList: React.FC = ({ onClickChat, useWindowScroll = false, s })} />
    { }; return ( - + { }; return ( - +
    {intl.formatMessage(messages.title, { br:
    })} diff --git a/app/soapbox/features/chats/components/chat-search/results.tsx b/app/soapbox/features/chats/components/chat-search/results.tsx index 2f35830533..72b5b0c633 100644 --- a/app/soapbox/features/chats/components/chat-search/results.tsx +++ b/app/soapbox/features/chats/components/chat-search/results.tsx @@ -69,7 +69,7 @@ const Results = ({ accountSearchResult, onSelect }: IResults) => { })} />
    { } return ( - + = ({ id }) => {
    {followedBy && ( -
    +
    } @@ -59,7 +59,7 @@ const AccountCard: React.FC = ({ id }) => { diff --git a/app/soapbox/features/edit-profile/components/profile-preview.tsx b/app/soapbox/features/edit-profile/components/profile-preview.tsx index 7bc3a894fc..e4aa73b180 100644 --- a/app/soapbox/features/edit-profile/components/profile-preview.tsx +++ b/app/soapbox/features/edit-profile/components/profile-preview.tsx @@ -26,7 +26,7 @@ const ProfilePreview: React.FC = ({ account }) => { {account.verified && ( -
    +
    )} diff --git a/app/soapbox/features/group/components/group-header.tsx b/app/soapbox/features/group/components/group-header.tsx index cbeddfaea0..713c64c86f 100644 --- a/app/soapbox/features/group/components/group-header.tsx +++ b/app/soapbox/features/group/components/group-header.tsx @@ -109,7 +109,7 @@ const GroupHeader: React.FC = ({ group }) => {
    {renderHeader()} -
    +
    (({ src, onC const AvatarPicker = React.forwardRef(({ src, onChange, accept, disabled }, ref) => { return ( -
    diff --git a/app/soapbox/features/onboarding/steps/suggested-accounts-step.tsx b/app/soapbox/features/onboarding/steps/suggested-accounts-step.tsx index 8dfb2485b2..aac120d066 100644 --- a/app/soapbox/features/onboarding/steps/suggested-accounts-step.tsx +++ b/app/soapbox/features/onboarding/steps/suggested-accounts-step.tsx @@ -24,7 +24,7 @@ const SuggestedAccountsStep = ({ onNext }: { onNext: () => void }) => { } return ( -
    +
    { {generateText(eventNameLength)} -
    +
    {generateText(nameLength)} {generateText(nameLength)} {generateText(nameLength)} diff --git a/app/soapbox/features/placeholder/components/placeholder-group-card.tsx b/app/soapbox/features/placeholder/components/placeholder-group-card.tsx index f07012f8f2..b43ae1aaf5 100644 --- a/app/soapbox/features/placeholder/components/placeholder-group-card.tsx +++ b/app/soapbox/features/placeholder/components/placeholder-group-card.tsx @@ -14,7 +14,7 @@ const PlaceholderGroupCard = () => {
    {/* Group Avatar */} -
    +
    diff --git a/app/soapbox/features/placeholder/components/placeholder-group-discover.tsx b/app/soapbox/features/placeholder/components/placeholder-group-discover.tsx index 7a5d58d1d6..468cb54817 100644 --- a/app/soapbox/features/placeholder/components/placeholder-group-discover.tsx +++ b/app/soapbox/features/placeholder/components/placeholder-group-discover.tsx @@ -9,7 +9,7 @@ const PlaceholderGroupDiscover = () => { return ( - + {/* Group Cover Image */}
    diff --git a/app/soapbox/features/public-layout/components/footer.tsx b/app/soapbox/features/public-layout/components/footer.tsx index 0f6435f0ab..4038b5d186 100644 --- a/app/soapbox/features/public-layout/components/footer.tsx +++ b/app/soapbox/features/public-layout/components/footer.tsx @@ -21,7 +21,7 @@ const Footer = () => { }); return ( -