fix(skill-editor): remove redundant focus ring and suppress row outline

Remove isFocused ring style from TreeNode since focus-visible already
handles keyboard focus indication. Add rowClassName="outline-none" to
suppress the default browser outline on react-arborist row containers.
This commit is contained in:
yyh
2026-02-06 14:31:56 +08:00
parent 4d1d83b509
commit 44fd58853c
2 changed files with 1 additions and 2 deletions

View File

@ -401,6 +401,7 @@ const FileTree = ({ className }: FileTreeProps) => {
overscanCount={5}
openByDefault={false}
initialOpenState={initialOpensObject}
rowClassName="outline-none"
onToggle={handleToggle}
onSelect={handleSelect}
onActivate={handleActivate}

View File

@ -28,7 +28,6 @@ const TreeNode = ({ node, style, dragHandle, treeChildren }: TreeNodeProps) => {
const { t } = useTranslation('workflow')
const isFolder = node.data.node_type === 'folder'
const isSelected = node.isSelected
const isFocused = node.isFocused
const isDirty = useStore(s => s.dirtyContents.has(node.data.id))
const isCut = useStore(s => s.isCutNode(node.data.id))
const contextMenuNodeId = useStore(s => s.contextMenu?.nodeId)
@ -101,7 +100,6 @@ const TreeNode = ({ node, style, dragHandle, treeChildren }: TreeNodeProps) => {
'hover:bg-state-base-hover',
'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-components-input-border-active',
isSelected && 'bg-state-base-active',
isFocused && 'ring-2 ring-inset ring-components-input-border-active',
hasContextMenu && !isSelected && 'bg-state-base-hover',
isDragOver && 'bg-state-accent-hover ring-1 ring-inset ring-state-accent-solid',
isBlinking && 'animate-drag-blink',