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
249 stars 141 forks source link

[Bugfix] Treeeview symbols not in scale #4466

Closed rldhont closed 1 month ago

rldhont commented 1 month ago

A class is added to the symbol li if the symbol is out of scope and the category is italic and greyed.

Capture d’écran 2024-05-24 à 10 15 20

Capture d’écran 2024-05-24 à 10 15 32

Funded by EPF Haut De France

Gustry commented 1 month ago

Do you mean for rules which have predefined scales, like this ?

image

rldhont commented 1 month ago

Yes @Gustry , how this is displayed in QGIS treeview ?

Gustry commented 1 month ago

By default, strictly no change...

Peek 2024-05-24 09-57

Only if you toggle this :

image

Then it's very dynamic, but not related to scale range of the symbol, but only related to symbols drawn :

Peek 2024-05-24 10-00

But your idea is good. I would make it italic and/or greyed, similar to layer scale visibility :

image

rldhont commented 1 month ago

Thanks @Gustry .

I have updated the main comment with previews.

rldhont commented 1 month ago

@Gustry ready for review

3liz-bot commented 1 month ago

The backport to release_3_7 failed:

The process '/usr/bin/git' failed with exit code 1
stderr ``` error: could not apply 39eeb7b23... Tests e2e playwright Legend checked symbol in scale hint: After resolving the conflicts, mark them with hint: "git add/rm ", then run hint: "git cherry-pick --continue". hint: You can instead skip this commit with "git cherry-pick --skip". hint: To abort and get back to the state before "git cherry-pick", hint: run "git cherry-pick --abort". hint: Disable this message with "git config advice.mergeConflict false" ```
stdout ``` Auto-merging assets/src/components/Treeview.js Auto-merging lizmap/www/assets/css/map.css [backport-4466-to-release_3_7 b52c207ee] [Bugfix] Treeeview symbols not in scale Author: rldhont Date: Thu May 23 18:27:34 2024 +0200 2 files changed, 21 insertions(+), 4 deletions(-) [backport-4466-to-release_3_7 9b5d58855] Tests e2e playwright Legend form ts to js Author: rldhont Date: Fri May 24 10:52:35 2024 +0200 1 file changed, 1 insertion(+) rename tests/end2end/playwright/{legend.spec.ts => legend.spec.js} (99%) [backport-4466-to-release_3_7 bf36f0be7] Tests e2e playwright Legend format file Author: rldhont Date: Fri May 24 10:53:10 2024 +0200 1 file changed, 1 insertion(+), 1 deletion(-) [backport-4466-to-release_3_7 c9a32267d] Tests e2e playwright Legend using gotoMap Author: rldhont Date: Fri May 24 10:54:48 2024 +0200 1 file changed, 2 insertions(+), 1 deletion(-) Auto-merging tests/qgis-projects/tests/layer_legends.qgs CONFLICT (content): Merge conflict in tests/qgis-projects/tests/layer_legends.qgs Auto-merging tests/qgis-projects/tests/layer_legends.qgs.cfg CONFLICT (content): Merge conflict in tests/qgis-projects/tests/layer_legends.qgs.cfg ```

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-release_3_7 release_3_7
# Navigate to the new working tree
cd .worktrees/backport-release_3_7
# Create a new branch
git switch --create backport-4466-to-release_3_7
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick 14cd2be2e8d45f4aeaf4ed51f53ab9a7eac8efbf,7e4af4442d3dcb8ac5ff1614b80ff83bcfe7d0c5,269e07fdfbff079b9954b1053621cccef765d9fd,4298aaaeaeae07037de988a0c64f5e64905a25af,39eeb7b23cdd3491adab63fdf0b25c5202acce73,9e219c154589721dcddb77271861fc2a9ff9da3b
# Push it to GitHub
git push --set-upstream origin backport-4466-to-release_3_7
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-release_3_7

Then, create a pull request where the base branch is release_3_7 and the compare/head branch is backport-4466-to-release_3_7.