From 187af8b7d24ecbf1b08a3b3618c61dae0b6db94c Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Sun, 24 Apr 2022 17:53:03 -0500 Subject: [PATCH] Improve dropdown menu styles --- app/soapbox/components/dropdown_menu.tsx | 8 ++++---- app/soapbox/components/ui/icon/svg-icon.tsx | 2 ++ .../features/account/components/header.js | Bin 24180 -> 24190 bytes 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/soapbox/components/dropdown_menu.tsx b/app/soapbox/components/dropdown_menu.tsx index e28ea0f9e7..4bd747d0a4 100644 --- a/app/soapbox/components/dropdown_menu.tsx +++ b/app/soapbox/components/dropdown_menu.tsx @@ -6,8 +6,8 @@ import { spring } from 'react-motion'; import Overlay from 'react-overlays/lib/Overlay'; import { withRouter, RouteComponentProps } from 'react-router-dom'; -import Icon from 'soapbox/components/icon'; import { IconButton } from 'soapbox/components/ui'; +import SvgIcon from 'soapbox/components/ui/icon/svg-icon'; import Motion from 'soapbox/features/ui/util/optional_motion'; import type { Status } from 'soapbox/types/entities'; @@ -177,7 +177,7 @@ class DropdownMenu extends React.PureComponent +
  • - {icon && } - {text} + {icon && } + {text}
  • ); diff --git a/app/soapbox/components/ui/icon/svg-icon.tsx b/app/soapbox/components/ui/icon/svg-icon.tsx index 84604150d9..c84e402031 100644 --- a/app/soapbox/components/ui/icon/svg-icon.tsx +++ b/app/soapbox/components/ui/icon/svg-icon.tsx @@ -29,6 +29,8 @@ const SvgIcon: React.FC = ({ src, alt, size = 24, className }): JSX.El height={size} loader={loader} data-testid='svg-icon' + // The cache causes bugs, and the ServiceWorker already caches icons. + cacheRequests={false} > {/* If the fetch fails, fall back to displaying the loader */} {loader} diff --git a/app/soapbox/features/account/components/header.js b/app/soapbox/features/account/components/header.js index c1d807546920cd7392a0f01dab385471c539cebc..1db5b1dd306055f8073214b362642b8992d84707 100644 GIT binary patch delta 24 fcmeyehwq