Repository navigation
Layout: configurable per-side offsets for floating panels - #577
Open
sandesh-sp wants to merge 4 commits into
Open
sandesh-sp wants to merge 4 commits into
sandesh-sp wants to merge 4 commits into
Conversation
1 of 6 tasks
panelSettings.floatingBottomOffset raises the bottom-left, bottom-center and bottom-right float zones that many pixels above the map's bottom edge, so an admin can keep them clear of the basemap's logo and attribution. It is set in the configure page's Floating Panels section and defaults to 0.
The validator and the UI now read panelSettings.floatingBottomOffset the same way, so numeric strings are accepted and Infinity or other unusable values fall back to 0 instead of reaching the CSS. The bottom zones never sit higher than half the map's height, and the Configure field is capped at 200px.
…time The validator warns above the Configure field's 200px maximum and init clamps to it, so hand-edited configs behave as Configure shows. The PanelSettings type accepts the numeric and 'px' strings the runtime parses.
panelSettings.floatingOffset takes [top, right, bottom, left] pixels and insets the float regions wrapper by them, so every float zone moves with it and the center zones stay centered between the side offsets. Missing entries are 0, each is capped at 200px, and each side is limited to a quarter of the map. The Configure page has one field per side and the validator warns per entry.
sandesh-sp
force-pushed
the
feature/570-float-bottom-offset
branch
from
October 16, 2026 13:26
338b43a to
a24c795
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #570. Replaces #575.
Summary
Floating panels can sit on top of map chrome such as the basemap's logo (bottom-left) and attribution (bottom-right). Instead of measuring that chrome at runtime, this PR lets the admin set how far the floating panels sit in from each edge of the map.
panelSettings.floatingOffset: [top, right, bottom, left]. Each is a number from 0 to 200; an empty field counts as 0.modern.jspasses the array toUserInterfaceModern_.init, which sets--ui-float-offset-{top,right,bottom,left}on the float regions wrapper. The CSS insets the wrapper by those values, so every float zone moves with it and the center zones stay centered between the left and right offsets. Each side is capped at 25% of the map so large offsets on a small viewport still leave the zones room.floatingOffsetisn't an array, has more than 4 entries, or has an entry that is negative, non-numeric or above 200. The runtime treats such entries as 0 or clamps them to 200.MISSION_CONFIG_REFERENCE.mdandPanelSettingsdescribe the field.With no offsets set, existing missions are unchanged.
Test plan
npx vitest run: 3,578 tests pass (adds a float-offset spec and a validator case)