Skip to content
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

#8086 Layout changes and other improvements #8085

Merged
merged 52 commits into from
May 5, 2022

Conversation

alexander-fedorenko
Copy link
Contributor

@alexander-fedorenko alexander-fedorenko commented Apr 13, 2022

Description

  • Annotations moved to the left sidebar & toolbar item is in TOC now;
  • Print plugin updated to support optional print of additional layers; #8086 Layout changes and other improvements #8085 (comment)
  • Sidebar menu plugin. All plugins previously available in BurgerMenu now are available in SidebarMenu.
  • Layout will be automatically updated if sidebar menu plugin is enabled (new position of map toolbar, widgets, dock panels at the right side)
  • Sidebar menu is responsive and automatically adjusts its height according to the available height, it also adjust its height if bottom dock is open (feature editor). Items that won't fit to the height - will be hidden inside of the dropdown available by click on the last item of the bar.
  • Sidebar in contexts will be used only if burger menu is not in the list of enabled plugins. Existing contexts need to be updated manually to exclude burger menu from the list of active plugins. Guideline is available in developer documentation, chapter about migrations.
  • Search bar will automatically switch into togglable mode if there is not enough space to fit search input. Search will not be overlapped by right dock when its open.
  • Updated default size of the square buttons 52px -> 40px (map toolbar, sidebar buttons etc.). Added new variable to preserve original height of card elements (like layers and groups in TOC, or plugins on the step of plugins configuration in context)
  • Other minor css and bug fixes (Map templates list had broken card heights, there was a problem with having two containers for plugin when container definition is a function and not an object as usual etc. Full list can be tracked through the conversation in comments below)

Please check if the PR fulfills these requirements

What kind of change does this PR introduce? (check one with "x", remove the others)

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other... Please describe:

Issue

What is the current behavior?
#8086
#150

What is the new behavior?
As per description

Breaking change

Does this PR introduce a breaking change? (check one with "x", remove the other)

  • Yes, and I documented them in migration notes
  • No

Other useful information

- Moving annotations to the left sidebar (TOC), adding annotation management tools into its toolbar.
…erly styled both for Omnibar and SidebarMenu

Adding abstract element for sidebar menu that could be used as a tool.
Making OmniBar disappear on map viewer page if sidebarMenu was instantiated.
@alexander-fedorenko alexander-fedorenko self-assigned this Apr 13, 2022
@tdipisa tdipisa added Priority: High New Feature used for new functionalities Layout Issue connected to the MS layout C169-Rennes-Métropole-2021-GeOrchestra3 labels Apr 13, 2022
…s it is a container for search plugin

- Updated configuration for right panels: aligned their width (all to 550px), connected them to the layout state so that they track for right/bottom paddings.
- Provided different way to apply paddings for dock panels and for toolbars (omnibar, map toolbar)
- New component to wrap dock panels.
- Style changes
- Burger menu, fix for visibility condition
- Minor fix to the selector to get paddings for docks and toolbars depending on open tools. Definitely not the most beauty way to resolve the issue, but it helps to prevent gazzilions of unneeded re-renders for components when store state changes by ANY action.
- All menu elements are togglable.
- Search bar with new behavior (- media queries, + checks if width fit to the screen)
- Fix for react-container-dimensions & dock components by updating it to the latest version (only used by docks, so it's easy to test/safe to update)
- Slightly changes styles of preview plugin to make it look fine with the sidebar menu.
…e open exclusively in sidebar. All other panels from the list will be deactivated automatically. Configurable/extendible via "miscSettings.excludsiveDockPanels" in localConfig.json
- Deactivate annotations when measure is on and vice versa
- Toggle off any open panel in right sidebar when feature editor is open
- Toggle off Identify panel when any right panel is getting activated.
- Z-index readjustments
@alexander-fedorenko alexander-fedorenko marked this pull request as ready for review April 26, 2022 08:00
@alexander-fedorenko alexander-fedorenko changed the title 150 Layout changes and other improvements #8086 Layout changes and other improvements Apr 26, 2022
- Add cadastrapp to the list of exclusive panels
- Re-checking that sidebar is properly instantiated on its update. Sometimes onInit isn't running on component mount.
- Making user extensions plugin close feature editor
Correction of elements order in omnibar on home page.
@allyoucanmap
Copy link
Contributor

@allyoucanmap now we can, maybe in a second time, use the contaner-monitor to replace container dimension in a dedicated issue.

@alexander-fedorenko @offtherailz yes, we can do that another moment

Copy link
Member

@offtherailz offtherailz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I sent a couple of fixes for documentation and pluginsConfig.json

  • One for the pluginsConfig that used the toolbar dependency, but in fact it doesn't use it. So I changed it to SidebarMenu (otherwise a context with only streetview will not allow to open street view)
  • Another for formatting the doc correctly and document the change above

docs/developer-guide/mapstore-migration-guide.md Outdated Show resolved Hide resolved
web/client/configs/pluginsConfig.json Outdated Show resolved Hide resolved
@alexander-fedorenko
Copy link
Contributor Author

alexander-fedorenko commented May 4, 2022

Tested changes with geOrchestra, went through all the points mentioned in PR reviews, all looks good. The only thing I was not able to test is context creation workflow (unfortunately I have no access, header/login tool is missing locally).

@tdipisa tdipisa merged commit 8d438d9 into geosolutions-it:master May 5, 2022
@tdipisa
Copy link
Member

tdipisa commented May 5, 2022

@ElenaGallo please extensively test this in DEV as soon as deployed.

@ElenaGallo
Copy link
Contributor

Hi @alexander-fedorenko testing I found these problems:

1_ The catalog, export and import buttons are no longer present in the configuration map viewer in the context wizard

1.mov

2_ The Burger Menu is still present in the Inline geostory map configuration option and the catalog is not displayed correctly

2.mov

3_ The 3D navigator is covered by the home sidebar
3

@tdipisa
Copy link
Member

tdipisa commented May 6, 2022

@ElenaGallo

2_ The Burger Menu is still present in the Inline geostory map configuration option and the catalog is not displayed correctly

It is not expected to have the sidebar in the geostore advanced editor

1_ The catalog, export and import buttons are no longer present in the configuration map viewer in the context wizard

Not mandatory to have the sidebar for this- For this we can also use the usual burger menu if adding the sidebar here generates unexpected problems.

@tdipisa
Copy link
Member

tdipisa commented May 6, 2022

@ElenaGallo ok for this of course:

ok, but i think with the panel size change, the catalog no longer displays correctly (the catalog panel cannot be closed).

alexander-fedorenko added a commit to alexander-fedorenko/MapStore2 that referenced this pull request May 9, 2022
…ons-it#8085)

* # 150 Layout changes of the UI

- Moving annotations to the left sidebar (TOC), adding annotation management tools into its toolbar.

* Updated test to be align with the changed position of annotations panel

* Changes for print plugin required to support printing of additional layers.

* Minor customizations for "Home" and "Login" plugins to make them properly styled both for Omnibar and SidebarMenu
Adding abstract element for sidebar menu that could be used as a tool.
Making OmniBar disappear on map viewer page if sidebarMenu was instantiated.

* Update of the rest plugins that were presented in BurgerMenu to appear in SidebarMenu

* rollback, was causing problems when some glyphicons were not rendered

* Corrections of style for legacy burger menu

* - Hide burger menu when SidebarMenu is active, keep OmniBar visible as it is a container for search plugin
- Updated configuration for right panels: aligned their width (all to 550px), connected them to the layout state so that they track for right/bottom paddings.
- Provided different way to apply paddings for dock panels and for toolbars (omnibar, map toolbar)
- New component to wrap dock panels.
- Style changes

* Skip attempt to sum-up dockSize as percentage amount.

* Moved layout-based style from omnibar to search plugin to prevent infinite loop

* Added toggle support for part of the tools;
Style fixes.

* Selector & reducer update

* Sidebar menu with tracking of the window height and hiding elements into dropdown dynamically.

* - Sidebar - keep last active item tracked.
- Burger menu, fix for visibility condition
- Minor fix to the selector to get paddings for docks and toolbars depending on open tools. Definitely not the most beauty way to resolve the issue, but it helps to prevent gazzilions of unneeded re-renders for components when store state changes by ANY action.
- All menu elements are togglable.
- Search bar with new behavior (- media queries, + checks if width fit to the screen)
- Fix for react-container-dimensions & dock components by updating it to the latest version (only used by docks, so it's easy to test/safe to update)
- Slightly changes styles of preview plugin to make it look fine with the sidebar menu.

* Prevent reset of last active item from additional list when user toggles item in the main list

* Support of having plugins list that define dock panel that needs to be open exclusively in sidebar. All other panels from the list will be deactivated automatically. Configurable/extendible via "miscSettings.excludsiveDockPanels" in localConfig.json

* - Updated annotations panels order (since it's moved from right to left)
- Deactivate annotations when measure is on and vice versa
- Toggle off any open panel in right sidebar when feature editor is open
- Toggle off Identify panel when any right panel is getting activated.
- Z-index readjustments

* - Fixes for searchbar when omnibar contains elements;
- Add cadastrapp to the list of exclusive panels
- Re-checking that sidebar is properly instantiated on its update. Sometimes onInit isn't running on component mount.
- Making user extensions plugin close feature editor

* Locale strings for sidebar menu

* Fixes search to be styled consistently with or without sidebar menu.
Correction of elements order in omnibar on home page.

* Fixes search to be styled consistently with or without sidebar menu.

* Amending existing tests to make them work after layout changes;
Minor fixes to the epic to keep old logic for "bottom" offset.

* Basic test coverage for implemented functionality

* Reverting flex styles for omnibar. Using simpler approach for proper searchbar positioning.

* Fix of the bug that prevents prioritized container to be properly selected if more than one container is defined as a function in plugin.

* - Changes in plugin priorities to make them appear in BurgerMenu by default.
- SLight update to the burger menu to make it's possible to track whether it's mounted on the page or not.
- Resolving issue with Home and Login plugins to be rendered in sidebarMenu IF there is no BurgerMenu, otherwise they should be rendered in omnibar;
-

* Reducing button sizes;
Adding shadow to the sidebar;
Replaced save tool icon.

* Making option to print additional layers optional and disabled by default, updating option name.

* Removed monitored state.

* Removed BurgerMenu from desktop plugins.

* Share plugin tests fix.

* Order matters

* 15/30px size for medium-size buttons

* - Separate panel component with support of tracking of container width
- Fix for measure plugin;
- Fix of map grid element height on home page.

* Fix for annotations plugin tests

* Revert of hardcoded toolbar buttons in TOC for annotations. Defining buttons in Annotations plugin instead.

* Correction to make cards size approximately same as it was before button sizes change

* Using common button size in less stylesheet of SidebarMenu;
Migration guide.

* - Tracking of the case when left/right panels are open via state.
- Style fix for mapstore logo, spinner;
- Widgets plugin corrections, removed hardcoded offset, using offset provided by state.
- Amended tests

* Updated migration documentation with changes to the pluginsConfig.json

* - Map export, Save, SaveAs plugins - making them work again by adding doNotHide flag into container configuration.

* DockContainer and ResponsivePanel documentation

* Added card-height variable.
Applied it to the min-height of the sidegrid cards & TOC layers list

* Missed lines

* Missed lines /2

* Use card-height in TOC styles

* Suggested change to the documentation with minor fix

* Update web/client/configs/pluginsConfig.json

Co-authored-by: Lorenzo Natali <[email protected]>

* Properly hide overlay layers printing options by default (it is enabled if opposite is not passed by props)

* Properly hide overlay layers printing options by default (it is enabled if opposite is not passed by props)

* Missing doNotHide for DeleteMap plugin

Co-authored-by: Lorenzo Natali <[email protected]>

(cherry picked from commit 8d438d9)
tdipisa pushed a commit that referenced this pull request May 9, 2022
…ovements (#8085) (#8175)

* #8086 Layout changes and other improvements (#8085)

* # 150 Layout changes of the UI

- Moving annotations to the left sidebar (TOC), adding annotation management tools into its toolbar.

* Updated test to be align with the changed position of annotations panel

* Changes for print plugin required to support printing of additional layers.

* Minor customizations for "Home" and "Login" plugins to make them properly styled both for Omnibar and SidebarMenu
Adding abstract element for sidebar menu that could be used as a tool.
Making OmniBar disappear on map viewer page if sidebarMenu was instantiated.

* Update of the rest plugins that were presented in BurgerMenu to appear in SidebarMenu

* rollback, was causing problems when some glyphicons were not rendered

* Corrections of style for legacy burger menu

* - Hide burger menu when SidebarMenu is active, keep OmniBar visible as it is a container for search plugin
- Updated configuration for right panels: aligned their width (all to 550px), connected them to the layout state so that they track for right/bottom paddings.
- Provided different way to apply paddings for dock panels and for toolbars (omnibar, map toolbar)
- New component to wrap dock panels.
- Style changes

* Skip attempt to sum-up dockSize as percentage amount.

* Moved layout-based style from omnibar to search plugin to prevent infinite loop

* Added toggle support for part of the tools;
Style fixes.

* Selector & reducer update

* Sidebar menu with tracking of the window height and hiding elements into dropdown dynamically.

* - Sidebar - keep last active item tracked.
- Burger menu, fix for visibility condition
- Minor fix to the selector to get paddings for docks and toolbars depending on open tools. Definitely not the most beauty way to resolve the issue, but it helps to prevent gazzilions of unneeded re-renders for components when store state changes by ANY action.
- All menu elements are togglable.
- Search bar with new behavior (- media queries, + checks if width fit to the screen)
- Fix for react-container-dimensions & dock components by updating it to the latest version (only used by docks, so it's easy to test/safe to update)
- Slightly changes styles of preview plugin to make it look fine with the sidebar menu.

* Prevent reset of last active item from additional list when user toggles item in the main list

* Support of having plugins list that define dock panel that needs to be open exclusively in sidebar. All other panels from the list will be deactivated automatically. Configurable/extendible via "miscSettings.excludsiveDockPanels" in localConfig.json

* - Updated annotations panels order (since it's moved from right to left)
- Deactivate annotations when measure is on and vice versa
- Toggle off any open panel in right sidebar when feature editor is open
- Toggle off Identify panel when any right panel is getting activated.
- Z-index readjustments

* - Fixes for searchbar when omnibar contains elements;
- Add cadastrapp to the list of exclusive panels
- Re-checking that sidebar is properly instantiated on its update. Sometimes onInit isn't running on component mount.
- Making user extensions plugin close feature editor

* Locale strings for sidebar menu

* Fixes search to be styled consistently with or without sidebar menu.
Correction of elements order in omnibar on home page.

* Fixes search to be styled consistently with or without sidebar menu.

* Amending existing tests to make them work after layout changes;
Minor fixes to the epic to keep old logic for "bottom" offset.

* Basic test coverage for implemented functionality

* Reverting flex styles for omnibar. Using simpler approach for proper searchbar positioning.

* Fix of the bug that prevents prioritized container to be properly selected if more than one container is defined as a function in plugin.

* - Changes in plugin priorities to make them appear in BurgerMenu by default.
- SLight update to the burger menu to make it's possible to track whether it's mounted on the page or not.
- Resolving issue with Home and Login plugins to be rendered in sidebarMenu IF there is no BurgerMenu, otherwise they should be rendered in omnibar;
-

* Reducing button sizes;
Adding shadow to the sidebar;
Replaced save tool icon.

* Making option to print additional layers optional and disabled by default, updating option name.

* Removed monitored state.

* Removed BurgerMenu from desktop plugins.

* Share plugin tests fix.

* Order matters

* 15/30px size for medium-size buttons

* - Separate panel component with support of tracking of container width
- Fix for measure plugin;
- Fix of map grid element height on home page.

* Fix for annotations plugin tests

* Revert of hardcoded toolbar buttons in TOC for annotations. Defining buttons in Annotations plugin instead.

* Correction to make cards size approximately same as it was before button sizes change

* Using common button size in less stylesheet of SidebarMenu;
Migration guide.

* - Tracking of the case when left/right panels are open via state.
- Style fix for mapstore logo, spinner;
- Widgets plugin corrections, removed hardcoded offset, using offset provided by state.
- Amended tests

* Updated migration documentation with changes to the pluginsConfig.json

* - Map export, Save, SaveAs plugins - making them work again by adding doNotHide flag into container configuration.

* DockContainer and ResponsivePanel documentation

* Added card-height variable.
Applied it to the min-height of the sidegrid cards & TOC layers list

* Missed lines

* Missed lines /2

* Use card-height in TOC styles

* Suggested change to the documentation with minor fix

* Update web/client/configs/pluginsConfig.json

Co-authored-by: Lorenzo Natali <[email protected]>

* Properly hide overlay layers printing options by default (it is enabled if opposite is not passed by props)

* Properly hide overlay layers printing options by default (it is enabled if opposite is not passed by props)

* Missing doNotHide for DeleteMap plugin

Co-authored-by: Lorenzo Natali <[email protected]>

(cherry picked from commit 8d438d9)

* 8086 Bugfixes for layout changes (#8169)

* Context creator - map configuration - use SidebarMenu instead of burger menu.
Properly refresh sidebar menu activity state on map reload

* Class name should be applied to the container as it's important for proper styling of catalog in modal map viewer in geostory

* Custom compass offset on Cesium viewer in case if sidebar is active. Passing sidebar state to the map plugin.

* Get back original containers, applying same priority to the containers and hiding menu item in sidebar if burger menu exists on the page
Rolling back updatableLayersCount selector item.

* Revert "Custom compass offset on Cesium viewer in case if sidebar is active. Passing sidebar state to the map plugin."

This reverts commit 704c205.

* Static position update of compass

* Update of the pluginsFilterOverride to make it works with a custom list of plugins passed by props

(cherry picked from commit 29cbb12)
@offtherailz offtherailz added this to the v2022.02.00 milestone Sep 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C169-Rennes-Métropole-2021-GeOrchestra3 Layout Issue connected to the MS layout New Feature used for new functionalities Priority: High
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants