mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-12-02 09:22:15 +00:00
fix(quality): resolve reliability findings on dev
The Sonar quality gate rated new code D. Preserve focus and keyboard interaction through native controls and shared dialog behavior. Replace ambiguous regex scans with bounded parsing and make numeric coercion and initialization explicit.
This commit is contained in:
@@ -22,6 +22,7 @@ import {
|
||||
type LucideIcon,
|
||||
} from 'lucide-react';
|
||||
import { useRef, useState } from 'react';
|
||||
import { focusRevealedEditor } from '../shared/dialogFocus';
|
||||
|
||||
import { useStudioStore } from '../../store/studioStore';
|
||||
import '../../styles/studio-layers.css';
|
||||
@@ -261,6 +262,7 @@ export function StudioLayersPanel({ t }: { t: T }) {
|
||||
ref={list}
|
||||
className={`st-layers ${drag?.active ? 'is-dragging' : ''}`}
|
||||
role="tree"
|
||||
tabIndex={-1}
|
||||
aria-label={t('journey.studio.layers')}
|
||||
onKeyDown={onTreeKey}
|
||||
onPointerMove={onPointerMove}
|
||||
@@ -448,7 +450,7 @@ function RowName(p: {
|
||||
return (
|
||||
<input
|
||||
className="st-input st-layer-input"
|
||||
autoFocus
|
||||
ref={focusRevealedEditor}
|
||||
defaultValue={p.named ? p.label : ''}
|
||||
placeholder={p.label}
|
||||
maxLength={60}
|
||||
|
||||
Reference in New Issue
Block a user