Skip to content

Commit b460f16

Browse files
committed
feat(editor2): UI improvements
1 parent b71a8b2 commit b460f16

File tree

5 files changed

+15
-7
lines changed

5 files changed

+15
-7
lines changed

src/components/editor2/DifficultyPicker.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export const DifficultyPicker: FC<DifficultyPickerProps> = ({
6868
}, [isValidLevel, value, onChange])
6969

7070
return (
71-
<div className="flex items-baseline">
71+
<div className="flex gap-2 items-baseline">
7272
<DetailedSelect
7373
disabled={!isValidLevel}
7474
items={DIFFICULTIES}

src/components/editor2/EditorToolbar.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,7 @@ const HistoryButtons = (buttonProps: ButtonProps) => {
289289
<Button
290290
{...buttonProps}
291291
icon="history"
292+
className={clsx('tabular-nums', buttonProps.className)}
292293
title={t.components.editor2.EditorToolbar.undo_history}
293294
text={history.index + 1 + '/' + history.stack.length}
294295
/>
@@ -331,6 +332,7 @@ const ErrorButton = (buttonProps: ButtonProps) => {
331332
>
332333
<Button
333334
{...buttonProps}
335+
className={clsx('tabular-nums', buttonProps.className)}
334336
icon={allErrors.length > 0 ? 'cross-circle' : 'tick-circle'}
335337
intent={allErrors.length > 0 ? 'danger' : 'success'}
336338
title={

src/components/editor2/action/LevelMap.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ export const LevelMap: FC<LevelMapProps> = memo(({ className }) => {
155155
)}
156156
{(mapStatus === 'idle' || mapStatus === 'loading') && (
157157
<NonIdealState
158-
className="absolute inset-0 bg-gray-900/50 [&_*]:!text-white"
158+
className="absolute inset-0"
159159
icon={
160160
mapStatus === 'loading' ? (
161161
<Spinner className="[&_.bp4-spinner-head]:stroke-current" />
@@ -164,9 +164,9 @@ export const LevelMap: FC<LevelMapProps> = memo(({ className }) => {
164164
)
165165
}
166166
description={
167-
mapStatus === 'loading'
168-
? t.common.loading
169-
: t.components.editor2.LevelMap.select_level
167+
mapStatus === 'idle'
168+
? t.components.editor2.LevelMap.select_level
169+
: undefined
170170
}
171171
/>
172172
)}

src/components/editor2/operator/OperatorItem.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ export const OperatorItem: FC<OperatorItemProps> = memo(
289289
small
290290
minimal
291291
className={clsx(
292-
'!px-0 h-full !border-none !text-[.7rem] !leading-3 !font-normal',
292+
'!px-0 h-full !border-none !text-[.7rem] !leading-3 !font-normal !underline underline-offset-2',
293293
skillUsageClasses[
294294
operator.skillUsage ?? CopilotDocV1.SkillUsageType.None
295295
],

src/styles/global.css

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ body,
2929
border-radius: 3px;
3030
}
3131

32-
*:focus {
32+
*:focus:not(:focus-visible) {
3333
outline: none;
3434
}
3535

@@ -69,6 +69,12 @@ body,
6969
0 8px 24px #0003;
7070
}
7171

72+
&.bp4-interactive:active {
73+
box-shadow:
74+
0 0 3px 1px #0001,
75+
0 2px 3px #0001;
76+
}
77+
7278
.dark & {
7379
box-shadow: 0 0px 3px #fff9;
7480
}

0 commit comments

Comments
 (0)