-
Notifications
You must be signed in to change notification settings - Fork 439
Fix #11304 Improving timeline layout #11319
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
base: master
Are you sure you want to change the base?
Fix #11304 Improving timeline layout #11319
Conversation
| useEffect(() => { | ||
| if (collapsed) return; | ||
| const widgetsTrayElement = document.querySelector('.widgets-tray'); | ||
| if (widgetsTrayElement) { | ||
| const dims = widgetsTrayElement.getBoundingClientRect(); | ||
| // set the right offset to the left of the widgets tray with some margin to avoid overlap | ||
| setRightOffset(window.innerWidth - dims.left - style.marginRight + 10); | ||
| } | ||
| }, [collapsed, style, expandedWidgetTray]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should not compute inside a side effect the size of plugin inside another plugin. Plugins implementations in general shouldn't know about other plugins.
The style.right position is computed inside the maplayout selector . We should investigate if we can use the logic already implemented inside the maplayout epic that controls the right position based also on side panel state
| marginLeft: 100, | ||
| ...style, | ||
| right: collapsed ? 'auto' : (style.right || 0) | ||
| right: collapsed ? 'auto' : (rightOffset || style.right || 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should use the logic already implemented for the style.right maplayout selctor if possible instead to add a new rightOffset variable
|
@subashtiwari1010 @tdipisa In addition to the previous review I did a local test and noticed the timeline is not resizing correctly after one side panel is open. If we want to cover also this case I think we should review the implemented logic covering all possible cases that the maplyout is introducing, to note also that the widget tray disappear when a side panel is open.
So if we move the widget tray inside the footer we don't need anymore do adjust the width of the timeline
This work could be a starting point to refactor the map footer section and in the future could allow us to place other plugins such as the timeline or the table attribute inside the lower part of the layout removing logic from the maplyout An example
This issue is temporary blocked because this work needs to be addressed in multiple steps starting from the refactor of the MapFooter refactor |



Description
This PR fixes issue #11304. It improves the space between the Baselayer switcher and the Timeline plugin, and fixes the overlapping issue with the Widget tray when the Timeline Plugin is expanded.
Please check if the PR fulfills these requirements
What kind of change does this PR introduce? (check one with "x", remove the others)
Issue
What is the current behavior?
Fix #11304
What is the new behavior?
Breaking change
Does this PR introduce a breaking change? (check one with "x", remove the other)
Other useful information