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 look of dashboard widget #10958

Merged
merged 7 commits into from
Dec 18, 2018

Conversation

jeherve
Copy link
Member

@jeherve jeherve commented Dec 12, 2018

Changes proposed in this Pull Request:

Fixes #10553

This update updates the look of the Stats dashboard widget to be cleaner and Jetpack-branded.

image

Testing instructions:

  • You'll need a site with some traffic, or you will need to fake some traffic to get some data in the stats widget.
  • Open your dashboard and check the Stats widget.

Proposed changelog entry for your changes:

  • Stats: improve the design of the Stats dashboard widget.

- Update get_jp_emblem to support displaying the full logotype.
- Add logo to widget title.
- Addd CSS to style new widget title.
It is now displayed on its own line, centered.
@jeherve jeherve added [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it [Feature] Stats Data Feature that enables users to track their site's traffic and gain insights on popular content. [Status] Needs Review A Jetpack Crew expert's review is needed. Typically for significant changes to core functionality. [Status] Needs Design Review Design has been added. Needs a review! labels Dec 12, 2018
@jeherve jeherve added this to the 6.9 milestone Dec 12, 2018
@jeherve jeherve self-assigned this Dec 12, 2018
@jeherve jeherve requested review from oskosk and a team December 12, 2018 13:44
@jetpackbot
Copy link
Collaborator

jetpackbot commented Dec 12, 2018

Thank you for the great PR description!

When this PR is ready for review, please apply the [Status] Needs Review label. If you are an a11n, please have someone from your team review the code if possible. The Jetpack team will also review this PR and merge it to be included in the next Jetpack release.

Scheduled Jetpack release: January 10, 2019.
Scheduled code freeze: January 3, 2019

Generated by 🚫 dangerJS against 9db0e9b

@jeherve
Copy link
Member Author

jeherve commented Dec 12, 2018

Noting that this will need a bit of design magic as well. I could not find a pretty way to have the "configure" link be properly aligned while also aligning the new logo.

screenshot 2018-12-12 at 14 05 05

@keoshi
Copy link
Contributor

keoshi commented Dec 12, 2018

I can take care of this tomorrow, Jeremy!

@keoshi
Copy link
Contributor

keoshi commented Dec 13, 2018

@jeherve either of these should work, though I prefer the first one.

#js-toggle-stats_dashboard_widget_control {
    position: absolute;
    top: 8px;
    right: 36px;
}
#js-toggle-stats_dashboard_widget_control {
    float: right;
    margin-top: -18px;
}

P.S.: we really should get rid of styles that target ID and favor classes instead.

@jeherve
Copy link
Member Author

jeherve commented Dec 13, 2018

@keoshi Thank you. I took care of this in 1796f51 (I also switched to a class there).

@keoshi
Copy link
Contributor

keoshi commented Dec 13, 2018

@jeherve Thank you!

keoshi
keoshi previously approved these changes Dec 14, 2018
Copy link
Contributor

@keoshi keoshi left a comment

Choose a reason for hiding this comment

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

Looks great to me! 🚢

@keoshi keoshi removed the [Status] Needs Design Review Design has been added. Needs a review! label Dec 14, 2018
@joanrho
Copy link
Contributor

joanrho commented Dec 18, 2018

Hey @jeherve, can you please provide more clear testing instructions in your PR description?
I’m unclear as to how I can check out this branch on a site with more traffic (e.g., NOT my jetpack sandbox, which I know how to test and it yields a possibly broken use case: https://cloudup.com/c3NtyW60K7n — is this the correct view for Jetpack users with low traffic to see?)

Also, I noticed that your solution placed the “View all stats” button in the wrong place with respect to my “After” design mockup in #10553. Would you be able move that button to below the “Top Posts” and “Top Searches” sections as in my mockup?

@jeherve
Copy link
Member Author

jeherve commented Dec 18, 2018

I’m unclear as to how I can check out this branch on a site with more traffic (e.g., NOT my jetpack sandbox, which I know how to test and it yields a possibly broken use case: cloudup.com/c3NtyW60K7n — is this the correct view for Jetpack users with low traffic to see?)

My patch includes some SCSS changes, so you would need to run yarn build to create the matching new CSS. That should help.

To fill in the widget with some traffic, I would recommend that you log out of your admin account on your sandbox (or visit your sandbox in an incognito window), visit several pages of your site while being logged out, and wait a few minutes. You should see the Stats widget get filled in with some data.

I noticed that your solution placed the “View all stats” button in the wrong place with respect to my “After” design mockup in #10553. Would you be able move that button to below the “Top Posts” and “Top Searches” sections as in my mockup?

Good point, my bad. I fixed that in 247e504

Here is how the stats widget looks like now:

screenshot 2018-12-18 at 10 13 54

Copy link
Contributor

@brbrr brbrr left a comment

Choose a reason for hiding this comment

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

Looks good, tests well 🐑

@brbrr brbrr merged commit d0d3f2a into master Dec 18, 2018
@brbrr brbrr deleted the update/stats-dashboard-widget-styles branch December 18, 2018 10:33
@jeherve jeherve added [Status] Has Changelog and removed [Status] Needs Review A Jetpack Crew expert's review is needed. Typically for significant changes to core functionality. [Status] Needs Changelog labels Dec 18, 2018
jeherve added a commit that referenced this pull request Dec 19, 2018
jeherve added a commit that referenced this pull request Jan 3, 2019
jeherve added a commit that referenced this pull request Jan 3, 2019
* Add first version of the Changelog and testing list for 6.9

* Changelog: add #10710

* changelog: add #10538

* changelog: add #10741

* changelog: add #10749

* changelog: add #10664

* changelog: add #10224

* changelog: add #10788

* Changelog: add #10560

* Chanegelog: add #10812

* changelog: add #10556

* Changelog: add #10668

* Changelog: add #10846

* Changelog: add #10947

* Changelog: add #10962

* Changelog: add #10956

* Changelog: add #10940

* Changelog: add #10934

* Changelog: add #10912

* changelog: add #10866

* changelog: add #10924

* Changelog: add #10936

* Changelog: add #10833

* changelog: add #10867

* Changelog: add #10960

* Changelog: add #10888

* changelog: add #10840

* changelog: add #10972

* Changelog: add #10979

* changelog: add #10909

* Changelog: add #10958

* Changelog: add #10981

* Changelog: add #10564

* Changelog: add #10809

* Changelog: add #10982

* Changelog: add #10706

* Changelog: add #10978

* Changelog: add #10132

* Changelog: add #11022

* Changelog: add #11024

* Changelog: add #10875

* Changelog: add #11030

* Changelog: add #11053

* Changelog: add #10880

* Changelog: add #9359

* Changelog: add #11037

* Update block list

* Changelog: add #11060

* Changelog: add #10755

* changelog: add #11000

* Changelog: add #10786

* Changelog: add #10945

* Changelog: add #10597
jeherve added a commit that referenced this pull request Feb 22, 2019
Fixes #11265

In #10958 I changed the widget title and included a SVG file in there, not thinking that
the widget title was also displayed in the Screen Options tab.

WordPress does not currently offer a filter allowing you to change the widget title in
Screen Options but not inside the widgets, so I opted to hide that extra part of the
widget title with CSS in the Screen Options tab.
jeherve added a commit that referenced this pull request Feb 25, 2019
Fixes #11265

In #10958 I changed the widget title and included a SVG file in there, not thinking that
the widget title was also displayed in the Screen Options tab.

WordPress does not currently offer a filter allowing you to change the widget title in
Screen Options but not inside the widgets, so I opted to hide that extra part of the
widget title with CSS in the Screen Options tab.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Stats Data Feature that enables users to track their site's traffic and gain insights on popular content. [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants