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

Epic: dhis2 7.0 #919

Open
josephjclark opened this issue Jan 16, 2025 · 6 comments
Open

Epic: dhis2 7.0 #919

josephjclark opened this issue Jan 16, 2025 · 6 comments
Assignees
Labels

Comments

@josephjclark
Copy link
Collaborator

josephjclark commented Jan 16, 2025

Epic issue to track work on the next major dhis2 version

Notes

  • Remove callbacks
  • move attrs to utils? util.attr(attribute, value) is pretty annoying though. Should we have a dhis2 builder API? b.attr()? See also dv - which at the very least should be a util
  • create should not include HTTP semantics
  • create should have fewer examples?
  • destroy is not "a generic helper function". Neither is udpate.
  • findAttributeValue is a util.
  • Remove axios
  • rebase onto common http helpers

So basically it's

  • utils API
  • maybe builder API
  • Maybe introduce a http namespace to help understand the http versus helper APIs
  • remove callbacks

Plus any other outstanding issues.

@github-project-automation github-project-automation bot moved this to New Issues in v2 Jan 16, 2025
@josephjclark
Copy link
Collaborator Author

It might be easier to update axios, rather than removing it entirely. Axios is better now and I'm not sure it's worth the effort of moving away.

I do think we should create a http namespace which uses our common helpers and has a familiar signature. But other operations that currently use axios, maybe it's fine to leave it?

Worth looking closely at the output we get from an updated axios, especially form error. Is it still leaky? Is it still too noisy? We should have really good error handling capability now, we should be able to do a much better job of wrapping errors up cleanly.

@josephjclark
Copy link
Collaborator Author

Looking over some dhis2 code today it behaves quite different to other adaprors.

I think the best argument for removing axios is that it'll force us to really standardise how the adaptor works. Stuff like handleRespone isn't good right now.

I think we should also double down on the http namespace stuff: plug in new http helpers in the http namespace and treat generic http like we do for any other adaptor (ie, reponse object). Then take all HTTP stuff out of the main namespace.

@mtuchi
Copy link
Collaborator

mtuchi commented Jan 30, 2025

I think both attr, findAttributeValue and findAttributeValueById feels like a job code function and not adaptor function. Should keep maintaining them as util or drop support completely ?

@josephjclark
Copy link
Collaborator Author

maintaining as utils sounds good. they've just been validated by GHS. Anything that makes job writing easier is worth keeping

@aleksa-krolls
Copy link
Member

hey @josephjclark on this should we break up the above list into sub-issues? Or is there other spec-ing work to do here?

@josephjclark
Copy link
Collaborator Author

Yeah it probably ought to be broken down, and then we can finish specs in the issues. I'll do that tomorrow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: New Issues
Development

No branches or pull requests

3 participants