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

Rename the layers to layerToggles #297

Merged
merged 2 commits into from
Jul 31, 2023
Merged

Rename the layers to layerToggles #297

merged 2 commits into from
Jul 31, 2023

Conversation

Pete-Y-CS
Copy link
Contributor

No description provided.

@dabreegster
Copy link
Contributor

Hmm... "Hospital Layer Toggle" makes it sound like the component is just a toggle control, but it defines the layer itself. The checkbox and toggling visibility behavior is just part of it -- setting up the maplibre source and layer styles and the help button are just as important.

I'd agree OptionalLayer is a poor name at this point. It's more accurately PolygonAmenityLayer, a convenience for schools and hospitals and other similar layers to come. MRN and the PC boundary one need different things, so they don't use it.

@Pete-Y-CS
Copy link
Contributor Author

Well the components are the toggles, right? The fact that they have the logic to display the layer is secondary when you're using them in a page? To me it almost suggests that these should be called LayerToggle still, but call out to some ts which actually draws the layer?

@Pete-Y-CS
Copy link
Contributor Author

I guess the thinking behind this: the name is for a Svelte component so it should describe its function in a page and what it actually renders.

@dabreegster
Copy link
Contributor

the name is for a Svelte component so it should describe its function in a page and what it actually renders.

This makes sense to me. The function on the page includes the small colored box as legend, the toggle, and the help/more info button. So what if we name these "xyz LayerControl.svelte"? And OptionalLayer -> PolygonAmenityLayerControl?

@Pete-Y-CS
Copy link
Contributor Author

Sounds perfect

@Pete-Y-CS Pete-Y-CS merged commit 9004889 into main Jul 31, 2023
2 checks passed
@Pete-Y-CS Pete-Y-CS deleted the browse-page-renames branch July 31, 2023 11:18
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