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

Feat/extra info refactor #408

Merged
merged 8 commits into from
Apr 10, 2024
Merged

Conversation

TheGreatRefrigerator
Copy link
Collaborator

This improves the usability of the extra info toggle and makes it working properly with alternative routes.
The state of the extra info visibility is now stored and reused for subsequent and alternative routes.
This works for extra info sub categories as well (e.g. waytype=highway).
If the selected/new route doesn't have that sub category, it falls back to the main extra info category (e.g. from displaying waytype=highway to waytype)

Fixes two small issues:

  • opacity check not working correctly
  • active route index was kept when regenerating the route while using alternative routes

Includes small refactoring.

Copy link

sonarqubecloud bot commented Nov 2, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

No Coverage information No Coverage information
0.0% 0.0% Duplication

Copy link

Quality Gate Passed Quality Gate passed

The SonarCloud Quality Gate passed, but some issues were introduced.

1 New issue
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

simplify method to use array of lat and lng values
instead of objects.
when an alternative route was selected and the routes recalculated,
the UI would keep the activeRouteIndex.
It is now reset to the first route instead which is the normal route.
when using alternative routes, the selected extra information
was lost when switching the active route.

The selected extra is now saved in the store and displayed when
the active route changes.
when switching between alternative routes, the extra info
section is now expanded if some extra info is currently
displayed on the map.
when selecting an alternative route via map or the
button in the route details, the active route would
change but the details would not be expanded.

The panel that should be expanded is now set from the,
activeRouteIndex in the store.

- avoid collapsing again for button in the route details
Copy link

Quality Gate Passed Quality Gate passed

Issues
1 New issue
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@TheGreatRefrigerator TheGreatRefrigerator merged commit f4dd928 into main Apr 10, 2024
5 checks passed
@TheGreatRefrigerator TheGreatRefrigerator deleted the feat/extra-info-refactor branch April 10, 2024 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants