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

feat: Add useSVGIcons option #8260

Merged
merged 28 commits into from
Jun 12, 2023
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
11862fb
feat: Add useSVGIcons option
wseymour15 May 2, 2023
47f743f
update path to sandbox icons page
wseymour15 May 2, 2023
e9c36e0
update to using inline SVG and setIcon component functionality
wseymour15 May 10, 2023
8ece4f3
add tests and update setIcon calls
wseymour15 May 11, 2023
eb57850
update sandbox page with inline svg
wseymour15 May 11, 2023
79bbc2f
minor documentation updates
wseymour15 May 11, 2023
de322e2
add player example to sandbox
wseymour15 May 11, 2023
cf09d5d
add images to dist directory
wseymour15 May 12, 2023
a898a68
small doc updates and additional test
wseymour15 May 12, 2023
144907a
sandbox fix
wseymour15 May 12, 2023
4997916
move images directory
wseymour15 May 15, 2023
f150ddc
update sandbox and npm commands to build images in dist
wseymour15 May 15, 2023
5039685
update rollup config to include svg sprite as data uri
wseymour15 May 16, 2023
a4352a4
remove images directory from dist
wseymour15 May 17, 2023
a3ff4c9
add images to netlify correctly
wseymour15 May 17, 2023
92a14d8
fix netlify with images
wseymour15 May 17, 2023
d9f1c55
add sprite to dom and use DOMParser
wseymour15 May 23, 2023
20c7835
Merge branch 'main' into feat-add-svg-icons
wseymour15 May 25, 2023
9c52208
make svg icons responsive to font-size
wseymour15 May 26, 2023
4575c88
small doc update for set icon
wseymour15 May 30, 2023
0e465bd
remove unnecessary rollup plugin
wseymour15 May 30, 2023
9c90924
minor style change to volume icons
wseymour15 May 31, 2023
5076cdf
Merge branch 'main' into feat-add-svg-icons
wseymour15 May 31, 2023
c65109b
css update to account for Chinese font sizing
wseymour15 Jun 1, 2023
7643e8f
additional change for chinese sliders
wseymour15 Jun 1, 2023
357adf1
small css change and svg sprite failure fix
wseymour15 Jun 6, 2023
a63a20c
Merge branch 'main' into feat-add-svg-icons
wseymour15 Jun 6, 2023
edd3448
use experimental naming and minor icon improvements
wseymour15 Jun 9, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ Video.js is [licensed][license] under the Apache License, Version 2.0.

[npm-link]: https://nodei.co/npm/video.js/

[options]: docs/guides/options.md
[options]: https://videojs.com/guides/options/

[plugins]: https://videojs.com/plugins/

Expand Down
31 changes: 31 additions & 0 deletions build/images.js
Copy link
Member

Choose a reason for hiding this comment

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

what does this file do and when is it run?

Copy link
Member

Choose a reason for hiding this comment

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

looks similar to the build/sandbox.js file

Copy link
Contributor Author

@wseymour15 wseymour15 May 12, 2023

Choose a reason for hiding this comment

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

This was me playing around with how to include /images in the /dist directory. Updated package.json with a command to copy the folder to dist.

I believe this should make the file accessible after everything is built, but please let me know if that is not the case or if I should do this some other way :)

Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/* eslint-disable no-console */

const fs = require('fs');
const path = require('path');
const sh = require('shelljs');

const files = sh.find(path.join(__dirname, '..', 'images', '**', '*.*'))
.filter((filepath) => path.extname(filepath) === '.svg');

const changes = files.map(function(filepath) {
const p = path.parse(filepath);
const nonExample = path.join(p.dir, p.name);

return {
file: filepath,
copy: nonExample
};
}).filter(function(change) {
return !fs.existsSync(change.copy);
});

changes.forEach(function(change) {
fs.copyFileSync(change.file, change.copy);
});

if (changes.length) {
console.log('Updated Image files for:');
console.log('\t' + changes.map((chg) => chg.copy).join('\n\t'));
} else {
console.log('No Image updates necessary');
}
142 changes: 142 additions & 0 deletions images/icons.svg
wseymour15 marked this conversation as resolved.
Show resolved Hide resolved
wseymour15 marked this conversation as resolved.
Show resolved Hide resolved
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ <h2>Navigation</h2>
<li><a href="sandbox/responsive.html">Responsive Demo</a></li>
<li><a href="sandbox/middleware-play.html">Middleware Play Demo</a></li>
<li><a href="sandbox/icons.html">Icons Demo</a></li>
<li><a href="sandbox/svg-icons.html">SVG Icons Demo</a></li>
<li><a href="sandbox/focus-visible.html">Focus Visible Demo</a></li>
<li><a href="sandbox/embeds.html">Embeds Demo</a></li>
<li><a href="sandbox/descriptions.html">Descriptions Demo</a></li>
Expand Down
Loading