Skip to content

Commit 62046c4

Browse files
authored
Merge pull request #2140 from AmruthPillai/release/v4.3.1
release: v4.3.1
2 parents 54bace4 + 3b73dcf commit 62046c4

29 files changed

+318
-146
lines changed

.eslintrc.json

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"plugins": ["simple-import-sort", "unused-imports"],
1010
"rules": {
1111
// eslint
12+
"no-console": "error",
1213
"no-return-await": "off",
1314

1415
// simple-import-sort

.github/workflows/lint-test-build.yml

+8-11
Original file line numberDiff line numberDiff line change
@@ -19,33 +19,30 @@ jobs:
1919

2020
steps:
2121
- name: Checkout Repository
22-
uses: actions/checkout@v4.1.1
22+
uses: actions/checkout@v4.2.2
2323
with:
2424
fetch-depth: 2
2525

2626
- name: Setup pnpm
27-
uses: pnpm/action-setup@v3.0.0
27+
uses: pnpm/action-setup@v4.0.0
2828

2929
- name: Setup Node.js
30-
uses: actions/setup-node@v4.0.2
30+
uses: actions/setup-node@v4.1.0
3131
with:
3232
cache: "pnpm"
33-
node-version: 20.17.0
33+
node-version: 22
3434

3535
- name: Install Dependencies
3636
run: pnpm install --frozen-lockfile
3737

3838
- name: Lint
39-
run: pnpm lint
39+
run: pnpm run lint
4040

4141
- name: Format
42-
run: pnpm format:check
42+
run: pnpm run format:check
4343

4444
- name: Test
45-
run: pnpm test
45+
run: pnpm run test
4646

4747
- name: Build
48-
run: pnpm build
49-
env:
50-
NODE_ENV: production
51-
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
48+
run: pnpm run build

apps/client/src/libs/lingui.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ export async function dynamicActivate(locale: string) {
1717
if (dayjsLocales[locale]) {
1818
dayjs.locale(await dayjsLocales[locale]());
1919
}
20-
} catch (error) {
21-
console.error(error);
20+
} catch {
21+
// eslint-disable-next-line lingui/no-unlocalized-strings
22+
throw new Error(`Failed to load messages for locale: ${locale}`);
2223
}
2324
}

apps/client/src/pages/builder/sidebars/left/dialogs/awards.tsx

+7-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,13 @@ export const AwardsDialog = () => {
104104
{...field}
105105
content={field.value}
106106
footer={(editor) => (
107-
<AiActions value={editor.getText()} onChange={editor.commands.setContent} />
107+
<AiActions
108+
value={editor.getText()}
109+
onChange={(value) => {
110+
editor.commands.setContent(value, true);
111+
field.onChange(value);
112+
}}
113+
/>
108114
)}
109115
onChange={(value) => {
110116
field.onChange(value);

apps/client/src/pages/builder/sidebars/left/dialogs/certifications.tsx

+7-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,13 @@ export const CertificationsDialog = () => {
9898
{...field}
9999
content={field.value}
100100
footer={(editor) => (
101-
<AiActions value={editor.getText()} onChange={editor.commands.setContent} />
101+
<AiActions
102+
value={editor.getText()}
103+
onChange={(value) => {
104+
editor.commands.setContent(value, true);
105+
field.onChange(value);
106+
}}
107+
/>
102108
)}
103109
onChange={(value) => {
104110
field.onChange(value);

apps/client/src/pages/builder/sidebars/left/dialogs/custom-section.tsx

+7-1
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,13 @@ export const CustomSectionDialog = () => {
131131
{...field}
132132
content={field.value}
133133
footer={(editor) => (
134-
<AiActions value={editor.getText()} onChange={editor.commands.setContent} />
134+
<AiActions
135+
value={editor.getText()}
136+
onChange={(value) => {
137+
editor.commands.setContent(value, true);
138+
field.onChange(value);
139+
}}
140+
/>
135141
)}
136142
onChange={(value) => {
137143
field.onChange(value);

apps/client/src/pages/builder/sidebars/left/dialogs/education.tsx

+7-1
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,13 @@ export const EducationDialog = () => {
141141
{...field}
142142
content={field.value}
143143
footer={(editor) => (
144-
<AiActions value={editor.getText()} onChange={editor.commands.setContent} />
144+
<AiActions
145+
value={editor.getText()}
146+
onChange={(value) => {
147+
editor.commands.setContent(value, true);
148+
field.onChange(value);
149+
}}
150+
/>
145151
)}
146152
onChange={(value) => {
147153
field.onChange(value);

apps/client/src/pages/builder/sidebars/left/dialogs/experience.tsx

+7-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,13 @@ export const ExperienceDialog = () => {
117117
{...field}
118118
content={field.value}
119119
footer={(editor) => (
120-
<AiActions value={editor.getText()} onChange={editor.commands.setContent} />
120+
<AiActions
121+
value={editor.getText()}
122+
onChange={(value) => {
123+
editor.commands.setContent(value, true);
124+
field.onChange(value);
125+
}}
126+
/>
121127
)}
122128
onChange={(value) => {
123129
field.onChange(value);

apps/client/src/pages/builder/sidebars/left/dialogs/languages.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,10 @@ export const LanguagesDialog = () => {
7474
}}
7575
/>
7676

77-
{field.value === 0 ? (
78-
<span className="text-base font-bold">{t`Hidden`}</span>
79-
) : (
77+
{field.value > 0 ? (
8078
<span className="text-base font-bold">{field.value}</span>
79+
) : (
80+
<span className="text-base font-bold">{t`Hidden`}</span>
8181
)}
8282
</div>
8383
</FormControl>

apps/client/src/pages/builder/sidebars/left/dialogs/profiles.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export const ProfilesDialog = () => {
5151
<FormLabel>{t`Network`}</FormLabel>
5252
<FormControl>
5353
{/* eslint-disable-next-line lingui/no-unlocalized-strings */}
54-
<Input {...field} placeholder="LinkedIn" />
54+
<Input {...field} placeholder="GitHub" />
5555
</FormControl>
5656
<FormMessage />
5757
</FormItem>
@@ -79,7 +79,7 @@ export const ProfilesDialog = () => {
7979
<FormItem className="sm:col-span-2">
8080
<FormLabel>{t`Website`}</FormLabel>
8181
<FormControl>
82-
<URLInput {...field} placeholder="https://linkedin.com/in/johndoe" />
82+
<URLInput {...field} placeholder="https://github.com/johndoe" />
8383
</FormControl>
8484
<FormMessage />
8585
</FormItem>
@@ -100,7 +100,7 @@ export const ProfilesDialog = () => {
100100
<Input
101101
{...field}
102102
id="iconSlug"
103-
placeholder="linkedin"
103+
placeholder="github"
104104
onChange={(event) => {
105105
field.onChange(event);
106106
handleIconChange(event);

apps/client/src/pages/builder/sidebars/left/dialogs/projects.tsx

+7-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,13 @@ export const ProjectsDialog = () => {
111111
{...field}
112112
content={field.value}
113113
footer={(editor) => (
114-
<AiActions value={editor.getText()} onChange={editor.commands.setContent} />
114+
<AiActions
115+
value={editor.getText()}
116+
onChange={(value) => {
117+
editor.commands.setContent(value, true);
118+
field.onChange(value);
119+
}}
120+
/>
115121
)}
116122
onChange={(value) => {
117123
field.onChange(value);

apps/client/src/pages/builder/sidebars/left/dialogs/publications.tsx

+7-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,13 @@ export const PublicationsDialog = () => {
9898
{...field}
9999
content={field.value}
100100
footer={(editor) => (
101-
<AiActions value={editor.getText()} onChange={editor.commands.setContent} />
101+
<AiActions
102+
value={editor.getText()}
103+
onChange={(value) => {
104+
editor.commands.setContent(value, true);
105+
field.onChange(value);
106+
}}
107+
/>
102108
)}
103109
onChange={(value) => {
104110
field.onChange(value);

apps/client/src/pages/builder/sidebars/left/dialogs/references.tsx

+7-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,13 @@ export const ReferencesDialog = () => {
8484
{...field}
8585
content={field.value}
8686
footer={(editor) => (
87-
<AiActions value={editor.getText()} onChange={editor.commands.setContent} />
87+
<AiActions
88+
value={editor.getText()}
89+
onChange={(value) => {
90+
editor.commands.setContent(value, true);
91+
field.onChange(value);
92+
}}
93+
/>
8894
)}
8995
onChange={(value) => {
9096
field.onChange(value);

apps/client/src/pages/builder/sidebars/left/dialogs/skills.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,10 @@ export const SkillsDialog = () => {
8888
}}
8989
/>
9090

91-
{field.value === 0 ? (
92-
<span className="text-base font-bold">{t`Hidden`}</span>
93-
) : (
91+
{field.value > 0 ? (
9492
<span className="text-base font-bold">{field.value}</span>
93+
) : (
94+
<span className="text-base font-bold">{t`Hidden`}</span>
9595
)}
9696
</div>
9797
</FormControl>

apps/client/src/pages/builder/sidebars/left/dialogs/volunteer.tsx

+7-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,13 @@ export const VolunteerDialog = () => {
112112
{...field}
113113
content={field.value}
114114
footer={(editor) => (
115-
<AiActions value={editor.getText()} onChange={editor.commands.setContent} />
115+
<AiActions
116+
value={editor.getText()}
117+
onChange={(value) => {
118+
editor.commands.setContent(value, true);
119+
field.onChange(value);
120+
}}
121+
/>
116122
)}
117123
onChange={(value) => {
118124
field.onChange(value);

apps/client/src/pages/builder/sidebars/left/sections/custom/section.tsx

+25-9
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { t } from "@lingui/macro";
1+
import { t, Trans } from "@lingui/macro";
22
import { createId } from "@paralleldrive/cuid2";
33
import { DotsSixVertical, Envelope, Plus, X } from "@phosphor-icons/react";
44
import { CustomField as ICustomField } from "@reactive-resume/schema";
@@ -37,10 +37,10 @@ export const CustomField = ({ field, onChange, onRemove }: CustomFieldProps) =>
3737
animate={{ opacity: 1, y: 0 }}
3838
exit={{ opacity: 0, y: -50 }}
3939
>
40-
<div className="flex items-end justify-between space-x-2">
40+
<div className="flex items-end justify-between">
4141
<Button
4242
size="icon"
43-
variant="link"
43+
variant="ghost"
4444
className="shrink-0"
4545
onPointerDown={(event) => {
4646
controls.start(event);
@@ -52,32 +52,48 @@ export const CustomField = ({ field, onChange, onRemove }: CustomFieldProps) =>
5252
<Popover>
5353
<Tooltip content={t`Icon`}>
5454
<PopoverTrigger asChild>
55-
<Button size="icon" variant="ghost">
55+
<Button size="icon" variant="ghost" className="shrink-0">
5656
{field.icon ? <i className={cn(`ph ph-${field.icon}`)} /> : <Envelope />}
5757
</Button>
5858
</PopoverTrigger>
5959
</Tooltip>
60-
<PopoverContent className="p-1.5">
60+
<PopoverContent side="bottom" align="start" className="flex flex-col gap-y-1.5 p-1.5">
6161
<Input
6262
value={field.icon}
6363
placeholder={t`Enter Phosphor Icon`}
6464
onChange={(event) => {
6565
onChange({ ...field, icon: event.target.value });
6666
}}
6767
/>
68+
69+
<p className="text-xs opacity-80">
70+
<Trans>
71+
Visit{" "}
72+
<a
73+
href="https://phosphoricons.com/"
74+
target="_blank"
75+
className="underline"
76+
rel="noopener noreferrer nofollow"
77+
>
78+
Phosphor Icons
79+
</a>{" "}
80+
for a list of available icons
81+
</Trans>
82+
</p>
6883
</PopoverContent>
6984
</Popover>
7085

7186
<Input
87+
className="mx-2"
7288
placeholder={t`Name`}
7389
value={field.name}
74-
className="!ml-0"
7590
onChange={(event) => {
7691
handleChange("name", event.target.value);
7792
}}
7893
/>
7994

8095
<Input
96+
className="mx-2"
8197
placeholder={t`Value`}
8298
value={field.value}
8399
onChange={(event) => {
@@ -87,8 +103,8 @@ export const CustomField = ({ field, onChange, onRemove }: CustomFieldProps) =>
87103

88104
<Button
89105
size="icon"
90-
variant="link"
91-
className="!ml-0 shrink-0"
106+
variant="ghost"
107+
className="shrink-0"
92108
onClick={() => {
93109
onRemove(field.id);
94110
}}
@@ -111,7 +127,7 @@ export const CustomFieldsSection = ({ className }: Props) => {
111127
const onAddCustomField = () => {
112128
setValue("basics.customFields", [
113129
...customFields,
114-
{ id: createId(), icon: "", name: "", value: "" },
130+
{ id: createId(), icon: "envelope", name: "", value: "" },
115131
]);
116132
};
117133

apps/client/src/pages/builder/sidebars/left/sections/shared/section-base.tsx

+3
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,15 @@ export const SectionBase = <T extends SectionItem>({ id, title, description }: P
7070
const onCreate = () => {
7171
open("create", { id });
7272
};
73+
7374
const onUpdate = (item: T) => {
7475
open("update", { id, item });
7576
};
77+
7678
const onDuplicate = (item: T) => {
7779
open("duplicate", { id, item });
7880
};
81+
7982
const onDelete = (item: T) => {
8083
open("delete", { id, item });
8184
};

apps/client/src/pages/builder/sidebars/left/sections/shared/section-dialog.tsx

+6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { t } from "@lingui/macro";
22
import { createId } from "@paralleldrive/cuid2";
33
import { CopySimple, PencilSimple, Plus } from "@phosphor-icons/react";
4+
import { VisuallyHidden } from "@radix-ui/react-visually-hidden";
45
import { SectionItem, SectionWithItem } from "@reactive-resume/schema";
56
import {
67
AlertDialog,
@@ -14,6 +15,7 @@ import {
1415
Button,
1516
Dialog,
1617
DialogContent,
18+
DialogDescription,
1719
DialogFooter,
1820
DialogHeader,
1921
DialogTitle,
@@ -158,6 +160,10 @@ export const SectionDialog = <T extends SectionItem>({
158160
</h2>
159161
</div>
160162
</DialogTitle>
163+
164+
<VisuallyHidden>
165+
<DialogDescription />
166+
</VisuallyHidden>
161167
</DialogHeader>
162168

163169
{children}

0 commit comments

Comments
 (0)