-
Notifications
You must be signed in to change notification settings - Fork 0
feat: new geoJSON and zip file export api #85
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make sure to run the docs generation command after updating the types
I suppose this brings up the question of what the overall philosophy is behind this repo. Is it simply just a wrapper for core? Or are we creating custom hooks for the consuming modules? (personal opinion -so not saying it is the right opinion) I think we should be leaning towards customizing the hooks for the usage of the consuming modules. My mentality is that if it is simply a wrapper, creating an entire repo feels like were just doubling the work. To me the advantage of having an entire repo is we can be more granular with the hooks, with the overall goal of simplifying the code for the consuming modules. Im curious what your opinion is? I also think that if the mentality around has been more of just a wrapper, then we probably should keep it that way now for consistency. But perhaps worth having a bigger discussion about this in the future! |
I'm not against doing this in the future, but because of the various unknowns when it comes to usage of the core api via the hooks, I've opted for keeping the implementation as a more direct wrapper for core. Making it more opinionated adds the risk of "mis-anticipating" the desired end-usage, which is something that isn't ideal for a library from a philosophical perspective. RE: "doubling the work" - I think this is a potentially valid concern, but I haven't seen much evidence of this being a notable issue so far. if there's anything that has felt like this, I think it's because we're doing unnecessary work to wrap the exposed hooks instead of using functional approaches. I believe what I've written in digidem/comapeo-mobile#1081 is related to this.
yeah I'd rather keep things consistent right now and stick with this being a flexible wrapper. |
To me, the main benefit of this library is consistent APIs for using core in React and centralized invalidation of data when working with core (which is what React Query specifically provides). I find it preferable to know that what's exposed here maps directly to what core provides. There's one fewer layer to worry about when it comes to understanding how to use core via React. |
out of curiosity, is there a reason we dont automate this, specifically as a post push step? |
mostly just didn't spend the time to figure it out 😄 also, i personally don't like automations that auto-commit code to a branch i work on, so I haven't prioritized looking into it |
Adds
exportGeoJSONFile
andexportZipFile