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

Feat(#65): add status chart #89

Merged
merged 4 commits into from
Jul 19, 2024
Merged

Feat(#65): add status chart #89

merged 4 commits into from
Jul 19, 2024

Conversation

mari1912
Copy link
Collaborator

@mari1912 mari1912 commented Jul 10, 2024

Description

  • Add status chart component
  • Add status chart to a card

Related Issues

How to test it

I was having a lot of trouble to connect mui-x-charts with storybook, so I was testing trying to put it in the dashboard. It is possible to test it by replacing the Dashboard HTML for:

<div className="w-full h-full">
      <div className="flex flex-row w-full justify-between">
        <SideMenu />
        <TopBar onChangeInputText={onInputSearchTextChange} />
        <div className='flex flex-col w-full gap-12'>
        <div className="w-full px-16 pt-24 bg-lightGray">
          <TreeListingPage inputFilter={debouncedInput} />
        </div>
        <StatusChartCard title='title test' chart={{
          greenElement:{label: "Success", value: 12, color: "green"},
          redElement: {label: "failed", value: 12, color:"darkRed"},
          yellowElement: {label: "warning", value: 12, color:"yellow"},
          grayElement: {label: "neutral", value: 50, color: "mediumGray"},
          decreaseElement: {label: "Solved", value:18},
          increaseElement: {label: "Regressions", value:51}
        }}/>
        </div>
      </div>
    </div>

Visual reference

image

@mari1912 mari1912 requested a review from lfjnascimento July 10, 2024 20:26
@mari1912 mari1912 self-assigned this Jul 10, 2024
@mari1912 mari1912 force-pushed the feat/add-chart branch 5 times, most recently from d7baa55 to fd28ed0 Compare July 11, 2024 19:47
@mari1912 mari1912 requested a review from lfjnascimento July 11, 2024 19:57
@lfjnascimento
Copy link
Contributor

This PR broke storybook, can you give a look on that?

Comment on lines +183 to +187
// eslint-disable-next-line no-magic-numbers
const yPositionLabel = 9 / 20;
// eslint-disable-next-line no-magic-numbers
const yPositionDescription = 11 / 20;
const xPosition = left + width / 2;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This worries me, do we have a ticket to checkout it out latter?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can create one

@@ -56,12 +72,41 @@ const TreeDetails = (): JSX.Element => {
<CardsGroup
cards={[
{
items: configs ?? [],
title: <FormattedMessage id="treeDetails.buildStatus" />,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would be hard to memoize the cards array?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@mari1912 mari1912 merged commit 0162035 into main Jul 19, 2024
4 checks passed
@mari1912 mari1912 deleted the feat/add-chart branch July 19, 2024 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create Status Chart component
2 participants