Skip to content

fix: LEAP-2064: Choices on imported annotations are not displayed in View All on initial load #7488

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 8, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions web/libs/editor/src/stores/Annotation/store.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,23 @@ const AnnotationStoreModel = types
self.selected.selected = false;
}

// When FF_SIMPLE_INIT is enabled, we need to ensure all annotations have their results set given that, due
// to enforcing a better performance, we are not "selecting" all annotations and therefore the right values
// won't be set.
if (isFF(FF_SIMPLE_INIT)) {
self.annotations.forEach(annotation => {
// Skip the current annotation as it's already handled
if (annotation === self.selected) return;

// Set results for each annotation without selecting it
annotation.results.forEach(result => {
if (result.from_name.type === "choices" || result.from_name.type === "taxonomy") {
result.from_name.updateFromResult(result.mainValue);
}
});
});
}

self.annotations.forEach((c) => {
c.editable = false;
});
Expand Down
4 changes: 4 additions & 0 deletions web/libs/editor/src/tags/control/Choice/Choice.scss
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,7 @@ body :global(.ant-checkbox-checked)::after {
:global(.ant-checkbox-wrapper span + span) {
color: var(--color-neutral-content);
}

body :global(.ant-checkbox-disabled .ant-checkbox-inner) {
background-color: var(--color-neutral-background);
}
Loading