FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix(ChartDonutThreshold): Don't show static threshold donut tooltips by default. by TheRealJon · Pull Request #2270 · patternfly/patternfly-react · GitHub

fix(ChartDonutThreshold): Don't show static threshold donut tooltips by default. - #2270

Merged
tlabaj merged 1 commit into
patternfly:masterfrom
TheRealJon:issue-2258
Jun 17, 2019
Merged

fix(ChartDonutThreshold): Don't show static threshold donut tooltips by default.#2270
tlabaj merged 1 commit into
patternfly:masterfrom
TheRealJon:issue-2258

Conversation

TheRealJon commented Jun 13, 2019
edited
Loading

Copy link
Copy Markdown
Contributor

Pie chart tooltips display the x value of each slice as a tooltip label by default. Because we are
doing calculations to mutate the data, this can lead to array indices being displayed as slice labels. Change defaults so that no slice labels are displayed for the static threshold donut. Also, fix a bug where ChartDonutThreshold accessors were being used to format child ChartDonutUtilization data.

Fixes #2258
Fixes #2259

TheRealJon requested a review from dlabrecq June 13, 2019 21:05
}
]
];
}, [0, []]);

dlabrecq Jun 14, 2019
edited
Loading

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Should we apply something like this to donut utilization as well?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I almost did but thought it was probably outside of the scope of this PR.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

We could probably pull out the utilization/threshold data formatting function into a single util function. The logic is very similar, we just need to handle the difference between a single utilization data point and multiple threshold data points.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Let's keep them separate. The code is complex and not easy to understand what's happening.

Copy link
Copy Markdown
Collaborator

PatternFly-React preview: https://2270-pr-patternfly-react-patternfly.surge.sh

Copy link
Copy Markdown

Codecov Report

Merging #2270 into master will decrease coverage by 0.02%.
The diff coverage is 21.05%.

@@            Coverage Diff             @@
##           master    #2270      +/-   ##
==========================================
- Coverage   79.89%   79.86%   -0.03%     
==========================================
  Files         669      669              
  Lines        8529     8524       -5     
  Branches      734      734              
==========================================
- Hits         6814     6808       -6     
- Misses       1362     1363       +1     
  Partials      353      353
Flag Coverage Δ
#patternfly3 85.23% <ø> (ø) ⬆️
#patternfly4 74.87% <21.05%> (-0.06%) ⬇️
#patternflymisc 95.79% <ø> (ø) ⬆️
Impacted Files Coverage Δ
...ents/ChartDonutUtilization/ChartDonutThreshold.tsx 55.84% <21.05%> (-3.92%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update eb0d436...47de986. Read the comment docs.

codecov-io commented Jun 14, 2019
edited
Loading

Copy link
Copy Markdown

Codecov Report

Merging #2270 into master will increase coverage by 0.04%.
The diff coverage is 33.33%.

@@            Coverage Diff             @@
##           master    #2270      +/-   ##
==========================================
+ Coverage   80.62%   80.66%   +0.04%     
==========================================
  Files         666      666              
  Lines        8427     8415      -12     
  Branches      711      704       -7     
==========================================
- Hits         6794     6788       -6     
+ Misses       1280     1274       -6     
  Partials      353      353
Flag Coverage Δ
#patternfly3 85.23% <ø> (ø) ⬆️
#patternfly4 76.27% <33.33%> (+0.07%) ⬆️
#patternflymisc 95.79% <ø> (ø) ⬆️
Impacted Files Coverage Δ
...ents/ChartDonutUtilization/ChartDonutThreshold.tsx 61.42% <33.33%> (+1.67%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b30caa4...2b9a739. Read the comment docs.

Copy link
Copy Markdown
Collaborator

PatternFly-React preview: https://2270-pr-patternfly-react-patternfly.surge.sh

…by default.

Pie chart tooltips display the x value of each slice as a tooltip label by default. Because we are
doing our own calculations on the data and manually setting the x-value, this can lead to tooltips
displaying array index values. Also, fix a bug where ChartDonutThreshold accessors were being used
for child ChartDonutUtilization data prop.

tlabaj left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM

tlabaj merged commit 7d9bd16 into patternfly:master Jun 17, 2019
TheRealJon deleted the issue-2258 branch June 26, 2019 15:25
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

6 participants


Back | FazBrowse Home | New Git URL