3liz / lizmap-web-client

Transfer a QGIS project on a server, Lizmap is providing the web interface to browse it
https://www.lizmap.com
Mozilla Public License 2.0
254 stars 143 forks source link

Popup children display - Add an option to use the component lizmap-features-table #4667

Open mdouchin opened 1 month ago

mdouchin commented 1 month ago

Is your feature request related to a problem? Please describe

In the context of a relation between a parent layer and a child layer, Lizmap allows at present to configure the parent popup to display the children popup underneath.

Since the recent addition of #4502 we should propose a way to use this component instead. It will look like :

image

Describe the solution you'd like

Either remove the present behaviour, or propose a new checkbox or a radio button to let the editor choose between showing the list of child popups or use the new compact table.

cc @rldhont @nboisteault @Gustry @mind84

mind84 commented 1 month ago

@mdouchin,

I think this is an interesting addition.

  1. this works also when child popup is configured with Drag and Drop?
  2. In case there is multiple child relation, then a list for each child type is displayed?
  3. In many use cases editors choose Drag and Drop design and configure child relation in a separate tab to keep things organized. In present behaviour child are listed beneath the parent layer anyway. This new feature takes into account the child placement in the parent popup?

If this new feature could be improved with points above, I think that this new component could totally replace the actual behaviour. Otherwise IMHO is better to leave to editors the choiche

Thanks!

Gustry commented 1 month ago

@mind84 Do you mean #3756 ?

mind84 commented 1 month ago

@mind84 Do you mean #3756 ?

Not directly, but yes

mdouchin commented 1 month ago

@mdouchin,

I think this is an interesting addition.

Indeed :+1: It's been a while I had this feature in mind. Happy to start shaping it.

1. this works also when child popup is configured with Drag and Drop?

At present, for 3.8, only the web component has been added. It is not yet used in LWC, but can be freely used by "power-users" in the parent popup (QGIS tooltip HTML configuration). I plan to integrate it further more in future 3.9

2. In case there is multiple child relation, then a list for each child type is displayed?

Nothing is done yet, but this will indeed be the desired behaviour when automatically used in child popup(s)

3. In many use cases editors choose Drag and Drop design and configure child relation in a separate tab to keep things organized. In present behaviour child are listed beneath the parent layer anyway. This new feature takes into account the child placement in the parent popup?

Not yet, I have in mind to fully respect the drag & drop designer for :

If this new feature could be improved with points above, I think that this new component could totally replace the actual behaviour. Otherwise IMHO is better to leave to editors the choiche

Fully agree. This is a work in progress and I hope to find time and/or resources to use this web component fully for 3.9

Thanks!

You are welcome, thanks a lot for sharing your thoughts

mind84 commented 1 month ago

@Gustry,

@mind84 Do you mean https://github.com/3liz/lizmap-web-client/issues/3756 ?

Much more https://github.com/3liz/lizmap-web-client/issues/4407

I have a PR ready for this but cannot be tested yet because of this behavior https://github.com/3liz/qgis-lizmap-server-plugin/issues/82