Skip to content

642 Move panel-close focus handling and the map size scale into core - #643

Merged
dannyleech merged 1 commit into
mainfrom
642-core-panel-focus-and-map-scale
Oct 23, 2026
Merged

dannyleech merged 1 commit into
mainfrom
642-core-panel-focus-and-map-scale

Conversation

@dannyleech

Copy link
Copy Markdown
Contributor

Resolves #642

Reduces what plugins import from core, ahead of the packaging work (#592).

Panel focus

  • hidePanel() / APP_HIDE_PANEL now moves focus the same way as closing a panel with its close button: to the element that opened it if it's still on the page, otherwise to the map. If focus was outside the panel, it stays where it is.
  • Panel's close button and hidePanel share the new focusAfterPanelClose util.
  • The datasets plugin no longer moves focus itself (added in 585 layers button no menu #611), and no longer imports getPanelElementId.

Map size scale

  • mapState.mapSizeScale gives the scale for the current map size. MapProvider works it out from mapSize, so it isn't stored separately.
  • interact, draw and core's Markers use it instead of looking up scaleFactor[mapSize].
  • map-styles imports scaleFactor from mapSizeScales.js, so no plugin imports appConfig.js any more.

Also

  • Hides map-styles' decorative size icon from assistive technology (aria-hidden). The button text already names it. This fixes a Sonar warning.
  • Docs: hidePanel now says how it moves focus, and mapState.mapSizeScale is documented.

@sonarqubecloud

Copy link
Copy Markdown

@dannyleech
dannyleech merged commit 7188e61 into main Oct 23, 2026
2 checks passed
@dannyleech
dannyleech deleted the 642-core-panel-focus-and-map-scale branch October 23, 2026 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Move panel-close focus handling and the current map scale into core

2 participants