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

Catalog item composition vs Mixins #4705

Open
nf-s opened this issue Sep 3, 2020 · 3 comments
Open

Catalog item composition vs Mixins #4705

nf-s opened this issue Sep 3, 2020 · 3 comments

Comments

@nf-s
Copy link
Contributor

nf-s commented Sep 3, 2020

I raise this in issue #4704

A heap of layers don't support ordering which can quite easily - for example any layers which create GeoJsonCatalogItems.
This opens up a broader issue of composition of different CatalogItems, and having to connect properties (for example show) for things to work properly.

Maybe we should create a GeoJsonMixin (and CsvMixin) so we can just shove them into a CatalogItem without having to worry about forgetting to define all of the properties.
I think this could speed up development time quite a bit and it would make simplify quite a few CatalogItems

I think I remember @steve9164 talking about how we should put as much functionality into Mixins and keep CatalogItems lean - is that right?

@KeyboardSounds
Copy link
Contributor

Yep! This is exactly what Mixins are for. See: https://github.com/TerriaJS/terriajs/blob/next/lib/ModelMixins/Cesium3dTilesMixin.ts

@nf-s
Copy link
Contributor Author

nf-s commented Mar 30, 2021

#5380

@nf-s
Copy link
Contributor Author

nf-s commented Mar 30, 2021

Also, we should consolidate Mixins/Traits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants