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: Update Components to Use StatsTabs / StatsTab #2384

Merged
merged 6 commits into from
Jan 18, 2016
Merged

Conversation

timmyc
Copy link
Contributor

@timmyc timmyc commented Jan 13, 2016

Part of the great stats cleanup in the sky project - this branch aims to standardize all the "tabs" used throughout stats to utilize the <StatsTabs> and <StatsTab> components.

To Test

Thanks in advance for testing this branch out as it does cover quite a few parts of stats. For your valiant efforts, I will thank you with this.

Each of the following components use either <StatsTabs> and/or <StatsTab> and will need to be verified they still function as they do in production, and visually look the same:

Chart Tabs

stats_ _testingtimmy2_wordpress_com_ _wordpress_com

Viewed on a site stats page for anytime period. Click on each tab, verify they all function as expected

Summary Chart Tabs

stats_ _wordpress_com_news_ _wordpress_com

These charts are shown on summary pages for Post Details and Video views, and can be accessed by clicking on an entry in the Post & Pages component. Test that no hover state is shown for this tab, and the cursor does not change on hover.

Latest Post Summary

stats_ _wordpress_com

Accessed via the Insights page, verify the tabs visually look the same, and the Views tab clicks through to the post detail page.

Today's Stats

stats_ _wordpress_com

Also on the Insights Page. Verify it looks the same, and that you can click on each tab, and that when you do so, the corresponding chart is loaded ( tab is active ) on the site stats page

All Time

stats_ _wordpress_com

The last on the insights page, again validate it all looks the same and that there is not any hover state properties on the tabs.

Overview

stats_ _wordpress_com

Accessed from /stats - pretty much identical to "Today's Stats" above as far as testing goes.

@timmyc timmyc added [Feature] Stats Everything related to our analytics product at /stats/ [Status] In Progress labels Jan 13, 2016
@timmyc timmyc self-assigned this Jan 13, 2016
@timmyc timmyc added this to the Stats: Maintenance milestone Jan 13, 2016
@timmyc
Copy link
Contributor Author

timmyc commented Jan 13, 2016

@jancavan or @alternatekev if you wouldn't mind giving the new stats tabs scss file a look that would be great. I have yet to update it, just copied it over.

One known issue that needs to be addressed is to utilize the no-link className to disable the hover state on tabs that don't really link anywhere. This mainly is used on the Insights page, but also holds true on the summary charts.

@alternatekev
Copy link
Contributor

@timmyc Did you rename the .module-tabs classNames to .stats-tabs? If so then a file I created in the branch where I'm updating SCSS can be trashed once we merge this (which looks just like yours here but uses .module instead of .stats).

Are you looking for a full refactor of that new SCSS file or just a once-over that it's not broken?

@timmyc timmyc added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. and removed [Status] In Progress labels Jan 14, 2016
@jancavan
Copy link
Contributor

Great job @timmyc, I'm cleaning up the css now. One thing I noticed is all tabs everywhere are clickable now, but All-time tabs shouldn't be since they're not supposed to link anywhere hence the no-link class.

@jancavan jancavan added [Status] In Progress and removed [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Jan 14, 2016
@timmyc
Copy link
Contributor Author

timmyc commented Jan 14, 2016

@jancavan I will look into the clicking stuff. Some css issues I have seen is hover-state on "all time" is changing to blue and should not - and the background on the in-active chart tabs.

@timmyc
Copy link
Contributor Author

timmyc commented Jan 14, 2016

@jancavan in bf32da9 I cleaned up the tab logic further to use tags only when there is an href or tabClick function. This fixed the hover state in all time.

@jancavan jancavan added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. and removed [Status] In Progress labels Jan 14, 2016
@timmyc timmyc force-pushed the update/stats/tabs branch from c05ccf0 to 48c138a Compare January 15, 2016 15:44
@timmyc
Copy link
Contributor Author

timmyc commented Jan 15, 2016

Okay rebased this one again, can we get a quick review on this @jblz or @alternatekev ?

@jancavan
Copy link
Contributor

@timmyc Cleaned up CSS files here: 3a05edb. I think I may have forgotten to commit my changes!

@timmyc timmyc force-pushed the update/stats/tabs branch from 3a05edb to cbc17b5 Compare January 18, 2016 20:56
clickHandler( event ) {
event.preventDefault();
this.props.tabClick( this.props );
if ( this.props.tabClick ) {
Copy link
Member

Choose a reason for hiding this comment

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

nice catch.

@jblz
Copy link
Member

jblz commented Jan 18, 2016

Works well and code looks good. Great job!

@jblz jblz removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Jan 18, 2016
timmyc added a commit that referenced this pull request Jan 18, 2016
Stats: Update Components to Use StatsTabs / StatsTab
@timmyc timmyc merged commit 4a160cb into master Jan 18, 2016
@lancewillett lancewillett deleted the update/stats/tabs branch February 15, 2016 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Stats Everything related to our analytics product at /stats/
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants