Skip to content

Podcast Player: Clean-up styles & fix few remaining issues#15512

Merged
WunderBart merged 25 commits into
masterfrom
update/podcast-player-cleanup-colors
Apr 24, 2020
Merged

Podcast Player: Clean-up styles & fix few remaining issues#15512
WunderBart merged 25 commits into
masterfrom
update/podcast-player-cleanup-colors

Conversation

@WunderBart

@WunderBart WunderBart commented Apr 21, 2020

Copy link
Copy Markdown
Contributor

Built on top of #15504 as a part of completing the remaining Podcast Player improvements. My main goal was to go through styles.scss and clean it up a bit to minimize technical debt. On the way, I found a few small bugs and decided not to create separate issues for them as they kind of fixed themselves while cleaning up the code :)

Changes proposed in this Pull Request:

Maintenance:

  • Removed duplicated SCSS variables,
  • Renamed some SCSS variables for clarity,
  • Used available SCSS variables for hardcoded values where possible,
  • Unified gutter and some paddings into simple $gutter-s/m/l vars,
  • Cleaned up and made colors styles more consistent and easy to follow,
  • Cleaned up a few misplaced comments.

Bugfixes:

  • Made links styling consistent (Podcast title, Track title, Error message)
    Links have the Secondary color initially and Primary when hovered (except for an active Track, which has Primary color at all times). Previously that was true only when default colors were applied. Now it's true also for any custom colors thanks to progressive enhancement with the CSS vars. Note that therefore hover colors are not supported in, i.e. IE11.
  • Fixed error message link ("Open in a new tab") to which custom colors weren't applied in browsers that don't support CSS vars (IE11).
  • Used correct default, $dark-gray-300 (Secondary) color for episode description text instead of $dark-gray-500.
  • Made the ME.js progress bar tooltip's text color the same as the background for proper contrast.

One enhancement:

  • Removed block border (p1587552447434800-slack-ajax)

Testing instructions:

  • Add the Podcast Player block (use e.g. this URL https://anchor.fm/s/9400d7c/podcast/rss),
  • Make sure that podcast title, inactive track and the "Open in a new tab" track error links have all correct colors - Secondary initially and Primary on hover (hover colors applied only for browsers that support CSS variables),
  • Make sure that episode description's default color is correct (#6c7781),
  • Make sure the block has no border,
  • Make sure the ME.js progress bar tooltip's text color is the same as the background,
  • All of the above should be true when switching themes and global styles.

Demo GIF:

  • Colors: custom
  • Theme: Varia
  • Global styles: "System Font & Libre Baskerville"

Apr-22-2020 16-00-44

IE11 screenshots (same for editor and front-end):

playback track error
Screenshot 2020-04-23 13 14 00 Screenshot 2020-04-23 13 15 34

No-JS screenshot (front-end):

  • Colors: custom
  • Theme: Varia

Screenshot 2020-04-23 12 53 25

Proposed changelog entry for your changes:

  • none

@matticbot

Copy link
Copy Markdown
Contributor

Caution: This PR has changes that must be merged to WordPress.com
Hello WunderBart! These changes need to be synced to WordPress.com - If you 're an a11n, please commandeer, review, and approve D42226-code before merging this PR. Thank you!
This revision will be updated with each commit to this PR

@WunderBart WunderBart marked this pull request as ready for review April 22, 2020 14:06
@WunderBart WunderBart added [Status] Needs Team Review Obsolete. Use Needs Review instead. and removed [Status] In Progress labels Apr 22, 2020
@WunderBart WunderBart requested a review from jeryj April 22, 2020 14:06
@WunderBart WunderBart added [Status] In Progress and removed [Status] Needs Team Review Obsolete. Use Needs Review instead. labels Apr 22, 2020
@WunderBart

Copy link
Copy Markdown
Contributor Author

Currently, on front-end, the Player doesn’t render cover art, description and doesn’t pick up custom colors. This is all going to be fixed when #15515 lands 🙌

@WunderBart WunderBart added [Status] Needs Team Review Obsolete. Use Needs Review instead. and removed [Status] In Progress labels Apr 23, 2020
@jetpackbot

jetpackbot commented Apr 23, 2020

Copy link
Copy Markdown
Collaborator

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: May 5, 2020.
Scheduled code freeze: April 28, 2020

Generated by 🚫 dangerJS against 66b4af6

Comment thread extensions/blocks/podcast-player/style.scss Outdated
Comment thread extensions/blocks/podcast-player/style.scss
Comment thread extensions/blocks/podcast-player/style.scss

@jeryj jeryj 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.

Looks a lot cleaner overall! Nice work! 🙌 I'm approving for now, but waiting to tag Jetpack Crew until the WPcom patch applies cleanly.

I tested with various Twenty * themes, Varia, Varia-based child themes, and Global styles.

*/ }
{ !! ( showEpisodeDescription && track && track.description ) && (
<div
<p

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.

Good catch to change this to a <p>. Testing looks good!

Comment on lines +6 to +8
$gutter-s: 10px;
$gutter-m: 15px;
$gutter-l: 24px;

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.

Glad this change worked out nicely!

}
}

a.jetpack-podcast-player__link {

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.

I like how you consolidated this for the title and track links into this class.

@jeryj jeryj removed the [Status] Needs Team Review Obsolete. Use Needs Review instead. label Apr 23, 2020
@jeherve jeherve added this to the 8.5 milestone Apr 24, 2020
@jeherve jeherve added the [Status] Needs Review This PR is ready for review. label Apr 24, 2020

@jeherve jeherve left a comment

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.

LGTM! 🚢

@jeherve jeherve 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 Apr 24, 2020
@WunderBart WunderBart merged commit e86c2db into master Apr 24, 2020
@matticbot matticbot added [Status] Needs Changelog and removed [Status] Ready to Merge Go ahead, you can push that green button! labels Apr 24, 2020
@WunderBart

Copy link
Copy Markdown
Contributor Author

r206420-wpcom

@WunderBart WunderBart deleted the update/podcast-player-cleanup-colors branch April 27, 2020 11:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants