feat: requested moderation and tech review changes (#7019)

* feat: requested moderation and tech review changes

* chore: run prepr

* chore: run prepr

---------

Signed-off-by: ThatGravyBoat <gravy@thatgravyboat.tech>
This commit is contained in:
ThatGravyBoat
2026-08-07 13:34:03 -07:00
committed by GitHub
parent b0394de164
commit 5ef999bf8a
10 changed files with 223 additions and 20 deletions
+12
View File
@@ -115,6 +115,18 @@ const keybinds: { [id: string]: KeybindListener } = {
scope: 'checklist',
action: (ctx) => ctx.actions.tryReject(),
},
'tech-review-top': {
keybind: 'ArrowUp',
description: 'Go to top of the tech review card',
scope: 'tech-review',
action: (ctx) => ctx.actions.goToTop(),
},
'tech-review-bottom': {
keybind: 'ArrowDown',
description: 'Go to bottom of the tech review card',
scope: 'tech-review',
action: (ctx) => ctx.actions.goToBottom(),
},
}
export default keybinds
+7
View File
@@ -27,6 +27,13 @@ const settings = {
description: 'Whether private messages should be highlighted in the chat.',
default: true,
}),
SlicerButtonInVersions: setting.asToggle({
type: 'toggle',
id: 'slicer-button-in-versions',
title: 'Show Slicer Button in Versions Table and Page',
description: 'Whether the slicer button should be shown in the versions table and page.',
default: false,
}),
AdjustPageAlignment: setting.asEnum({
type: 'enum',
id: 'adjust-page-alignment',
+22 -3
View File
@@ -16,6 +16,11 @@ export interface ModerationActions {
tryEditMessage: () => void
}
export interface TechReviewActions {
goToTop: () => void
goToBottom: () => void
}
export interface ModerationState {
currentStage: number
totalStages: number
@@ -44,7 +49,15 @@ export type ModerationChecklistContext = {
actions: ModerationActions
}
export type ModerationContext = ModerationProjectContext | ModerationChecklistContext
export type ModerationTechReviewContext = {
scope: 'tech-review'
actions: TechReviewActions
}
export type ModerationContext =
| ModerationProjectContext
| ModerationChecklistContext
| ModerationTechReviewContext
export interface KeybindDefinition {
key: string
@@ -58,7 +71,7 @@ export interface KeybindDefinition {
export type BaseKeybindListener<T> = {
keybind: KeybindDefinition | KeybindDefinition[] | string | string[]
description: string
scope: 'project' | 'checklist'
scope: 'project' | 'checklist' | 'tech-review'
enabled?: (ctx: T) => boolean
action: (ctx: T) => void
}
@@ -69,7 +82,13 @@ export type KeybindProjectListener = BaseKeybindListener<ModerationProjectContex
export type KeybindChecklistListener = BaseKeybindListener<ModerationChecklistContext> & {
scope: 'checklist'
}
export type KeybindListener = KeybindProjectListener | KeybindChecklistListener
export type KeybindTechReviewListener = BaseKeybindListener<ModerationTechReviewContext> & {
scope: 'tech-review'
}
export type KeybindListener =
| KeybindProjectListener
| KeybindChecklistListener
| KeybindTechReviewListener
export function parseKeybind(keybindString: string): KeybindDefinition {
const parts = keybindString.split('+').map((p) => p.trim().toLowerCase())