Skip to content

Commit 2c879f9

Browse files
authored
Merge branch 'develop' into na/backend/disc-events-exclude-attending
2 parents a77ad23 + 4cba89b commit 2c879f9

15 files changed

Lines changed: 46 additions & 32 deletions

File tree

app/backend/src/couchers/servicers/bugs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ def ReportBug(
202202
f"**Page**: {request.page}\n"
203203
f"**User**: {user_details} / `{(context._sofa or '')[:12]}`"
204204
)
205-
issue_labels = ["bug tool", "bug: triage needed"]
205+
issue_labels = ["bug: triage needed"]
206206

207207
json_body = {"title": issue_title, "body": issue_body, "labels": issue_labels}
208208

app/backend/src/tests/test_bugs.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def dud_post(url, auth, json):
6969
assert json == {
7070
"title": "subject",
7171
"body": expected_body,
72-
"labels": ["bug tool", "bug: triage needed"],
72+
"labels": ["bug: triage needed"],
7373
}
7474

7575
class _PostReturn:
@@ -130,7 +130,7 @@ def dud_post(url, auth, json):
130130
assert json == {
131131
"title": "subject",
132132
"body": expected_body,
133-
"labels": ["bug tool", "bug: triage needed"],
133+
"labels": ["bug: triage needed"],
134134
}
135135

136136
class _PostReturn:

app/web/components/FlipCard.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { Box, Stack, Typography } from "@mui/material";
2+
import { useTranslation } from "i18n";
3+
import { GLOBAL } from "i18n/namespaces";
24
import { ReactNode, useCallback, useState } from "react";
35

4-
import { useTranslation } from "../i18n";
5-
66
export interface FlipCardProps {
77
icon: ReactNode;
88
title: ReactNode;
@@ -20,7 +20,7 @@ export default function FlipCard({
2020
children,
2121
height = { xs: 300, md: 320 },
2222
}: FlipCardProps) {
23-
const { t } = useTranslation(["GLOBAL"]);
23+
const { t } = useTranslation([GLOBAL]);
2424
const [flipped, setFlipped] = useState(false);
2525
const toggle = useCallback(() => setFlipped((f) => !f), []);
2626

app/web/components/Navigation/ReportButton.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {
99
import Button from "components/Button";
1010
import { BugIcon } from "components/Icons";
1111
import { useTranslation } from "i18n";
12+
import { GLOBAL } from "i18n/namespaces";
1213
import { useState } from "react";
1314
import { theme } from "theme";
1415

@@ -40,7 +41,7 @@ export default function ReportButton({
4041
isMenuLink?: boolean;
4142
sx?: SxProps<Theme>;
4243
}) {
43-
const { t } = useTranslation("global");
44+
const { t } = useTranslation(GLOBAL);
4445
const isBelowMd = useMediaQuery(theme.breakpoints.down("md"));
4546
const [isDialogOpen, setIsDialogOpen] = useState(false);
4647

app/web/components/Navigation/ReportDialog.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import StyledLink from "components/StyledLink";
1414
import TextField from "components/TextField";
1515
import { RpcError } from "grpc-web";
1616
import { useTranslation } from "i18n";
17+
import { GLOBAL } from "i18n/namespaces";
1718
import { ReportBugRes } from "proto/bugs_pb";
1819
import { ComponentPropsWithRef, forwardRef, useState } from "react";
1920
import { useForm } from "react-hook-form";
@@ -56,7 +57,7 @@ const StyledReportTypeButton = styled(Button)(() => ({
5657
}));
5758

5859
export default function ReportDialog({ open, onClose }: DialogProps) {
59-
const { t } = useTranslation("global");
60+
const { t } = useTranslation(GLOBAL);
6061

6162
const [type, setType] = useState<"initial" | "bug">("initial");
6263
const {

app/web/components/StrongVerificationBadge.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ import { useTranslation } from "i18n";
44
import { GLOBAL } from "i18n/namespaces";
55
import React from "react";
66

7-
const StyledSpan = styled("span")(({ theme }) => ({
8-
display: "inline-block",
7+
const StyledSpan = styled("span")(() => ({
8+
display: "inline-flex",
9+
alignItems: "center",
910
verticalAlign: "middle",
10-
marginLeft: theme.spacing(0.5),
1111
}));
1212

1313
export default function StrongVerificationBadge() {

app/web/components/TOSLink.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { styled } from "@mui/material";
2+
import { GLOBAL } from "i18n/namespaces";
23
import Link from "next/link";
34
import { useTranslation } from "next-i18next";
45
import { tosRoute } from "routes";
@@ -9,7 +10,7 @@ const StyledLink = styled(Link)(({ theme }) => ({
910
}));
1011

1112
export default function TOSLink() {
12-
const { t } = useTranslation("global");
13+
const { t } = useTranslation(GLOBAL);
1314
return (
1415
<StyledLink href={tosRoute} target="_blank">
1516
{t("terms_of_service")}

app/web/components/UserSummary.tsx

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import {
2+
Box,
23
ListItemAvatar,
34
ListItemText,
45
Skeleton,
@@ -17,6 +18,13 @@ import useIsScreenSizeOrSmaller from "utils/useIsScreenSizeOrSmaller";
1718

1819
import StrongVerificationBadge from "./StrongVerificationBadge";
1920

21+
// It could be BlockedUser.AsObject or LiteUser.AsObject and only LiteUser has hasStrongVerification
22+
function isLiteUser(
23+
user: LiteUser.AsObject | BlockedUser.AsObject,
24+
): user is LiteUser.AsObject {
25+
return "hasStrongVerification" in user;
26+
}
27+
2028
const StyledWrapper = styled("div")({
2129
display: "flex",
2230
padding: 0,
@@ -125,16 +133,14 @@ export default function UserSummary({
125133
sx={{ maxWidth: 300 }}
126134
/>
127135
) : (
128-
<>
136+
<Box sx={{ display: "flex", alignItems: "center", gap: 0.5 }}>
129137
{nameOnly
130138
? nameValue
131139
: `${nameValue}${user && "age" in user ? `, ${user.age}` : ""}`}
132-
{user &&
133-
"hasStrongVerification" in user &&
134-
user.hasStrongVerification ? (
140+
{isLiteUser(user) && user.hasStrongVerification && (
135141
<StrongVerificationBadge />
136-
) : null}
137-
</>
142+
)}
143+
</Box>
138144
)}
139145
</Typography>
140146
</Tooltip>

app/web/features/communities/CommunityPage/CommunityPage.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { useFeatureValue } from "@growthbook/growthbook-react";
21
import { styled, Typography } from "@mui/material";
32
import HtmlMeta from "components/HtmlMeta";
43
import EditCommunityPage from "features/communities/EditCommunityInfoPage";
@@ -33,7 +32,7 @@ export default function CommunityPage({
3332
edit: boolean | undefined;
3433
}) {
3534
const { t } = useTranslation([COMMUNITIES]);
36-
const isPublicTripsEnabled = useFeatureValue("public_trips_enabled", false);
35+
const isPublicTripsEnabled = process.env.NODE_ENV !== "production";
3736

3837
return (
3938
<CommunityBase communityId={communityId}>

app/web/features/communities/CommunityPage/CommunityPageSubHeader.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { useFeatureValue } from "@growthbook/growthbook-react";
21
import { TabContext } from "@mui/lab";
32
import { Breadcrumbs, styled, Typography } from "@mui/material";
43
import BetaFlag from "components/BetaFlag";
@@ -34,7 +33,7 @@ export default function CommunityPageSubHeader({
3433
tab: CommunityTab;
3534
}) {
3635
const { t } = useTranslation([COMMUNITIES, PUBLIC_TRIPS]);
37-
const isPublicTripsEnabled = useFeatureValue("public_trips_enabled", false);
36+
const isPublicTripsEnabled = process.env.NODE_ENV !== "production";
3837

3938
const router = useRouter();
4039
const communityTabBarLabels: Partial<

0 commit comments

Comments
 (0)