Skip to content

chore: Stop Extensions from importing FieldDropdown - #10380

Open
mikeharv wants to merge 1 commit into
RaspberryPiFoundation:mainfrom
mikeharv:import-fix
Open

chore: Stop Extensions from importing FieldDropdown#10380
mikeharv wants to merge 1 commit into
RaspberryPiFoundation:mainfrom
mikeharv:import-fix

Conversation

@mikeharv

@mikeharv mikeharv commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

The basics

The details

Proposed Changes

This moves checkDropdownOptionsInTable out of Extensions and into FieldDropdown. Extensions now includes a setter for this checker so that the field can provide its own. field_dropdown.ts now registers the checker once at module initialization time .Subclasses like FieldVariable, FieldGridDropdown, and FieldDependentDropdown should not need updating.
An error is thrown just in case an application somehow uses the extension without ever importing field_dropdown.ts or installing a custom checker.

Reason for Changes

The current dependency chain is problematic. As part of #1276, I expect to need to be able to value import {BlockSvg}. The parent Block imports Extensions, which means there's a potential for circular dependency. Given that this checker is strictly used for dropdown fields, moving it out feels like a reasonable way around this issue.

Test Coverage

Manually confirmed that tooltips are still shown and nothing is thrown. All tests continue to pass.

@github-actions github-actions Bot added the PR: chore General chores (dependencies, typos, etc) label Aug 28, 2026
@mikeharv
mikeharv marked this pull request as ready for review August 28, 2026 16:23
@mikeharv
mikeharv requested a review from a team as a code owner August 28, 2026 16:23
@mikeharv
mikeharv requested a review from maribethb August 28, 2026 16:23
@github-actions github-actions Bot added PR: chore General chores (dependencies, typos, etc) and removed PR: chore General chores (dependencies, typos, etc) labels Aug 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: chore General chores (dependencies, typos, etc)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants