-
Notifications
You must be signed in to change notification settings - Fork 2
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: Add event listener trackers to Map and Label #3469
Conversation
Removed vultr server and associated DNS entries |
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.
Overall looking very good and working as expected !
Your PR description mentions "light validation" which I'd expect to see implemented as an <ErrorWrapper>
around the <MapContainer>
with a validation rule (for example, at least one feature must be drawn to "Continue" - see DrawBoundary for existing example of this). Does that sound like the right track or are you thinking about validation differently here?
function MapAndLabelComponent(props: Props) { | ||
const teamSettings = useStore.getState().teamSettings; | ||
const [boundary, setBoundary] = useState<Boundary>(); | ||
const [area, setArea] = useState<number | undefined>(0); | ||
const [objectArray, setObjectArray] = useState<any>([]); |
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.
I'm not sure I understand the purpose of objectArray
here (variable name is quite vague & it's never rendered)? Is boundary sufficient alone?
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.
It's a way for me to track the event listener dispatching events and collecting info into an array. Most likely negated in a PR or two when multiple items get added to the map and we can use the geoJSON features, but helpful for now if I wanted to test adding a list of items to the Public comp... is it too rough to add in the PR? @jessicamcinchak
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.
Thanks for explanation - happy for it to merge here now better understanding it's work-in-progress 🙂
17dcaa3
to
f2ba061
Compare
What does this PR do?
This PR begins to add event listeners and map dispatches to the public component of
MapAndLabel
which can then lay the foundations for Work to Trees and drawing shapes on a map and tracking them with List components.