radiantearth / stac-browser

A full-fledged UI in Vue for browsing and searching static STAC catalogs and STAC APIs
https://radiantearth.github.io/stac-browser
ISC License
276 stars 138 forks source link

Separate Vue Components #17

Open m-mohr opened 6 years ago

m-mohr commented 6 years ago

For central components such as rendering the information of an Item, Catalog or Collection, it would be nice to de-couple these Vue components so others could include them in their Vue app. For example, I'd like to render STAC in an openEO Vue app and just re-use these functionality without copying code or writing everything again.

m-mohr commented 3 years ago

I found that having standalone Catalog and Item components won't work due to the routing between them. Thus, I'll make a single "StacBrowser" component (either Vue component or Web Component), which hopefully is easier to integrate as it ships with everythong needed.

cisaacstern commented 3 years ago

:wave: @m-mohr, I've just published a draft browser to https://pangeo-forge.org/catalog from pangeo-forge/pangeo-forge-vue-website almost entirely based on your example in stac-utils/stac-index. An installable StacBrowser component would obviously be of great benefit to this project going forward. Is there anything I can do to help with that?

m-mohr commented 3 years ago

Looks great so far!

I'm rewriting STAC Browser right now so that this should be possible in the future to include the Stac Browser Vue component(s) "directly". (Whatever that really means in all those environments... In Vue environments at least it should work.) On the other hand, it will also be much easier to style the Browser in the future, it now has CSS variables for main colors and you can add custom headers etc.

No direct help required with the component/release required right now, but the Zarr implementation needs to be adapted and maybe one of you can help with that? #87

cisaacstern commented 3 years ago

Awesome! I'll follow-up on #87.

Re: licensing/attribution, I wasn't sure what best practice would be. As our Browse.vue is nearly identical to your example for stac-index, would it be best to put https://github.com/radiantearth/stac-browser/blob/master/LICENSE in a comment at the top of that file?

Any omissions I've made on that account are merely oversights; I'm eager to assign credit where credit is due! Could never have gotten this far without your stac-index example 🙏

m-mohr commented 3 years ago

I'm glad that it was helpful. There's no need to give credit to the stac-index example. For practical reasons, it's probably a good idea to link to the original in your source code, but no requirements from my side. And for STAC Browser there's already the "Powered by STAC Browser v2.0.0" in the bottom part of the page.

m-mohr commented 2 years ago

The components are now separated, but I still need to check which ones can be used individually and how it is usable externally with(out) vuex and vue-router.