Giter Site home page Giter Site logo

Comments (6)

sebas-alarconr avatar sebas-alarconr commented on September 23, 2024

Hi, I think I can handle this :)

from covid.

emibcn avatar emibcn commented on September 23, 2024

Hi @sebas-alarconr !
Just assigned the issue to you.

This issue is a bit complicated. If in any doubt (like how to do something or which implementations take within all the possible ones), don't hesitate to comment it here.

from covid.

sebas-alarconr avatar sebas-alarconr commented on September 23, 2024

@emibcn thanks :)

Btw, already created a PR, I think it is covering the initial proposal, but let me know if you imagined it different.

Since I saw some spots where the backend data is being re-generated I provided the data handlers themselves through the Providers.

If you want me to add / modify anything, just let me know.

(I can even add JSDocs if you want)

from covid.

emibcn avatar emibcn commented on September 23, 2024

Great!! This is in the line I was thinking about. This can be further improved here or on next issues/PRs, as you prefer.

Things to improve even more:

  • Stop passing backend indexes from Widget/List to the actual widgets: they'll get them from consumer. Ensure they all do it cleanly (sorry about differences between widgets, this project is growing fast).
  • Include in the HOC a condition to show a <Loading/> instead of wrapped component while index is not loaded (and subscribe to index download, passing it to wrapped component once loaded). Backend/Map uses a static index: might be needed to create an auto-resolved Promise to homogenize interfaces.
  • Include in the HOC the possibility to subscribe to data by props. For example, in Widgets/Bcn/Widget.jsx, we will be able to remove almost all class methods from ChartDataHandler class (hence simplifying new widgets creation and maintenance ). Here, the consumer will need to detect if this.prop.dataset is defined and, if yes, use it to download data and show a <Loading/> while loading that.

Tell me if you prefer to merge what you've already done and create new (sub)issues or do it right here.

About JSDocs

It would be great, even if only this part is done. We'll need to link it to a workflow to update project's wiki (using GitHub API?) or some docs/ directory to automatically update it. Once merged, we can create a new issue for that.

from covid.

emibcn avatar emibcn commented on September 23, 2024

FYI: Done in issue #40 with PR #47 .

Great!! This is in the line I was thinking about. This can be further improved here or on next issues/PRs, as you prefer.

Things to improve even more:

  • Stop passing backend indexes from Widget/List to the actual widgets: they'll get them from consumer. Ensure they all do it cleanly (sorry about differences between widgets, this project is growing fast).
  • Include in the HOC a condition to show a <Loading/> instead of wrapped component while index is not loaded (and subscribe to index download, passing it to wrapped component once loaded). Backend/Map uses a static index: might be needed to create an auto-resolved Promise to homogenize interfaces.
  • Include in the HOC the possibility to subscribe to data by props. For example, in Widgets/Bcn/Widget.jsx, we will be able to remove almost all class methods from ChartDataHandler class (hence simplifying new widgets creation and maintenance ). Here, the consumer will need to detect if this.prop.dataset is defined and, if yes, use it to download data and show a <Loading/> while loading that.

Tell me if you prefer to merge what you've already done and create new (sub)issues or do it right here.

About JSDocs

It would be great, even if only this part is done. We'll need to link it to a workflow to update project's wiki (using GitHub API?) or some docs/ directory to automatically update it. Once merged, we can create a new issue for that.

from covid.

emibcn avatar emibcn commented on September 23, 2024

@sebas-alarconr I think you might like to take a look into the code that tests yours: https://github.com/emibcn/covid/blob/add-tests/app/src/Backend/Base/ContextCreator.test.jsx (not yet merged into master).

Well, you created a context for each backend. I abstracted it into a ContextCreator, which basically does the same, but is meant to be used from each backend handler to create the exported functions/components.

from covid.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.