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-368 : fluid UI rework #773

Closed
wants to merge 21 commits into from
Closed

PB-368 : fluid UI rework #773

wants to merge 21 commits into from

Conversation

pakb
Copy link
Contributor

@pakb pakb commented Apr 9, 2024

Redo the UI from the ground up with the idea that a component shouldn't place itself in the "grid", but simply display what it has to show. Its parent is the one responsible to place it at the correct position.

The map now takes up the space available between the header and the footer (or between the header and the infobox, if the infobox is shown). Meaning it won't be "hidden" under both of these UI component anymore (even though it was fancy with some transparency).
This should greatly improve the experience of "Zoom to extent" on a selected feature, because now the feature will be center in the map viewport in any case.

Test link

Copy link

cypress bot commented Apr 9, 2024

2 failed tests on run #1949 ↗︎

2 137 40 0 Flakiness 0

Details:

Revert "PB-368 : PR Review"
Project: web-mapviewer Commit: c7671fdf29
Status: Failed Duration: 05:46 💡
Started: Apr 29, 2024 12:25 PM Ended: Apr 29, 2024 12:31 PM
Failed  tests/cypress/tests-e2e/drawing.cy.js • 2 failed tests • e2e/electron/mobile

View Output

Test Artifacts
Drawing module tests > Drawing mode/tools > can create line/polygons and edit them Test Replay Screenshots
Drawing module tests > others > can generate and display media links Test Replay Screenshots

Review all test suite changes for PR #773 ↗︎

@pakb pakb force-pushed the feat_PB-368_profile_tray branch from d9a233f to 6950e6c Compare April 10, 2024 17:11
@pakb pakb force-pushed the feat_PB-368_infobox_ui_rework branch 2 times, most recently from bf39481 to 538b89b Compare April 12, 2024 08:54
@pakb pakb changed the base branch from feat_PB-368_profile_tray to develop April 12, 2024 08:55
@pakb pakb force-pushed the feat_PB-368_infobox_ui_rework branch from 538b89b to ff6c407 Compare April 12, 2024 09:52
@pakb pakb force-pushed the feat_PB-368_infobox_ui_rework branch 4 times, most recently from 75e143e to f32fc18 Compare April 24, 2024 13:19
remove the concept of FeatureCombo, as it is now entirely managed by the InfoboxModule component
@pakb pakb force-pushed the feat_PB-368_infobox_ui_rework branch 3 times, most recently from 3d28eda to f4d8f56 Compare April 26, 2024 06:32
pakb added 13 commits April 26, 2024 11:01
So that we do not need to have this overflow box (which is kind of hard to work with when placing things under) but can show the whole disclaimer as a tippy tooltip

Also migrate HeaderWithSearchBar component to Composition API in the process
So that we are then ready to have a map viewport that doesn't take 100% of width and height, and identify will still work properly

ClickInfo was also a class that was just there for data transfert, no method or similar things, so I changed it to a simple JSDoc definition and are now simple JSON objects
instead of the screen size, meaning we can resize the map container and identify will still work
in order to be able to use the new map size composable
no more position absolute made directly in the toolbar components, it will be placed correctly by the OpenLayersMap component
and let it be placed by its parent, instead of doing that itself
Profile is now displayed as a "tray" of the feature list, and the map isn't hidden by the infobox (or footer, or header) anymore. That means that if we do a zoomToExtent while we are looking at features in the infobox, the extent is perfectly placed in the visible viewport of the map
the selection of the correct "border" of the extent wasn't done properly, with a very wide screen the zoom would be too great.
Instead choose to show the side of the extent that takes the most "space" on screen by taking the max calculated resolution.
pakb added 2 commits April 26, 2024 11:02
remove vendor CSS and change what we need in :global blocs (without the position absolute the Cesium viewer was growing like crazy every frame, out of control...)
@pakb pakb force-pushed the feat_PB-368_infobox_ui_rework branch from f3767b6 to 1edf5f2 Compare April 26, 2024 09:02
@pakb pakb marked this pull request as ready for review April 26, 2024 09:10
@pakb
Copy link
Contributor Author

pakb commented Apr 26, 2024

If you aren't into code review, please at least play with the test link and tell me if you find anything weird. 🙏

Copy link
Contributor

@ltshb ltshb left a comment

Choose a reason for hiding this comment

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

Review will be done in #808

@pakb
Copy link
Contributor Author

pakb commented Apr 29, 2024

Diff has been saved as "snapshot" in this PR for further review
#808

Temporarily disabling 3D tests, as some rework of the Cesium component stack is required to make it work properly within the fluid UI (WIP that will be published in a separate PR)
@pakb pakb force-pushed the feat_PB-368_infobox_ui_rework branch from 1edf5f2 to 180add3 Compare April 29, 2024 06:30
tests/cypress/support/commands.js Show resolved Hide resolved
tests/cypress/support/commands.js Show resolved Hide resolved
tests/cypress/support/commands.js Show resolved Hide resolved
Center (by default) the map prior to clicking on coordinate in util function.
@pakb pakb force-pushed the feat_PB-368_infobox_ui_rework branch from 9b9b436 to 1b5ccc7 Compare April 29, 2024 09:05

import { useTippyTooltip } from '@/utils/useTippyTooltip'

const dispatcher = { dispatcher: 'ZoomOutButton.vue' }
Copy link
Contributor

Choose a reason for hiding this comment

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

Should it be ZoomInButton.vue?

Copy link
Contributor

@ltshb ltshb left a comment

Choose a reason for hiding this comment

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

Unfortunately the user experience with having the map only on the available space is not a good idea. The main issue is that when menu/headers/footer/infobox is changing it changes the map viewport and the map is moved which give a bad user experience, having those components on top of the map provide a much better user experience in my opinion.

@pakb pakb closed this May 3, 2024
@pakb
Copy link
Contributor Author

pakb commented May 3, 2024

As discussed, this brings too many issue with map resizing for user experience to solve only one issue with the zoom to extent being sometimes out of the map.

The idea of placing the menu and other things in a more fluid manner might be a good thing for a post-prod work, but we will focus on going live for the time being. (I'll keep the branch around in case I'd like to cherry pick things later)

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.

3 participants