The Dashboard shows zeros and empty charts when its data fails to load

Open
#15,048 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
Half a day
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
csharp
Domain
frontend, web-dev

Research direction

Start with the three Dashboard widgets, OverallStatsWidget, ProductsCountPerCategoryWidget and ProductsPercentageWidget, and find where each one calls IDashboardController and where a failed call falls through to the empty-data rendering. Reproduce by making the call fail, for example with the server stopped, and confirm the zeros and empty charts appear. Done means a failed load shows an error state with a retry action in each widget, and no figures or empty charts are drawn in that case.

Written by the indexing model from the issue text.

Description

The Dashboard's widgets (OverallStatsWidget, ProductsCountPerCategoryWidget and ProductsPercentageWidget) each load their data from IDashboardController. When that call fails, because the server can't be reached, the app is offline or the server answers with an error, the error is shown, and then the widget renders as if the call had returned an empty catalog: the four figures read 0 and both charts are drawn empty. Once the error message is gone, the page says there are no categories and no products, which isn't true.

A widget whose data couldn't be loaded should say so in its own place and offer to try again, instead of showing figures it never received.

Dominant language
C#
Stars
1.4k
Forks
264
Avg merge
7h 38m
Merged PRs (30d)
544

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from bitfoundation/bitplatform

All issues in bitfoundation/bitplatform

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.