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

Implement Layer Filter Concept #3785

Closed
simboss opened this issue May 21, 2019 · 1 comment
Closed

Implement Layer Filter Concept #3785

simboss opened this issue May 21, 2019 · 1 comment

Comments

@simboss
Copy link
Member

simboss commented May 21, 2019

This task captures the discussion we have had in the epic about implementing the possibility to implement the concept of Layer Filter.

A Layer Filter acts directly on a layer coming from GeoServer and filter its content upfront. Once a filter is created for a layer:

  • the map content for this layer is automatically filtered
  • if we issue a GetFeatureInfo, the features we get are automatically filtered using this filter
  • if we open the FeatureGrid for this layer, the features we get are automatically filtered using this filter. Any additional filter we define using the Query Builder or the Quick Filters will go in AND with the layer filter.
  • if we create a Widget from this layer, the features we get are automatically filtered using this filter. Any additional filter we define using the Query Builder or the Quick Filters will go in AND with the layer filter.
  • the filter will be persisted along with the other layer options, inside the map object on map save. If we reload the map once it's saved the filter will be reapplied.

A filter icon shall be shown in the TOC right next to the layer title to notify that the layer is filtered. The Filter Icon should be toggable to temporarily disable the filter from anywhere above.

@simboss
Copy link
Member Author

simboss commented May 21, 2019

The way I see the interaction is similar to what I can do with QGIS.

qgis

This is in line with this proposal from @kappu72.
kappu

Some interaction below.

Toolbar for the Query Builder

  • I have 4 icons, Apply (changes)|Save (changes)|Discard (changes)|Reset (filter)
  • Apply is the same we have now. It applies changes to the filter as we do them and updates map content immediately.
  • Save is new. It persists the changes we do. It enables once we Apply a valid filter or we Reset it to empty. This is new in the toolbar, it is like the one in the layer properties box. It creates a point in filter change history where we can go back if we Discard. Whenever a change is made with Apply|Reset only if we Save we can exit the QB with no message.
  • Discard is new. It discards the changes we do and restore the previous saved filter if there is one or an empty filter. It enables everytime we make a change to the filter or we Apply|Reset it and we have a previous filter that was Saved in the QB or when we start with empty (it send us back to empty in this case). It updates map content immediately.
  • Reset is the same we have now. It kills the filter and reset the Filtered Layer to be a normal layer. All its content is shown. It enables once we have saved at least once a valid filter, it makes us start from empty filter all over again. It needs Save to exit the QB if we started without an emtpy filter, otherwise discard is enough. It updates map content immediately.

Creating a new filter

  • I can open the Query Builder (QB) from the layer directly, no need to go to the FG. I select the layer in the TOC, I click on the filter icon in the TOC toolbar (to be added), the QB opens up and the TOC disappears.
  • Once I am in the QB, all icons in the toolbar are disabled. If I click on the upper left exit icon I go back to the TOC, the source layer is selected and nothing happens.

If I stay in the QB, I can start to make a filter.

  • As soon as I make changes the Discard icon is enabled. If I discard now I go back to empty.
  • Once a valid filter is created the Apply icons is enabled. In order to see it applied on the map I need to click on the Apply Icon in the Toolbar; Once I click on the Apply Icon, the map content should be updated accordingly, no FG is shown. If I do a GetFeatureInfo, the filter I am creating is applied to the content I get, the QB is not closed so that I can keep working. Now I can save or discard.
  • Save enables so I can save my work, I click on Save Icon in the QB Toolbar. The filter is persisted but the QB is not closed ( I might want to keep playing). Reset is enabled if I want to clear the filter. I can exit using the upper left arrow but I can keep playing with the filter and make more changes.
  • Once I make more changes, to discard changes and go back to previous filter I saved I can click on Discard Icon in the QB Toolbar. The changes since the last save are discarded, the previous filter is restored, the map content is updated immediately, the QB is not closed (I might want to keep playing). I can exit using the upper left arrow but I can keep playing with the filter and make more changes.
  • Reset enables after the firt time I save a filter (before that, Discard is enough to back to empty); it kills the saved filter if there is any and enables the Save|Discard button to persist this action. Clicking on the Reset Filter clears immediately the filter and the map content goes back immediately to the full content of the layer right away to give users visual feedback. Save is now enabled and so is Discard; If I save then the layer is not filtered anymore, I can exit using the upper left arrow; if I Discard I go back to the previous saved filter and once again I can exit using the upper left arrow.
  • I can close the QB by clicking on the upper left arrow. If any canges were made (transient or through Apply|Reset) but not saved or discarded (i.e. Save|Discard are enabled) we cannot exit and a message should warn the user to ask if he want to save or discard all changes up to the last saved filter or to empty filter if no filter was ever saved.
  • Once we exit if a valid filter was saved a new Icon appers on the side of the layer title, close to the eye to mark that this layer is filtered. If no valid filter was saved (no filter save or a final reset was issued) then the layer is not filtered. The TOC shows the source layer higlighted.

I want to remove a filter

  • I selected the layer in the TOC, I click on the Filter icon in the TOC toolbar(to be added), the QB opens up and the TOC disappears;
  • Reset is enabled (we have a valid filter as a starting point), all the other icons are disabled.
  • I click on the Reset icon in the top Toolbar, Save|Discard are enabled, the QB and the map content goes back to the full content of the layer right away to give users immediate feedback.
  • If I Save then I reset the filter if I Discard I do nothing and go back to previous saved filter. I can exit using the upper left arrow. The TOC comes back with the source layer highlighted that has no more the filter icon and content is not filtered anymore on the map.
  • If I Discard, the previous filter is restored then I can go back to the TOC by clicking on the left arrow in the Top left. The TOC comes back with the source layer highlighted that has still the filter icon and content is filtered on the map

I want to modify a filter

  • I selected the layer in the TOC, I click on the Filter icon in the TOC toolbar(to be added), the QB opens up and the TOC disappears;
  • Reset is enabled (we have a valid filter as a starting point), all the other icons are disabled. This is the main difference with the first scenario (filter creation)

@tdipisa tdipisa added this to the 2019.02.00 milestone May 22, 2019
@tdipisa tdipisa reopened this Jul 12, 2019
@gioscarda gioscarda self-assigned this Jul 16, 2019
@tdipisa tdipisa closed this as completed Jul 22, 2019
mbarto added a commit that referenced this issue Aug 5, 2019
* 3523 manage exponential number coord editor (#3907)

* Fixed exponential problem with input type number for coordiante entry

* 'e' and 'E' chars are disabled for coordinate entry
* both on aeronautical or decimal
* updated doc
* restored onkeyDown prop, and added more tests to check that is called
* removed comment

* Fix #3908 Time sync support for FeatureGrid (#3909)

* Fix for #3845. Restored Identify and other plugins doc (#3921)

* FIx #3785 Implemented Layer Filter (#3898)

* Closes #3785 #3778 #3779 #3788

* Fixed lint error and added layerfilter tests

* Fixes on Lorenzo's review

* Added comments and fixed query tooltip string

* Fixesx after Lorenzo's second review

* Fixess on Lorenzo's last review

* Removed console.log

* Fixed btntooltip

* use protocol-relative URL for CartoDB provider (#3938)

* Fix 3945 zoom to feature for point now zooms correctly (#3946)

* Fix 3945 zoom to feature for point now zooms correctly

* fix max zoom default

* added a todo for max zoom customization

* fix #3915 wrong overflow in feature info settings (#3941)

* Fix Glich of query panels roi styles (#3948)

* Fix Glith of query panels roi styles

* remove onmount double call in feature editor

* Fix 3942 with correct positioning of tutorial for GFI step (#3943)

* Fix 3942 with correct positioning of tutorial for GFI step

* changed implementation

* Fix #3928 widget builder color selector box shows wrong labels (#3937)

* Fix dashboard autoreload (#3951)

* Fix thematic maps color labels (#3952)

* Fixes #3955 filter layer minor issues (#3956)

* Fix fr-FR translation for options menu (#3961)

* Fix #3913 GFI window does not close when opening the catalog (#3913) (#3944)

* Fix #3913 GFI window does not close when opening the catalog (#3913)

fix #3913

* move the epic to their more appropriate file

* Fix #3910 Text annotations - wrong text align in preview (#3954)

fix #3910

* Fix link on quickstart page (#3968)

* Add infoFormat to Identify plugin documentation (#3966)

* Add infoFormat to Identify plugin documentation

* changed documentation message

* Fix 3960 Template editor of feature info settings has slow response on typing (#3965)

* add internal state to feature info editor to reduce on change calls

* add default state in feature info editor component

* Added missing Croatian translations & fix typos (#3959)

* Added missing Croatian translations & fix typos

* Fix typo

* Added missing strings that were not added automatically by devs

* Fix #3957 Avoid showing the MapStore version number (2) in translations (#3971)

fix #3957

* #3950: the whole group containing the annotations layer disappears in 3d mode, also if it contains other layers (#3974)

* #3863: improved Print plugin documentation with info on printing usin… (#3975)

* #3863: improved Print plugin documentation with info on printing using custom scales

* #3863: fixed typo

* Fix #3940 Integrate the tooltip for metadata with missing params (#3973)

* Fix #3940 Integrate the tooltip for metadata with missing params

fix #3940

* sort the templateMetadata in translation

* Fix #3906  the 'back' button does not undo the annotation creation (#3967)

* Fix #3906  the 'back' button does not undo the annotation creation

fix #3906

* improve test coverage

* Fix 3976 Search Plugin improved (#3977)

* Fix 3976 Search Plugin improved
* sort is correct
* maxRsults is configurable and limits the results size
* add test to check results sorting
* Update web/client/epics/search.js
Co-Authored-By: Lorenzo Natali <[email protected]>
* Update web/client/epics/__tests__/search-test.js
Co-Authored-By: Lorenzo Natali <[email protected]>

* #3972: fixed print of vector layers for solid dash stroke (#3978)

* update style of annotation text symbolizer to avoid horizontal scrollbar (#3979)

* #3962: removed old examples (#3986)

* fix #3969 annotation description field is not clickable in safari (#3982)

* #3784 Activate Sync Map by default (#3984)

* Fix #3958 hide layer related buttons when removing a layer from the map (#3980)

* Fix WidgetLegend preview (#3994)

* Fix WidgetLegend preview

* Update web/client/components/widgets/enhancers/legendWidget.js

* Ewsterrenburg vietnamese translations (#3999)

* Add Vietnamese translation

* Removed erroneous comma

* Fixing tests

* removed console.log

* Update featuregrid.js

* Fix 3985 add catalog autosearch (#3988)

* Fix 3895 catalog autosearch

* Fix reducer default, fix epic for autosearch

* test was hard to provide since it is using a thunk
* anyway it has been tested so i removed the test for epic

* added missing default in catalog reducer

* #3989: fixed the broken examples (#4003)

* Fix #3934 Cross layer filter: some wfs requests fails (#3991)

* Fix 3817 map info url (#4000)

* Wip 3817 mapinfo on map loading

* Wip GetFeatureInfo after GetFeature

* wip

* moved queryparam logic in a separate epic

* changed main comp to fetch new epic
* added whitelist
* add error handling for map info from url

* added a generic api for queryparam actions

* added possibility to restrict list of queriable layers to perform GFI
* added possibility to override some request param for specific layers
*

* Added documentation

* fix doc link

* fix german translations

* fix others translations

* Fix documentation and make whitelist configurable

* update doc

* Save filterLayer in layer object (#4010)

* Fix Print tool with vendor param (CQL_FILTER) (#4006)

* Fix 2749 search urls for cross layer filter are compared ignoring "dirty" chars (#4004)

* Fix 2749 search urls for cross layer filter are compared ignoring "dirty" url

* fix test and check for dirty chars

* Fix 4007 hide filter layer when no layers are present in TOC (#4008)

* Fix 4007 hide filter layer whne no layers are present

* even if a group is present with no layers
* Fix tests

* Fixed issues due to sameURL check in #4004 (#4013)

* Fix #3805 User edit password field retain value across users (#4016)

On editing user, the form use to retain password field across editing
session. This commit fix and enable password field reset on close edit
dialog

*  #3929 Cross layer filter cannot be disabled when filled (#3998)

#3929 Cross layer filter cannot be disabled when filled

* refix #2953 to work along #3929

* [docs] Update User Guide (#3995)

* [docs] Update TOC section

* [docs] filtering layers

* [docs] Search tool updates

* [docs] metadata template for CSW services

* [docs] custom tooltip in layer settings

* [docs] updating 'quering objects' section with coordinates editor

* [docs] updating annotations section

* [docs] layer filter persistence

* [docs] crs selector section (#4012)

* #3622: some fixes to involved documentations (#4018)

* Some updates to the CRS selector documentation (#4019)

* #3817 Fixing documentation (#4023)

* #3817 fixing documentation

* Update docs/developer-guide/map-query-parameters.md

Co-Authored-By: mbarto <[email protected]>

* Update docs/developer-guide/map-query-parameters.md

Co-Authored-By: mbarto <[email protected]>

* Update .travis.yml (#4027)

* Remove IN PROGRESS (#4026)

* Close #3025 Add boundary for draggable dialog (#4025)

* Close #3025 Add boundary for draggable dialog

* simplification of dialog boundary solution

* make snapshot dialog draggable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants