Skip to content

Commit bd71385

Browse files
authored
Merge branch 'master' into feat/tumble-typed-effect
2 parents 6170b92 + 0cb7f6b commit bd71385

22 files changed

Lines changed: 352 additions & 431 deletions

File tree

.github/workflows/ci-failure-comment.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ jobs:
1717
with:
1818
github-token: ${{ secrets.GITHUB_TOKEN }}
1919
run-id: ${{ github.event.workflow_run.id }}
20+
name: pr_num
21+
path: ./pr_num
2022

2123
- name: Read the pr_num file
2224
id: pr_num_reader

backend/__tests__/api/controllers/user.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3347,7 +3347,7 @@ describe("user controller test", () => {
33473347
bio: new Array(251).fill("x").join(""),
33483348
keyboard: new Array(76).fill("x").join(""),
33493349
socialProfiles: {
3350-
twitter: new Array(21).fill("x").join(""),
3350+
twitter: new Array(16).fill("x").join(""),
33513351
github: new Array(40).fill("x").join(""),
33523352
website: `https://${new Array(201 - "https://".length)
33533353
.fill("x")
@@ -3362,7 +3362,7 @@ describe("user controller test", () => {
33623362
validationErrors: [
33633363
'"bio" String must contain at most 250 character(s)',
33643364
'"keyboard" String must contain at most 75 character(s)',
3365-
'"socialProfiles.twitter" String must contain at most 20 character(s)',
3365+
'"socialProfiles.twitter" String must contain at most 15 character(s)',
33663366
'"socialProfiles.github" String must contain at most 39 character(s)',
33673367
'"socialProfiles.website" String must contain at most 200 character(s)',
33683368
],

frontend/__tests__/components/ui/form/SubmitButton.spec.tsx

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,19 @@ import { render, screen } from "@solidjs/testing-library";
22
import { JSXElement } from "solid-js";
33
import { describe, it, expect } from "vitest";
44

5-
import { SubmitButton } from "../../../../src/ts/components/ui/form/SubmitButton";
5+
import {
6+
FormStateSlice,
7+
SubmitButton,
8+
} from "../../../../src/ts/components/ui/form/SubmitButton";
69

7-
type FormState = {
8-
canSubmit: boolean;
9-
isSubmitting: boolean;
10-
isValid: boolean;
11-
isDirty: boolean;
12-
};
10+
type FormState = FormStateSlice;
1311

1412
function makeForm(state: Partial<FormState> = {}) {
1513
const fullState: FormState = {
1614
canSubmit: true,
1715
isSubmitting: false,
1816
isValid: true,
19-
isDirty: true,
17+
isDefaultValue: false,
2018
...state,
2119
};
2220

@@ -39,9 +37,9 @@ describe("SubmitButton", () => {
3937
expect(screen.getByRole("button")).toHaveAttribute("type", "submit");
4038
});
4139

42-
it("disables when form is not dirty", () => {
40+
it("disables when form is unchanged", () => {
4341
render(() => (
44-
<SubmitButton form={makeForm({ isDirty: false })} text="Save" />
42+
<SubmitButton form={makeForm({ isDefaultValue: true })} text="Save" />
4543
));
4644
expect(screen.getByRole("button")).toBeDisabled();
4745
});

frontend/src/html/popups.html

Lines changed: 0 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -266,78 +266,3 @@
266266
<div class="suggestions"></div>
267267
</div>
268268
</dialog>
269-
270-
<dialog id="editProfileModal" class="modalWrapper hidden">
271-
<form class="modal">
272-
<div class="title">Edit Profile</div>
273-
<div>
274-
<label>name</label>
275-
<div>
276-
To update your name, go to Account Settings > Account > Update account
277-
name
278-
</div>
279-
</div>
280-
<div>
281-
<label>avatar</label>
282-
<div>
283-
To update your avatar make sure your Discord account is linked, then go
284-
to Account Settings > Account > Discord Integration and click "Update
285-
Avatar"
286-
</div>
287-
</div>
288-
<div>
289-
<label>bio</label>
290-
<textarea class="bio" autocomplete="off" maxlength="250"></textarea>
291-
</div>
292-
<div>
293-
<label>keyboard</label>
294-
<textarea class="keyboard" autocomplete="off" maxlength="75"></textarea>
295-
</div>
296-
<div>
297-
<label>github</label>
298-
<div class="socialURL">
299-
<p>https://github.com/</p>
300-
<input
301-
class="github"
302-
type="text"
303-
value=""
304-
placeholder="username"
305-
maxlength="39"
306-
/>
307-
</div>
308-
</div>
309-
<div>
310-
<label>twitter</label>
311-
<div class="socialURL">
312-
<p>https://x.com/</p>
313-
<input
314-
class="twitter"
315-
type="text"
316-
value=""
317-
placeholder="username"
318-
maxlength="20"
319-
/>
320-
</div>
321-
</div>
322-
<div>
323-
<label>website</label>
324-
<input class="website" type="text" value="" maxlength="200" />
325-
</div>
326-
<div>
327-
<label>badge</label>
328-
<div class="badgeSelectionContainer"></div>
329-
</div>
330-
<div>
331-
<label>public activity</label>
332-
<label class="checkbox">
333-
<input
334-
class="editProfileShowActivityOnPublicProfile"
335-
type="checkbox"
336-
checked
337-
/>
338-
<span>Include test activity graph on your public profile.</span>
339-
</label>
340-
</div>
341-
<button class="edit-profile-submit" type="submit">save</button>
342-
</form>
343-
</dialog>

frontend/src/styles/popups.scss

Lines changed: 0 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -582,62 +582,3 @@ body.darkMode {
582582
}
583583
}
584584
}
585-
586-
#editProfileModal {
587-
.modal {
588-
max-width: 600px;
589-
max-height: 100%;
590-
label {
591-
color: var(--sub-color);
592-
margin-bottom: 0.25em;
593-
display: block;
594-
}
595-
input:not([type="checkbox"]) {
596-
width: 100%;
597-
}
598-
input[type="checkbox"] {
599-
vertical-align: text-bottom;
600-
}
601-
textarea {
602-
resize: vertical;
603-
width: 100%;
604-
padding: 10px;
605-
line-height: 1.2rem;
606-
min-height: 5rem;
607-
max-height: 10rem;
608-
}
609-
610-
.socialURL {
611-
display: flex;
612-
}
613-
614-
.socialURL > p {
615-
margin-block: 0.5rem;
616-
margin-inline-end: 0.5rem;
617-
}
618-
619-
.badgeSelectionContainer {
620-
display: flex;
621-
flex-wrap: wrap;
622-
}
623-
624-
.badgeSelectionItem {
625-
width: max-content;
626-
opacity: 25%;
627-
cursor: pointer;
628-
margin-right: 0.5rem;
629-
margin-bottom: 0.5rem;
630-
padding: 0;
631-
border-radius: calc(var(--roundness) / 2);
632-
}
633-
634-
.badgeSelectionItem.selected,
635-
.badgeSelectionItem:hover {
636-
opacity: 100%;
637-
}
638-
639-
span {
640-
color: var(--text-color);
641-
}
642-
}
643-
}

frontend/src/ts/components/common/UserBadge.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export function UserBadge(props: {
1414
class?: string;
1515
balloon?: Omit<BalloonProps, "text">;
1616
hideTextOnSmallScreens?: boolean;
17+
hideDescription?: boolean;
1718
}): JSXElement {
1819
const badge = (): UserBadgeType | undefined =>
1920
props.id !== undefined ? badges[props.id] : undefined;
@@ -24,7 +25,7 @@ export function UserBadge(props: {
2425
"rounded-[0.5em] px-[0.5em] py-[0.25em] text-em-xs",
2526
props.class,
2627
)}
27-
text={badge()?.description ?? ""}
28+
text={props.hideDescription ? "" : (badge()?.description ?? "")}
2829
{...props.balloon}
2930
style={{
3031
background: badge()?.background ?? "inherit",

frontend/src/ts/components/modals/CustomTestDurationModal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ export function CustomTestDurationModal(): JSXElement {
9898
form={form}
9999
variant="button"
100100
text="apply"
101-
skipDirtyCheck
101+
skipUnchangedCheck
102102
/>
103103
</form>
104104
</AnimatedModal>

frontend/src/ts/components/modals/CustomTextModal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@ export function CustomTextModal(): JSXElement {
490490
</div>
491491
<SubmitButton
492492
form={form}
493-
skipDirtyCheck
493+
skipUnchangedCheck
494494
variant="button"
495495
text="ok"
496496
class="lg:col-start-1"

frontend/src/ts/components/modals/CustomWordAmountModal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ export function CustomWordAmountModal(): JSXElement {
7575
form={form}
7676
variant="button"
7777
text="apply"
78-
skipDirtyCheck
78+
skipUnchangedCheck
7979
/>
8080
</form>
8181
</AnimatedModal>

0 commit comments

Comments
 (0)