Coder Social home page Coder Social logo

mattburnett-repo / carbon-interface Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 862 KB

React application that provides a front end for the Carbon Interface Estimates API. https://www.carboninterface.com/

Home Page: https://carbon-interface.vercel.app

HTML 0.38% TypeScript 68.28% JavaScript 29.88% SCSS 0.71% CSS 0.75%
carbon-emissions carbon-footprint renewable-energy sustainability

carbon-interface's People

Contributors

mattburnett-repo avatar

Watchers

 avatar

carbon-interface's Issues

Resolve duplicate key problem in VehicleModels.jsx.

The API returns duplicate values for vehicle models. Duplicated data is the model year and the model name.

However, each duplicate has a unique id.

Right now there is a hack documented in VehicleModels.jsx. This adds the first five characters of the id to the display option.

This should be resolved in a manner that filters out the duplicates before rendering the Autocomplete component in VehicleModels.jsx

Add tests

Try using Vitest.

As a fallback, go back to Jest / RTL / etc.

Maybe also Cypress or something similar.

Improve responsiveness

  • Collapse sidebar around 800px breakpoint (when the Dashboard cards make a single column).
  • Make sure topbar resizes

Tab-away from app/browser then tab-return to browser causes estimate forms to resubmit, triggering a new network request.

This shouldn't happen. Once a form is submitted, it shouldn't re-submit if the user tabs away from the app/browser and then tabs back into the app/browser.

The code currently passes the form's requestData to useQuery()'s queryKeys array, but this doesn't consistently solve the problem. Sometimes it works, most of the time it doesn't. No idea why.

Not sure why this happens. The assumption is that the queryKeys will cache the query and prevent a re-render / re-fetch of the Estimate component. This does not work consistently.

useMemo() might solve this. Need to figure out if / where / how.

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.