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

PB 1052: Add 3d tooltips for buildings #1226

Open
wants to merge 14 commits into
base: develop
Choose a base branch
from

Conversation

ltkum
Copy link
Contributor

@ltkum ltkum commented Jan 30, 2025

@ltkum ltkum requested a review from pakb January 30, 2025 14:58
Copy link

cypress bot commented Jan 30, 2025

web-mapviewer    Run #4634

Run Properties:  status check passed Passed #4634  •  git commit 22160e2472: PB-1052: stop highlight of buildings when closing tooltip
Project web-mapviewer
Branch Review feat-PB-1052-add-3d-building-tooltips
Run status status check passed Passed #4634
Run duration 04m 20s
Commit git commit 22160e2472: PB-1052: stop highlight of buildings when closing tooltip
Committer Martin Künzi
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 22
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 233
View all changes introduced in this branch ↗︎

@ltkum ltkum force-pushed the feat-PB-1052-add-3d-building-tooltips branch from 5286671 to 62ea13a Compare January 30, 2025 16:09
@ltkum ltkum force-pushed the feat-PB-1052-add-3d-building-tooltips branch 2 times, most recently from 944c71d to f315c85 Compare February 10, 2025 12:25
@ltkum ltkum requested a review from pakb February 10, 2025 13:05
@ltkum ltkum force-pushed the feat-PB-1052-add-3d-building-tooltips branch 3 times, most recently from 1ccdcdb to da706df Compare February 11, 2025 09:28
Copy link
Contributor

@pakb pakb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As said in the previous review's comment : we don't do layer specific layout/translation on the viewer side, that's something that has to be in the data, or it isn't.
Please remove all translation keys that aren't used directly by the viewer's code, and let the German text of buildings go through

@ltkum ltkum requested a review from pakb February 11, 2025 14:09
@ltkum ltkum force-pushed the feat-PB-1052-add-3d-building-tooltips branch from 14490c5 to 76ae789 Compare February 11, 2025 14:15
@ltkum ltkum force-pushed the feat-PB-1052-add-3d-building-tooltips branch from e9fff3b to 041543a Compare February 20, 2025 16:16
ltkum added 12 commits February 20, 2025 17:20
Issue : When we click on a 3d building, we want to see a tooltip containing some of that building information.

Fix : we search the properties of the building  to retrieve what we need.
- Added translation when there is no data in a field
- Added handling when there is no data in a field
- Added on the fly translation for the data in the fields
- Removed some logging
- we no longer recreate the same feature when someone clicks on the same building.
- Added names to the 3d layers
- Added translation for the layer names
- Added a check that allow the layers that are not part of the layer config to still have their name displayed
PB-1052: CSS adaptation

Drawing infoboxes and building infoboxes now have an horizontal layout
- On hover, we now highlight the border of the buildings in blue
- On click, they are now hovered in lime
- upgraded to filter to filter out bridges and cableways
- corrected some translations and translation keys usage
 - Ensured building highlights were made with Cesium only
 - Replaced a deprecated method
 - Simplified the hovering interaction method in 3d
With the modularization of the mapviewer, a big rebase was in order. This commit seeks to make the small changes that were needed after the rebase to ensure everything works correctly
Also ran the linter.
- We now base our colors for the highlighted buildings on colors from the mapviewer.
- Removed refs where there were not needed
- We now highlight all buildings under the mouse when clicking.
- We now give an object to the Geoadming3DLayer constructor and de-structure it, in the same manner as other layers in the code.
- Removed the translations we do not want to do.

ensuring we don't translate something
- We remove the building type from the tooltip as we don't want to display untranslated data to the user
- Some linting
- forcing new rendering upon moving the mouse on or off features, on when clicking
@ltkum ltkum force-pushed the feat-PB-1052-add-3d-building-tooltips branch from 041543a to 466d103 Compare February 20, 2025 16:26
@ltkum ltkum requested a review from pakb February 21, 2025 13:04
- Set the translations for 3d custom tooltips in their own locale json, separated from the rest of the translations
- Added prefixes to know which layers these attributes correspond to, and avoid side effects
- I wonder if anyone will read this
- Parameters to create the tooltips are now in the cesium config, and the functions do not make special cases for individual layers.
- Enforcing re-render when the highlights are supposed to change, removing the impression that the application is frozen.
@ltkum ltkum force-pushed the feat-PB-1052-add-3d-building-tooltips branch from 0538fc5 to 701b3f6 Compare February 21, 2025 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants