3liz / qgis-lizmap-server-plugin

QGIS Server plugin for Lizmap
GNU General Public License v2.0
6 stars 6 forks source link

update html tooltip to handle bootstrap 5 tabs #87

Open mind84 opened 5 days ago

mind84 commented 5 days ago

linked to this ticket

mind84 commented 5 days ago

@Gustry

I've tried this on Lizmap master branch and it works (tabs looks exactly like in the popup on the dnd_popup layer in Lizmappopup.qgs project, http://localhost:8130/index.php/view/map?repository=testsrepository&project=popup )

@nboisteault

for now this is not compatible with bootstrap 2, probably old maptip popup should be updated too to support new version of bootstrap.

Gustry commented 2 days ago

Can you please do first the PR on Lizmap plugin ? The test suite about tooltips is the other repository. The file must be exactly similar, it's a strict copy/paste between the two repositories.

Two points to check :

  1. The LWC version must be provided in the HTTP request, and the tooltip code must be adapted accordingly (BS2 versus BS5), let's discuss how we can handle that.

for now this is not compatible with bootstrap 2, probably old maptip popup should be updated too to support new version of bootstrap.

  1. I don't know how we can handle that. If the HTML inside projects will be broken, then it's a kind of breaking change, so LWC 4.0 ?
mind84 commented 8 hours ago

@Gustry, @nboisteault

The LWC version must be provided in the HTTP request

Maybe we can check lizmap_web_client_target_version metadata property? It's reliable? If that so, pass it along the http request to the server shouldn't be tricky but I need information on how to parse it. For example:

lizmap_web_client_target_version = 308000

I guess it means version 3.8.0

If it's lesser than X then render bootstrap 2 else b5...

If the HTML inside projects will be broken, then it's a kind of breaking change, so LWC 4.0 ?

Yes it will be a braking change, I don't know when b5 will be release

Gustry commented 7 hours ago

Maybe we can check lizmap_web_client_target_version metadata property? It's reliable?

No, it's not reliable, because users might have "dozens", "hundreds" of project on their server. We do not expect GIS technicians to update all projects stored on their server when they do an upgrade of Lizmap Web Client.

For instance, LWC 3.8.0 https://github.com/3liz/lizmap-web-client/releases/tag/3.8.0 can read CFG file targeting LWC 3.5, written in the "Requirements" :

QGIS project files targeting at least Lizmap Web Client 3.5.0 to be displayed

lizmap_web_client_target_version = 308000

It's the same as PyQGIS API, all major.minor.patch written with 2 numbers. 30800, which is the same as 030800

Qgis.versionInt()
33411

for QGIS 3.34.11

That's why LWC needs to send it's version in the HTTP header/request I think.

Yes it will be a braking change, I don't know when b5 will be release

I guess you mean LWC with BS5 ? Yes, we will discuss that soon. We just want to release and communicate first with 3.8.1 coming soon.

mind84 commented 7 hours ago

No, it's not reliable...

Ok, it's clear to me.

I guess you mean LWC with BS5 ?

Yes exactly