-
Notifications
You must be signed in to change notification settings - Fork 40
added custom legend schema #2363 #2821
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
added custom legend schema #2363 #2821
Conversation
jolevesq
left a comment
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 1 files at r1, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @ahmedyacinfarah)
jolevesq
left a comment
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 2 of 6 files at r2, all commit messages.
Reviewable status: 3 of 7 files reviewed, 5 unresolved discussions
packages/geoview-custom-legend/src/infosection.tsx line 2 at r2 (raw file):
/* eslint-disable react/function-component-definition */ import React from 'react';
We so not import REact from package, we use the one provided by cgpv
packages/geoview-custom-legend/default-config-custom-legend.json line 5 at r2 (raw file):
"id": "custom-legend", "enabled": true, "footerBar": {
Why is there footer-bar inside the default json. Does respect the schema?
packages/geoview-custom-legend/default-config-custom-legend.json line 12 at r2 (raw file):
"isOpen": true, "version": "1.0"
Trailing white space
packages/geoview-custom-legend/src/custom-legend.tsx line 3 at r2 (raw file):
/* eslint-disable react/no-array-index-key */ /* eslint-disable react/jsx-no-useless-fragment */ import { Key } from 'react';
Use cgpv react, not import. Why are you importing key?
packages/geoview-custom-legend/src/custom-legend.tsx line 22 at r2 (raw file):
// Get layers from the map const layers = api.maps[mapId]?.layer?.layers || [];
Use store to access layers like in time-slider-panel const visibleLayers = useMapVisibleLayers() as string[];
ahmedyacinfarah
left a comment
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: 3 of 7 files reviewed, 5 unresolved discussions (waiting on @jolevesq)
packages/geoview-custom-legend/default-config-custom-legend.json line 5 at r2 (raw file):
Previously, jolevesq (Johann Levesque) wrote…
Why is there footer-bar inside the default json. Does respect the schema?
pour lire les layers
packages/geoview-custom-legend/default-config-custom-legend.json line 12 at r2 (raw file):
Previously, jolevesq (Johann Levesque) wrote…
Trailing white space
Done.
packages/geoview-custom-legend/src/custom-legend.tsx line 3 at r2 (raw file):
Previously, jolevesq (Johann Levesque) wrote…
Use cgpv react, not import. Why are you importing key?
Done.
packages/geoview-custom-legend/src/custom-legend.tsx line 22 at r2 (raw file):
Previously, jolevesq (Johann Levesque) wrote…
Use store to access layers like in time-slider-panel const visibleLayers = useMapVisibleLayers() as string[];
Done.
packages/geoview-custom-legend/src/infosection.tsx line 2 at r2 (raw file):
Previously, jolevesq (Johann Levesque) wrote…
We so not import REact from package, we use the one provided by cgpv
Done.
jolevesq
left a comment
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 6 files at r2, 4 of 4 files at r3, all commit messages.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @ahmedyacinfarah)
packages/geoview-custom-legend/default-config-custom-legend.json line 5 at r2 (raw file):
Previously, ahmedyacinfarah wrote…
pour lire les layers
You should not reference footer in your custom config as user may not have footer in their main config.
packages/geoview-custom-legend/src/custom-legend.tsx line 2 at r3 (raw file):
/* eslint-disable react/no-array-index-key */ /* eslint-disable react/jsx-no-useless-fragment */
Do not create global eslint disable, do it by line when needed
packages/geoview-custom-legend/src/infosection.tsx line 2 at r3 (raw file):
/* eslint-disable react/no-unused-prop-types */ /* eslint-disable react/function-component-definition */
Do not use global, eslint. Use them on line disable when needed
|
Not mergeable, will redo this work within another PR |
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.
Added custom legend schema and built info sec component Date :2025-04-17 11:00 am
https://ahmedyacinfarah.github.io/geoview/demos-navigator.html?config=./configs/navigator/30-package-custom-legend.json
Fixes # (issue)
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.
Add the URL for your deploy!
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