Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Revert and scope backdrop overrides

Manav Rathiccca42f75735
diff --git a/web/packages/base/components/loaders.tsx b/web/packages/base/components/loaders.tsx
index 49c4429c87..ef657bd0fc 100644
--- a/web/packages/base/components/loaders.tsx
+++ b/web/packages/base/components/loaders.tsx
@@ -44,12 +44,13 @@ export const LoadingOverlay: React.FC = () => (
*/
export const TranslucentLoadingOverlay: React.FC = () => (
<Backdrop
- // Specifying open here causes us to lose animations. This is fine since
- // the use of this is limited to a few interstitial overlays, and if
- // refactoring consider replacing this entirely with a more localized
- // activity indicator.
+ // Specifying open here causes us to lose animations. This is not
+ // optimal, but fine for now since this the use of this is limited to a
+ // few interstitial overlays, and if refactoring consider replacing this
+ // entirely with a more localized activity indicator.
open={true}
sx={{
+ backgroundColor: "var(--mui-palette-backdrop-muted)",
backdropFilter: "blur(30px) opacity(95%)",
// TODO: Why is this zIndex override required? + use a constant.
zIndex: 9000,
diff --git a/web/packages/base/components/utils/theme.ts b/web/packages/base/components/utils/theme.ts
index bff9e4e5dc..7c8017f22c 100644
--- a/web/packages/base/components/utils/theme.ts
+++ b/web/packages/base/components/utils/theme.ts
@@ -547,28 +547,12 @@ const components: Components = {
},
},
- MuiBackdrop: {
+ MuiDrawer: {
styleOverrides: {
root: {
- backgroundColor: "var(--mui-palette-backdrop-muted)",
- // [Note: Backdrop variant blur]
- //
- // What we wish for is this. But as of MUI v6.4, the TypeScript
- // definition for Backdrop does not contain a variant, causing
- // tsc to show an error when we try to specify a variant.
- //
- // Since the styling is trivial and used only infrequently, for
- // now we copy paste it. If it gets needed more often, we can
- // also make it into a palette var.
- //
- // variants: [
- // {
- // props: { variant: "blur" },
- // style: {
- // backdropFilter: "blur(30px) opacity(95%)",
- // },
- // },
- // ],
+ ".MuiBackdrop-root": {
+ backgroundColor: "var(--mui-palette-backdrop-muted)",
+ },
},
},
},
@@ -583,6 +567,9 @@ const components: Components = {
},
styleOverrides: {
root: {
+ ".MuiBackdrop-root": {
+ backgroundColor: "var(--mui-palette-backdrop-muted)",
+ },
// Reset the MUI default paddings to 16px everywhere.
//
// This is not a great choice either, usually most dialogs, for
diff --git a/web/packages/new/photos/components/PlanSelector.tsx b/web/packages/new/photos/components/PlanSelector.tsx
index b0aae3585a..311f64bc84 100644
--- a/web/packages/new/photos/components/PlanSelector.tsx
+++ b/web/packages/new/photos/components/PlanSelector.tsx
@@ -85,6 +85,17 @@ export const PlanSelector: React.FC<PlanSelectorProps> = ({
[theme.breakpoints.down(360)]: { p: 0 },
}),
},
+ // [Note: Backdrop variant blur]
+ //
+ // What we wish for is creating a variant of Backdrop that
+ // instead of specifying the backdrop filter each time. But as
+ // of MUI v6.4, the TypeScript definition for Backdrop does not
+ // contain a variant, causing tsc to show an error when we try
+ // to specify a variant.
+ //
+ // Since the styling is trivial and used only infrequently, for
+ // now we copy paste it. If it gets needed more often, we can
+ // also make it into a palette var.
backdrop: {
sx: { backdropFilter: "blur(30px) opacity(95%)" },
},