camptocamp / c2cgeoportal

c2cgeoportal application
http://geomapfish.org
Other
64 stars 46 forks source link

Query builder #2651

Closed ybolognini closed 7 years ago

ybolognini commented 7 years ago

Specs here: https://github.com/camptocamp/c2cgeoportal/wiki/Specs---Query-builder---layer-filter

ybolognini commented 7 years ago

@mriedo said: The only problem I see is in this UI is that we absolutely need an info-link in the layertree to say the layer can be filtered. I would simply add a filter button in the layertree for the layers that can be filtered and queried. When we click this filter button, then we go on the right panel to set the filters-queries for this layer as you proposed.

Yes, I think we can include this extra button in the layertree. We already talked about this with @pgiraud .

@svavoi said: I'm not sure if I understand the “directed choice of parameters” correctly. Does it mean that the attributes that are shown as default when clicking on one layer in the filter tree and can be configured by the integrator?

The "directed choice of parameters" are attributes chosen by the integrator. It simplifies the user task, though all criteria can also be built using the advanced parameters. For instance, if a table has many columns, the integrator may choose 4-5 of them that are the most interesting ones for querying the layer. If nothing is configured, then the tool will look like old query builder.

@svavoi said: All parameters are merged using an "and" operator, like now in query builder. à In the current plugin the user can choose from AND, OR, NOR operator. We would like to keep this functionality.

We should be able to add this. I'll check with @pgiraud where and how to add it.

@svavoi said: What is the difference between the dropdown that are shown on these two mockups? Is one for integer and one for text values? For a date fields I would prefer a datepicker to an input field. Is this possible? unnamed unnamed

First dropdown is a simplified criteria (in the "directed choice of parameters") and second one is a classic critera (like in old query builder). Yes, a date picker can be included.

@svavoi said: With the current plugin we have difficulties to query content that includes brackets in the name like “Abies alba (Weiss-Tanne)” because the plugin interprets the content as regex. We don’t need this regex functionality. Is someone using it at the moment? Can this be changed for the new plugin?

Feedback from others?

@svavoi said: What is the difference for the user if the plugin is used with WMS or WFS? What are the advantages from one to the other?

WMS filters will send parameteres to the server to get a filtered map (for instance, display only points that are matching a criteria). WFS filters will be used to get results from the server, display them highlighted and maybe in a grid, like the old query builder.

vvmalbre commented 7 years ago
ybolognini commented 7 years ago

Hello @rbovard @gnerred @svarim @vvmalbre @mriedo @gsollberger @svavoi @cedricmoullet @kalbermattenm

I just updated the specs page with the offer's description. It is now time to get into more details. I'll start by answering @vvmalbre 's questions.

@vvmalbre Just to be sure: I guess it is possible to define which user can filter which layers, is it?

In our solution, a layer is filterable or not filterable. If it is filterable and a user has access to it, then the user will be able to filter the layer. Is this OK for everyone?

@vvmalbre Sometimes a user has the rights to filter several layers from different themes --> is it then possible to group the layers by theme in the filter?

This feature was not available in the existing query builder. This could be added in the new one but it wasn't included in our offer.

@vvmalbre You write “The state of the filter tab is kept when tab is closed and then re-opened”. It’s important that a user can recognize if there is a filter set on a layer or not.

In the offer, we explain that when the tab is closed, the filter (in this case a WMS filter) is removed. Another possibility would be to keep the filter active when the tab is closed. But then we would need to add some mention in the layertree to show that the layer is filtered and also a button in the Filters tab to remove the filter manually. We would have to think about it with @pgiraud . Also, what do others think about these two solutions?

@vvmalbre Saved filters: Another issue that has to be handled specially in a multiserver-environment. Other possibility: save a filter to a file and give the possibility to load a filter file.

We think the best way is to store the user data (short URLs, editing data and also saved filters) in the database. In a multiserver environment, saved filters would be then stored in the database with the rest of user data.

gnerred commented 7 years ago

"If it is filterable and a user has access to it, then the user will be able to filter the layer" -> OK for me

"When the tab is closed, the filter (in this case a WMS filter) is removed" -> OK for me, simpler than the other solution, but I can live with both

ybolognini commented 7 years ago

@rbovard @gnerred @svarim @vvmalbre @mriedo @gsollberger @svavoi @cedricmoullet @kalbermattenm

We added some precisions to the specifications, please review:

As for saved filters, please note that we propose to save the filters in the local storage only (on the client side, like drawings). This would resolve @vvmalbre 's multiserver environment problem.

gnerred commented 7 years ago

Ok for me, thanks for work

kalbermattenm commented 7 years ago

+1 from @mriedo and me

gsollberger commented 7 years ago

OK for me. best regards. Gérard

rbovard commented 7 years ago

+1

Just a question for the spatial relations: is it entirely or partially?

vvmalbre commented 7 years ago

Ok for me, thank you.

svavoi commented 7 years ago

+1 Looks good to me.

ybolognini commented 7 years ago

@rbovard @gnerred @svarim @vvmalbre @mriedo @gsollberger @svavoi @cedricmoullet @kalbermattenm

Some precisions added + a new behavior that was missing:

Actually there are two ways to apply a filter: 1. filter via WMS and refresh the map 2. retrieve data via WFS and make a "query" (like the old query builder). To give the user the chance to use both ways of filtering, we added two buttons. See the specs for a description of these two buttons' actions.

You can use revisions history to see what has changed: https://github.com/camptocamp/c2cgeoportal/wiki/Specs---Query-builder---layer-filter/_compare/5a0655357f04f4194bd79ef3d93a76ba4e3b2905...b4008d2ad6b548c14cd5ebb50def6b7319d0da55?short_path=cdf85e3#diff-cdf85e359b6fbf302e48b58a769dafbd