Commit Graph

16 Commits

Author SHA1 Message Date
Nico d5769eeda4 feat(ui): Add tooltips to control panel buttons (#3572)
Adds configurable tooltips that display the function of buttons in the control panel.
Closes: #3269
2021-08-23 10:00:43 -07:00
Joey Parrish c1b109aabc fix: Correct license headers in CSS/LESS
This corrects/normalizes the license headers in CSS and LESS files.
The LESS tool respects the same "/*!" syntax for forcing the inclusion
of a license header, but will not dedup these licenses.  So the LESS
files generally will not use this syntax.  Instead, the build system
prepends a license header after compilation.

The exception is for our SVG spinner, which is based on third-party
CSS from codepen.  The copyright header for this is forced into the
output to give proper credit to the original author.

Issue #2638

Change-Id: I4c58e2b082f2d5e550a6f0a30feaaf9ebf82a53a
2020-06-09 16:19:38 -07:00
Jacob Trimble 326f5cd02a Use short license in more files.
Some of the files still used the old long license.  This increased the
size of the compiled bundle since it had both versions.

Change-Id: Iec137f71547f91369a563145f870eb26ddc96a96
2020-02-11 19:09:44 +00:00
Joey Parrish 714da55bbc Clean up FIXMEs in LESS code
- Drop unused classes
 - Drop shaka-displayed in favor of shaka-hidden
 - Move shaka-hidden to general.less and fix specificity issue

Change-Id: I9c91da637023607cccd6e7602d9b9ef30994dd82
2020-02-10 23:14:27 +00:00
Joey Parrish b0217f5e6f Work around Material Icons font bug
This works around google/material-design-icons#958 by switching from
the default "solid" style to the "rounded" icon style.

Change-Id: Iea29ed3732d252bd2d089c802c478a97cbda163d
2020-02-10 23:14:16 +00:00
Sandra Lokshina f485772b6d Add ad elements to the UI layout.
This change adds an ad counter and a skip add
button to the DOM and styles them appropriately.
Please note that they don't work yet!
The elements are hidden for now.
To check them out, remove the 'shaka-hidden'
class from the 'shaka-ad-controls' div.
(data-shaka-player-container -> shaka-ad-controls-container ->
shaka-ad-controls).

Change-Id: I45a33d43abc6b0a023cc77f09abdae94a4cee014
2019-10-11 21:56:44 +00:00
Theodore Abshire f24c4a783f Added stylelint, a linter for our CSS/less files.
Also unified CSS/less style based on that.
This does have to use a forked version of stylelint, since there
is a bug (?) in the globbing library they use that causes it to
fail on our buildbot. I found the simplest solution was just to add
an option to disable globbing, a feature we weren't using anyway.

Closes #1867

Change-Id: I9295b01d5b15d060356e314938b64b551b75de6a
2019-08-08 18:38:19 +00:00
Joey Parrish 23c79955a7 Fix inlining of external CSS
Importing in less is not enough.  It will not necessarily inline what
is imported by default.  The "inline" option, however, will force the
CSS file to be inlined.  Without this, some of the `@import`
statements are put directly into the output file, triggering
additional network requests at runtime.  This also adds the "css"
option, which forces less to treat these inputs as CSS and not as
LESS.

Finally, we import MDL for the demo app as a node dependency instead
of loading it from another origin.

This improves the demo's Lighthouse scores of "First Contentful Paint"
by 27% and "First Meaningful Paint" by 14%.

Change-Id: I28e627d3df494e3c4893d31b6bf818f09e8153e9
2019-05-13 17:43:40 +00:00
Joey Parrish 58cedb0367 Add @license to all LESS and CSS files
Change-Id: Ibefe715afcb3676d5a2694032b9c99fe98dd2c44
2019-05-10 17:26:14 +00:00
Joey Parrish 34585af993 Inline external CSS for quicker load
This reduces the number of resources we have to load by using LESS to
import them into the compiled CSS bundle.

This also gets rid of a flash of unstyled content in compiled mode by
always including the compiled CSS in HTML directly, regardless of
mode.  If the app is running in uncompiled mode, LESS is still loaded
and can override the compiled styles.

Change-Id: I8cde25c15c281029a129225fc85a8baee767f424
2019-05-09 19:05:17 +00:00
Sandra Lokshina 40afb00f20 Add spacer element to the UI.
Issue #1673.

Change-Id: I8e01366f82e5e7d3b9365d8387f02eede877ad07
2019-01-18 21:48:31 +00:00
Joey Parrish 9f2b4ef617 Split up less/CSS into several files
This doesn't change any styles.  It just splits related styles into
several separate files, so that things are easier to find.

Pre-work for #1703, #1709, and b/116651454

Change-Id: Icd3330a70ca6c8ff313991c127f8036238cae813
2018-12-07 10:09:37 -08:00
Joey Parrish 189457376c Simplify SVG CSS
Move width and height into shaka-spinner-svg class
Drop unused color animation

Change-Id: Ic8f7abc03c68842c79d89938014add3732284e8d
2018-11-26 10:33:25 -08:00
Joey Parrish f5643f24e6 Fix buffering spinner positioning
- Nest spinner inside the play button container.
 - Remove hacky positioning from both play button and spinner, and let
   flex-box take care of centering.

Closes #1695

Change-Id: I7b54fd753012a1b2ae20e248c154f086f3b60b6a
2018-11-26 10:25:13 -08:00
Joey Parrish ae07c69be4 Fix hiding of fullscreen button during casting
There was a mistake in the name of the class.

Change-Id: Ife38940120def01714051d43d904a12f12e2b80d
2018-11-26 17:48:55 +00:00
Sandra Lokshina 6b1ca2d229 Initial release of Shaka Player UI
Other contributors:
 - @joeyparrish
 - @michellezhuogg
 - @TheModMaker
 - @theodab
 - @vaage

Change-Id: If6df33d9ab5035d1ead4402004f7de37ee8470f4
2018-11-16 14:40:37 -08:00