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: Add event listener trackers to Map and Label #3469

Merged
merged 6 commits into from
Aug 5, 2024

Conversation

RODO94
Copy link
Contributor

@RODO94 RODO94 commented Jul 29, 2024

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.

  • Track Geometry and Area
  • Add light validation
  • Generate a dummy card with Geo data

Copy link

github-actions bot commented Jul 29, 2024

Removed vultr server and associated DNS entries

@RODO94 RODO94 marked this pull request as ready for review August 2, 2024 10:35
@RODO94 RODO94 requested a review from jessicamcinchak August 2, 2024 10:35
@RODO94 RODO94 changed the title feat[wip]: Add event listener trackers to Map and Label feat: Add event listener trackers to Map and Label Aug 2, 2024
Copy link
Member

@jessicamcinchak jessicamcinchak left a 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>([]);
Copy link
Member

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?

Copy link
Contributor Author

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

Copy link
Member

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 🙂

@RODO94 RODO94 force-pushed the rory/map-and-label-events branch from 17dcaa3 to f2ba061 Compare August 5, 2024 08:24
@RODO94 RODO94 merged commit 6cd225a into main Aug 5, 2024
12 checks passed
@RODO94 RODO94 deleted the rory/map-and-label-events branch August 5, 2024 12:10
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