-
Notifications
You must be signed in to change notification settings - Fork 439
Description
Description
Referring to this PR, which introduced a change to the layout of the search services menus.
#11144
Here an example of a map resource that contains a long list of search services with fixed layout: resource 5333
This modified the layout structure by moving the list from a single level to an additional side menu for custom search services only, introducing a new component
<SearchServicesContainer>
We can be kept, but it is necessary to add an optional layout mode defined to a new configuration item for the Search plugin. When enabled, this renders the interface structure as it was previously at a single level (all items one below the other in an expandable panel, possibly with a maximum height that can be scrolled vertically).
Below is a proposal of new optional layout:
The component that must incorporate this logic is found in the component: web/client/components/mapcontrols/search/SearchBar.jsx
The single-level structure must be used if the side menu layout is disabled. A suggested configuration for this feature in the Search plugin could be as follows:
{
"name": "Search",
"cfg": {
"searchOptions": {
"services": [
...//list of custom services
],
"sideMenuSearchServices": true
}
}
}the new setting sideMenuSearchServices default is true to maintain current layout, if is false the services menu appears below in the same level(old behavior before the linked PR)
- adding this new option in jsdoc here
What kind of improvement you want to add? (check one with "x", remove the others)
- Minor changes to existing features
- Code style update (formatting, local variables)
- Refactoring (no functional changes, no api changes)
- Build related changes
- CI related changes
- Other... Please describe:
Other useful information
Additional Notes
-
could be recommend changing the main button label to refer to the currently selected search service (currently, this only occurs in the search input text placeholder), for example: "Search By "
-
An additional possibility could be to move the two items currently scrolling at the bottom of the menu to the top: to allow for the option to expand the list of custom services at the bottom.
- Search By Coordinates
- Search By Bookmark
-
Note that now we have a front-end effect on the list of search custom services, you need to set a list major than just 1 item in
searchOptions.services.