-
Notifications
You must be signed in to change notification settings - Fork 38
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
fix(ui-core): LEgend icon, layerId zoom, guide, minZooom, Geolocator and add a demo for max extent #2766
fix(ui-core): LEgend icon, layerId zoom, guide, minZooom, Geolocator and add a demo for max extent #2766
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 30 of 38 files at r1, 7 of 8 files at r2, all commit messages.
Reviewable status: 37 of 38 files reviewed, 9 unresolved discussions (waiting on @DamonU2 and @MatthewMuehlhauserNRCan)
packages/geoview-core/src/api/config/types/classes/map-feature-config.ts
line 240 at r2 (raw file):
const minZoom = this.map.viewSettings.minZoom!; this.map.viewSettings.minZoom = !Number.isNaN(minZoom) && minZoom >= 0 && minZoom <= 20 ? minZoom : CV_DEFAULT_MAP_FEATURE_CONFIG.map.viewSettings.minZoom;
Should the 2x '20' be in a default constant instead of hardcoded?
packages/geoview-core/src/core/components/geolocator/geolocator.tsx
line 13 at r2 (raw file):
// import { handleEscapeKey } from '@/core/utils/utilities'; import { logger } from '@/core/utils/logger'; import { useGeolocator } from './hooks/use-geolocator';
Change to @/
imports?
packages/geoview-core/src/core/components/geolocator/geolocator.tsx
line 27 at r2 (raw file):
const MIN_SEARCH_LENGTH = 3; const DEBOUNCE_DELAY = 500;git add
Remove 'git add' this likely doesn't build :)
packages/geoview-core/src/core/components/nav-bar/nav-bar.tsx
line 60 at r2 (raw file):
const navBarComponents = useUINavbarComponents(); // State
Minor: Invert comments State and Ref
packages/geoview-core/src/geo/layer/basemap/basemap.ts
line 250 at r2 (raw file):
const resolutions: number[] = []; let minZoom = 0; let maxZoom = 23;
Should those be in a default constant instead of hardcoded?
packages/geoview-core/src/geo/layer/basemap/basemap.ts
line 387 at r2 (raw file):
let defaultResolutions: number[] | undefined; let minZoom = 0; let maxZoom = 23;
Should those be in a default constant instead of hardcoded?
packages/geoview-core/src/core/components/geolocator/hooks/use-geolocator.ts
line 92 at r2 (raw file):
const fetchGeolocations = useCallback( async (searchTerm: string): Promise<void> => {
Missing the explicit 'Promise' to be returned.
Add a return Promise.resolve()
at the end?
packages/geoview-core/src/core/components/geolocator/hooks/use-geolocator.ts
line 153 at r2 (raw file):
// Only listen to change in language to request new value with updated language // eslint-disable-next-line react-hooks/exhaustive-deps
Not sure, but not having getGeolocations
in the dependency array means that when the geolocatorServiceURL
changes, the useEffect will still execute on an 'disconnected' version of getGeolocations
which would call a 'disconnected' service url. Right?
packages/geoview-core/src/geo/map/map-viewer.ts
line 268 at r2 (raw file):
extent: extentProjected || undefined, minZoom: mapViewSettings.minZoom || 0, maxZoom: mapViewSettings.maxZoom || 23,
Should those be in a default constant instead of hardcoded?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 30 of 38 files at r1, 7 of 8 files at r2, 1 of 1 files at r3, all commit messages.
Reviewable status: all files reviewed, 10 unresolved discussions (waiting on @jolevesq and @MatthewMuehlhauserNRCan)
packages/geoview-core/src/ui/icons/index.ts
line 52 at r3 (raw file):
Highlight as HighlightIcon, Home as HomeIcon, HubOutlined as HubOutlinedIcon,
Remove old legend icon
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 37 of 38 files at r1, 5 of 8 files at r2, all commit messages.
Reviewable status: all files reviewed, 9 unresolved discussions (waiting on @Alex-NRCan and @MatthewMuehlhauserNRCan)
packages/geoview-core/src/api/config/types/classes/map-feature-config.ts
line 240 at r2 (raw file):
Previously, Alex-NRCan (Alex) wrote…
Should the 2x '20' be in a default constant instead of hardcoded?
Done
packages/geoview-core/src/core/components/geolocator/geolocator.tsx
line 13 at r2 (raw file):
Previously, Alex-NRCan (Alex) wrote…
Change to
@/
imports?
Done
packages/geoview-core/src/core/components/geolocator/geolocator.tsx
line 27 at r2 (raw file):
Previously, Alex-NRCan (Alex) wrote…
Remove 'git add' this likely doesn't build :)
Done.
packages/geoview-core/src/core/components/geolocator/hooks/use-geolocator.ts
line 92 at r2 (raw file):
Previously, Alex-NRCan (Alex) wrote…
Missing the explicit 'Promise' to be returned.
Add areturn Promise.resolve()
at the end?
Done.
packages/geoview-core/src/core/components/geolocator/hooks/use-geolocator.ts
line 153 at r2 (raw file):
Previously, Alex-NRCan (Alex) wrote…
Not sure, but not having
getGeolocations
in the dependency array means that when thegeolocatorServiceURL
changes, the useEffect will still execute on an 'disconnected' version ofgetGeolocations
which would call a 'disconnected' service url. Right?
Done.
packages/geoview-core/src/core/components/nav-bar/nav-bar.tsx
line 60 at r2 (raw file):
Previously, Alex-NRCan (Alex) wrote…
Minor: Invert comments State and Ref
Done
packages/geoview-core/src/geo/layer/basemap/basemap.ts
line 250 at r2 (raw file):
Previously, Alex-NRCan (Alex) wrote…
Should those be in a default constant instead of hardcoded?
This is part of default basemap creation. I would keep it like this.
packages/geoview-core/src/geo/layer/basemap/basemap.ts
line 387 at r2 (raw file):
Previously, Alex-NRCan (Alex) wrote…
Should those be in a default constant instead of hardcoded?
This is part of default basemap creation. I would keep it like this.
packages/geoview-core/src/geo/map/map-viewer.ts
line 268 at r2 (raw file):
Previously, Alex-NRCan (Alex) wrote…
Should those be in a default constant instead of hardcoded?
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 8 files at r2, 1 of 1 files at r3, 8 of 8 files at r4.
Reviewable status: all files reviewed (commit messages unreviewed), 1 unresolved discussion (waiting on @jolevesq and @MatthewMuehlhauserNRCan)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed (commit messages unreviewed), 1 unresolved discussion (waiting on @DamonU2 and @MatthewMuehlhauserNRCan)
packages/geoview-core/src/ui/icons/index.ts
line 52 at r3 (raw file):
Previously, DamonU2 (Damon Ulmi) wrote…
Remove old legend icon
Done.
1371aac
into
Canadian-Geospatial-Platform:develop
Closes #2606, #2690, #2755, #2695
Description
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
2755
2606
2690
2695
Other
Fixes #2606, #2690, #2755, #2695
Type of change
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce.
Hosted February 26, 1pm
https://jolevesq.github.io/geoview/demos-navigator.html?config=./configs/navigator/04-a-max-extent-override.json
https://jolevesq.github.io/geoview/add-layers.html
https://jolevesq.github.io/geoview/demos-navigator.html?config=./configs/navigator/05-zoom-layer.json
On any maps
Checklist:
I have made corresponding changes to the documentationI have added tests that prove my fix is effective or that my feature worksNew and existing unit tests pass locally with my changesThis change is