Skip to content

Conversation

@shawncrawley
Copy link
Contributor

@shawncrawley shawncrawley commented Dec 19, 2025

Description

I received feedback from someone trying to learn Component Apps that they were not able to display GeoJSON on their map. Turns out that this was a shortcoming of Comopnent Apps that has now been addressed with this PR. A new Recipe was added to document how this is now done.

Changes Made to Code

  • tethys_components/resources/reactjs_module_wrapper_template.js was updated to more robustly handle events
  • tethys_apps/static/tethys_apps/js/ol-mods.js was added to handle unique GeoJSON cases
  • tethys_components/library.py was updated to included an OVERRIDES variable that can override built-in library components with a custom component. In this case, the lib.ol.source.Vector component is overridden with the custom lib.olmod.VectorSource package that points to "tethys_apps/static/tethys_apps/js/ol-mods.js"

Related PRs, Issues, and Discussions

Additional Notes

Quality Checks

  • At least one new test has been written for new code
  • New code has 100% test coverage
  • Code has been formatted with Black
  • Code has been linted with flake8
  • Docstrings for new methods have been added
  • The documentation has been updated appropriately

@coveralls
Copy link

coveralls commented Dec 19, 2025

Coverage Status

coverage: 100.0%. remained the same
when pulling 1ec0ac6 on reactpy-fixes
into 110efb4 on main.

@shawncrawley
Copy link
Contributor Author

This one should be good to go. Merry Christmas!

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.

3 participants