From cc7878b9cc283d69654caa48354f8736959bd7e3 Mon Sep 17 00:00:00 2001 From: hlomzik Date: Mon, 30 Jun 2025 16:34:27 +0100 Subject: [PATCH 1/3] fix: BROS-78: Fix Taxonomy dropdown missing in Preview When you create project and use Taxonomy in a config, it has no dropdown, making preview for taxonomy useless in this dialog. It's good in Labeling Settings thought. The reason for this is z-index for Create Project dialog which is 2000. Making `z-index` bigger for Taxonomy dropdown solves the problem. --- .../editor/src/components/NewTaxonomy/NewTaxonomy.scss | 8 +++++++- .../editor/src/components/NewTaxonomy/NewTaxonomy.tsx | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/web/libs/editor/src/components/NewTaxonomy/NewTaxonomy.scss b/web/libs/editor/src/components/NewTaxonomy/NewTaxonomy.scss index 730ce311ad52..9cbd3a8189a8 100644 --- a/web/libs/editor/src/components/NewTaxonomy/NewTaxonomy.scss +++ b/web/libs/editor/src/components/NewTaxonomy/NewTaxonomy.scss @@ -1,4 +1,10 @@ :global(.htx-taxonomy-item-color) { padding: 4px; border-radius: 2px; -} \ No newline at end of file +} + +// increase specificity to override usual .ant-select-dropdown z-index +:global(.htx-taxonomy-dropdown.ant-select-dropdown) { + // Create Project popup has 2000 + z-index: 3000; +} diff --git a/web/libs/editor/src/components/NewTaxonomy/NewTaxonomy.tsx b/web/libs/editor/src/components/NewTaxonomy/NewTaxonomy.tsx index a1fcd742d807..c6770de2360c 100644 --- a/web/libs/editor/src/components/NewTaxonomy/NewTaxonomy.tsx +++ b/web/libs/editor/src/components/NewTaxonomy/NewTaxonomy.tsx @@ -196,6 +196,7 @@ const NewTaxonomy = ({ placeholder={options.placeholder || "Click to add..."} style={style} className="htx-taxonomy" + popupClassName="htx-taxonomy-dropdown" disabled={!isEditable} /> ); From 0464c10db0822c03087d7b22b11980e5083f8275 Mon Sep 17 00:00:00 2001 From: hlomzik Date: Mon, 30 Jun 2025 16:37:06 +0100 Subject: [PATCH 2/3] fix: BROS-78: Fix "No more annotations" with Taxonomy in Preview If you add Taxonomy to your config in Preview or edit config with Taxonomy in it, most likely you'll see "No more annotations" info block instead of preview. This is happening because of wrong usage of lazy reference in SharedChoiceMixin in `afterCreate()` - it should attach store to a tag when reference is missing, but it fails upon access. Using recommended `tryReference()` makes it safe and fixes the original issue. --- web/libs/editor/src/mixins/SharedChoiceStore/mixin.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/web/libs/editor/src/mixins/SharedChoiceStore/mixin.js b/web/libs/editor/src/mixins/SharedChoiceStore/mixin.js index 226cc006c349..411592936462 100644 --- a/web/libs/editor/src/mixins/SharedChoiceStore/mixin.js +++ b/web/libs/editor/src/mixins/SharedChoiceStore/mixin.js @@ -1,4 +1,4 @@ -import { types } from "mobx-state-tree"; +import { tryReference, types } from "mobx-state-tree"; import Types from "../../core/Types"; import { SharedStoreModel } from "./model"; @@ -30,7 +30,7 @@ const Store = types.optional(types.maybeNull(types.late(() => types.reference(Sh * * It was specifically designed to be used with Repeater tag where the memory issues are the most sound. * - * This mixin provedes a `sharedStore` property to the model which is a reference to the shared store. + * This mixin provides a `sharedStore` property to the model which is a reference to the shared store. * * The concept behind it is that whenever a model is parsing a snapshot, children are subtracted from the * initial snapshot, and put into the newly created SharedStore. @@ -73,7 +73,9 @@ export const SharedStoreMixin = types })) .actions((self) => ({ afterCreate() { - if (!self.store) { + const currentStore = tryReference(() => self.store); + + if (!currentStore) { const store = Stores.get(self.storeId); const annotationStore = Types.getParentOfTypeString(self, "AnnotationStore"); From 149df1535ee6066e39963cc001ce52eadf7c97b4 Mon Sep 17 00:00:00 2001 From: Andrew Date: Mon, 4 Aug 2025 11:39:59 +0100 Subject: [PATCH 3/3] Trigger CI