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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Stat component #22472

Open
1 task done
oliviertassinari opened this issue Sep 3, 2020 · 3 comments
Open
1 task done

Add Stat component #22472

oliviertassinari opened this issue Sep 3, 2020 · 3 comments
Labels
discussion new feature New feature or request waiting for 馃憤 Waiting for upvotes

Comments

@oliviertassinari
Copy link
Member

oliviertassinari commented Sep 3, 2020

  • I have searched the issues of this repository and believe that this is not a duplicate.

Summary 馃挕

Display one number on a dashboard.

Examples 馃寛

  <Stat>
    <StatLabel>Avg. Open Rate</StatLabel>
    <StatNumber>58.16%</StatNumber>
    <StatHelperText>
      <StatArrow type="increase" />
      5.4%
    </StatHelperText>
  </Stat>

Capture d鈥檈虂cran 2020-09-04 a虁 13 17 45

This is a fictional example, it's not meant to be the final design nor API

Motivation 馃敠

Many developers use Material-UI to build dashboards. For such an item, it's very frequent to have to display stats.

Benchmarks

@oliviertassinari oliviertassinari added new feature New feature or request waiting for 馃憤 Waiting for upvotes labels Sep 3, 2020
@eps1lon
Copy link
Member

eps1lon commented Sep 4, 2020

I don't see this useful in a component library. The domain has a major impact on how this information is relayed and I doubt we'll make meaningful component that covers all these use cases with anything other than a bare component that doesn't actually do anything without proper customization.

Note that your "benchmark" includes a custom <meter> implementation that is a very specific kind of Stat (it's also listed twice). It does not cover your issue which is missing a description anyway. The concept of "statistic" is so generic that I can't imagine an abstract UI for. Last I remember we still follow: No abstraction is better than the wrong abstraction.

As far as I can tell all these components are just styled

<dl>
  <dt>Some stat</dt>
  <dd>The value</dd>
</dl>

This might make sense in Material design but if we go away from Material design to more generic components then this won't be helpful.

@oliviertassinari
Copy link
Member Author

@eps1lon Fair feedback. I'm have a couple of items on Trello that I'm working on bringing to the GitHub issues so we can collect feedback from the community, to get an idea of the traction we can get for each item. This is part of the effort to work on the roadmap.

@eps1lon
Copy link
Member

eps1lon commented Sep 4, 2020

we can collect feedback from the community, to get an idea of the traction we can get for each item. This is part of the effort to work on the roadmap.

The wording of the issue implies nothing of the sorts.[RFC] Stat component with a discussion label seems far more appropriate. Right now people can't vote for a specific feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion new feature New feature or request waiting for 馃憤 Waiting for upvotes
Projects
None yet
Development

No branches or pull requests

2 participants