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

Stats: don't display the date range tabs when the initial dialog is shown #9108

Merged
merged 3 commits into from
Mar 23, 2018

Conversation

eliorivero
Copy link
Contributor

@eliorivero eliorivero commented Mar 21, 2018

This PR hides the date range tabs shown in the Stats in the dasboard when the dialog explaining about the time needed to collect data is shown and it hasn't been yet dismissed.

Fixes #7899

Changes proposed in this Pull Request:

  • when empty Stats dialog hasn't been dismissed, hide the date range tabs

Testing instructions:

  • use a new site and connect
  • verify that you see the dialog "Hello there! Your stats have been activated." and that the date range tabs aren't shown

Proposed changelog entry for your changes:

Hide the date range tabs when the initial dialog is shown

…bout the time needed to collect data is shown
@eliorivero eliorivero requested a review from a team as a code owner March 21, 2018 15:22
@eliorivero eliorivero self-assigned this Mar 21, 2018
@eliorivero eliorivero added [Type] Bug When a feature is broken and / or not performing as intended [Feature] Stats Data Feature that enables users to track their site's traffic and gain insights on popular content. Admin Page React-powered dashboard under the Jetpack menu [Focus] FixTheFlows labels Mar 21, 2018
@dereksmart dereksmart added the [Status] Needs Review This PR is ready for review. label Mar 21, 2018
Copy link
Contributor

@oskosk oskosk left a comment

Choose a reason for hiding this comment

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

Tests great! Awesome fixes on the logical expressions!

@oskosk oskosk added [Status] Ready to Merge Go ahead, you can push that green button! and removed [Status] Needs Review This PR is ready for review. labels Mar 21, 2018
@@ -117,7 +117,7 @@ class DashStats extends Component {
<div className="jp-at-a-glance__stats-chart">
<Chart data={ chartData } barClick={ this.barClick } />
{
0 < chartData.length ? '' : <Spinner />
chartData.length <= 0 && <Spinner />
Copy link
Contributor

Choose a reason for hiding this comment

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

Here .length would probably never be a negative number.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch! Will fix.

@oskosk
Copy link
Contributor

oskosk commented Mar 21, 2018

left a note about a weird comparison. but it's good to be merged after that's tackled.

…here are some views, even if user never dismissed dialog. Made activeTab a prop instead of a function.
@eliorivero eliorivero force-pushed the fix/stats-no-data-no-date-range-tabs branch from 81c464b to 86b992d Compare March 21, 2018 19:06
@dereksmart dereksmart merged commit 10a3711 into master Mar 23, 2018
@dereksmart dereksmart deleted the fix/stats-no-data-no-date-range-tabs branch March 23, 2018 18:51
@ghost ghost removed the [Status] Ready to Merge Go ahead, you can push that green button! label Mar 23, 2018
@oskosk oskosk added this to the 6.0 milestone Mar 26, 2018
oskosk added a commit that referenced this pull request Mar 26, 2018
@dereksmart dereksmart restored the fix/stats-no-data-no-date-range-tabs branch March 27, 2018 16:39
dereksmart pushed a commit that referenced this pull request Mar 27, 2018
* Changelog 6.0: create base for changelog.

* Add #8938 to changelog

* Add #8962 to changelog

* Add #8974 to changelog

* Add #8975 to changelog

* Add #8978 to changelog

* Add #8867 to changelog

* Add #8937 to changelog

* Add #8961 to changelog

* Add #8855 to changelog

* Add #8944 to changelog

* Add #8973 to changelog

* Add #8977 to changelog

* Add #8979 to changelog

* Add #8980 to changelog

* Add #8982 to changelog

* Add #8983 to changelog

* Add #8984 to changelog

* Add #8986 to changelog

* Add #9005 to changelog

* Add #9010 to changelog

* Add #9012 to changelog

* Add #9021 to changelog

* Add #9022 to changelog

* Add #9056 to changelog

* Add #9061 to changelog

* Add #9079 to changelog

* Add #9080 to changelog

* Add #9088 to changelog

* Add #9096 to changelog

* Add #9097 to changelog

* Add #9100 to changelog

* Add #9107 to changelog

* Add #8969 to changelog

* Add #8993 to changelog

* Add #9003 to changelog

* Add #9031 to changelog

* Add #8945 to changelog

* Add #9052 to changelog

* Add #9058 to changelog

* Add #9066 to changelog

* Add #9076 to changelog

* Add #9053 to changelog

* Add #9108 to changelog

* Add #9135 to changelog

* Add #9148 to changelog

* Add #9125 to changelog

* Add #9137 to changelog

* Added testing instructions for 6.0.

* Added IS testing instructions, huge props to @tiagonoronha.

* Added #8498 to changelog.

* Added #8954 to changelog.

* Added #8985 to changelog.

* add #9027

* add #9112 to changelog

* add #9136 to changelog

* add #9102 to changelog

* add #9093 to changelog

* add #9062 to changelog

* add #9172 to changelog
@dereksmart dereksmart deleted the fix/stats-no-data-no-date-range-tabs branch May 8, 2018 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Admin Page React-powered dashboard under the Jetpack menu [Feature] Stats Data Feature that enables users to track their site's traffic and gain insights on popular content. [Focus] FixTheFlows [Type] Bug When a feature is broken and / or not performing as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Settings UI: initial Stats message still allows to choose weeks or months
4 participants