From d37cb29992f302b11c4c94a1a0064c801c9abca3 Mon Sep 17 00:00:00 2001 From: Raul Martin Date: Tue, 28 Oct 2025 14:59:18 -0700 Subject: [PATCH 01/12] refactor(bem): replace Block with cn() in Choices.jsx Migrated Choices tag component from Block to cn() helper. - Replaced Block import with cn import - Replaced with
- No Elems in this file (simple wrapper for Choice children) - Preserved ref, mods, and Tree.renderChildren call - Added type assertion for ref - No behavior change, equivalent class strings Choices --- web/libs/editor/src/tags/control/Choices.jsx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/web/libs/editor/src/tags/control/Choices.jsx b/web/libs/editor/src/tags/control/Choices.jsx index 321ed80b4a4c..1717cc4e01c8 100644 --- a/web/libs/editor/src/tags/control/Choices.jsx +++ b/web/libs/editor/src/tags/control/Choices.jsx @@ -12,7 +12,7 @@ import Types from "../../core/Types"; import { guidGenerator } from "../../core/Helpers"; import ControlBase from "./Base"; import { AnnotationMixin } from "../../mixins/AnnotationMixin"; -import { Block } from "../../utils/bem"; +import { cn } from "../../utils/bem"; import "./Choices/Choices.scss"; import "./Choice"; @@ -292,13 +292,12 @@ const ChoicesSelectLayout = observer(({ item }) => { const HtxChoices = observer(({ item }) => { return ( - {item.layout === "select" ? : Tree.renderChildren(item, item.annotation)} - +
); }); From 8c1f70a3a4dbdf9fb221f2486e36ae36e46f5a10 Mon Sep 17 00:00:00 2001 From: Raul Martin Date: Tue, 28 Oct 2025 14:59:59 -0700 Subject: [PATCH 02/12] refactor(bem): replace Block with cn() in Labels.jsx Migrated Labels tag component from Block to cn() helper. - Replaced Block import with cn import - Replaced with
- No Elems in this file (simple wrapper for Label children) - Preserved mods and Tree.renderChildren call - No behavior change, equivalent class strings --- web/libs/editor/src/tags/control/Labels/Labels.jsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/web/libs/editor/src/tags/control/Labels/Labels.jsx b/web/libs/editor/src/tags/control/Labels/Labels.jsx index a70c27449145..0c28f2e50c38 100644 --- a/web/libs/editor/src/tags/control/Labels/Labels.jsx +++ b/web/libs/editor/src/tags/control/Labels/Labels.jsx @@ -11,7 +11,7 @@ import { AnnotationMixin } from "../../../mixins/AnnotationMixin"; import DynamicChildrenMixin from "../../../mixins/DynamicChildrenMixin"; import LabelMixin from "../../../mixins/LabelMixin"; import SelectedModelMixin from "../../../mixins/SelectedModel"; -import { Block } from "../../../utils/bem"; +import { cn } from "../../../utils/bem"; import ControlBase from "../Base"; import "../Label"; import "./Labels.scss"; @@ -146,9 +146,9 @@ const LabelsModel = types.compose( const HtxLabels = observer(({ item }) => { return ( - +
{Tree.renderChildren(item, item.annotation)} - +
); }); From 11d3ab8057e3ee374a891498feb70aeb0d054984 Mon Sep 17 00:00:00 2001 From: Raul Martin Date: Tue, 28 Oct 2025 15:00:40 -0700 Subject: [PATCH 03/12] refactor(bem): replace Block/Elem with cn() in Label.jsx Migrated Label component from Block/Elem to cn() helper. - Replaced Block/Elem imports with cn import - Replaced with - Replaced with - Replaced with - Preserved ref, mods, mix, style, onClick, and all props - No behavior change, equivalent class strings label --- .../editor/src/components/Label/Label.jsx | 24 +++++++------------ 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/web/libs/editor/src/components/Label/Label.jsx b/web/libs/editor/src/components/Label/Label.jsx index e4995ffd52b4..115906538bc9 100644 --- a/web/libs/editor/src/components/Label/Label.jsx +++ b/web/libs/editor/src/components/Label/Label.jsx @@ -1,6 +1,6 @@ import chroma from "chroma-js"; import React, { useMemo } from "react"; -import { Block, Elem } from "../../utils/bem"; +import { cn } from "../../utils/bem"; import { asVars } from "../../utils/styles"; import "./Label.scss"; @@ -36,25 +36,19 @@ export const Label = React.forwardRef( }, [color]); return ( - - - {children} - - {hotkey ? ( - - {hotkey} - - ) : null} - + {children} + {hotkey ? {hotkey} : null} + ); }, ); From aad184e48c5a36f7c8be0a9d456f7d5605f6a224 Mon Sep 17 00:00:00 2001 From: Raul Martin Date: Tue, 28 Oct 2025 15:08:19 -0700 Subject: [PATCH 04/12] refactor(bem): replace Block with cn() in Audio/view.tsx Migrated Audio tag component from Block to cn() helper. - Replaced Block import with cn import - Replaced with
- No Elems in this file (simple wrapper for waveform and controls) - No behavior change, equivalent class strings --- web/libs/editor/src/tags/object/Audio/view.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/web/libs/editor/src/tags/object/Audio/view.tsx b/web/libs/editor/src/tags/object/Audio/view.tsx index 4c1357db729a..5205b6ae7746 100644 --- a/web/libs/editor/src/tags/object/Audio/view.tsx +++ b/web/libs/editor/src/tags/object/Audio/view.tsx @@ -11,7 +11,7 @@ import { useWaveform } from "../../../lib/AudioUltra/react"; import type { Region } from "../../../lib/AudioUltra/Regions/Region"; import type { Segment } from "../../../lib/AudioUltra/Regions/Segment"; import type { Regions } from "../../../lib/AudioUltra/Regions/Regions"; -import { Block } from "../../../utils/bem"; +import { cn } from "../../../utils/bem"; import { useSpectrogramControls as useSpectrogramControlsHook } from "../../../lib/AudioUltra/hooks/useSpectrogramControls"; import { getCurrentTheme } from "@humansignal/ui"; import { FF_AUDIO_SPECTROGRAMS, isFF } from "../../../utils/feature-flags"; @@ -182,7 +182,7 @@ const AudioView: FC = observer( }, []); return ( - +
{children}
{ @@ -242,7 +242,7 @@ const AudioView: FC = observer( }} layerVisibility={controls.layerVisibility} /> - +
); }, ); From 81c36a0da81fd03da1507d1fddd6faba5e9ce190 Mon Sep 17 00:00:00 2001 From: Raul Martin Date: Tue, 28 Oct 2025 15:08:56 -0700 Subject: [PATCH 05/12] refactor(bem): replace Block/Elem with cn() in RichText/view.jsx Migrated RichText tag component from Block/Elem to cn() helper. - Removed Block/Elem from imports (cn was already imported) - Replaced with - Replaced with
- Replaced with
- Replaced with