8000 feat(settings): add a review language selector by redoh · Pull Request #22 · inkspect-code-review/inkspect-ui · GitHub
[go: up one dir, main page]

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ as appropriate. The package's `0.1.0` version is not a claim of a tagged release

## Unreleased

- 2026-11-28 — Choose English or the pull request author’s language in workspace review settings.

- 2026-11-27 — Allow dashboard editions to place actions after the account security settings.
- 2026-11-27 — Keep paginated review history current and preserve repository and selection when opening linked reviews.

Expand Down
16 changes: 16 additions & 0 deletions src/components/automatic-review-settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import styles from "./settings.module.css";
import shared from "./dashboard.module.css";
import { useDashboardEdition } from "./dashboard-edition";
import { useNotifications } from "./notification-toast";
import { SearchableSelect } from "./ui/searchable-select";
import { Switch } from "./ui/switch";

export function AutomaticReviewSettings({ organizationId }: { organizationId: string }) {
Expand Down Expand Up @@ -74,6 +75,21 @@ export function AutomaticReviewSettings({ organizationId }: { organizationId: st
</select>
</div>
</div>
<div className={styles.row}>
<div className={styles.fieldDescription}>
<label htmlFor="review-language">Review language</label>
<p>Match the language of the PR title and description, or always write reviews in English. Unclear PRs use English.</p>
</div>
<div className={styles.field}>
<SearchableSelect id="review-language" label="Review language" value={settings ? settings.review_language ?? "english" : ""}
placeholder={loadFailed ? "Unavailable" : "Loading…"} disabled={!settings?.can_manage || busy}
options={[{ value: "english", label: "English" }, { value: "pull_request", label: "Match pull request language" }]}
searchPlaceholder="Search options…" emptyMessage="No matching options."
=> {
if ((value === "english" || value === "pull_request") && value !== settings?.review_language) void change("review_language", value);
}} />
</div>
</div>
<div className={styles.row}>
<div className={styles.fieldDescription}>
<h3 id="diagram-direction">PR diagram layout</h3>
Expand Down
1 change: 1 addition & 0 deletions src/components/review-settings-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export type ReviewSettings = {
auto_fix: boolean;
ignored_authors: string[];
check_threshold: keyof typeof checkThresholdLabels;
review_language: "english" | "pull_request";
diagram_direction: "TD" | "LR";
can_manage: boolean;
};
Expand Down
Loading
0