-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
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 47f743f
update path to sandbox icons page
wseymour15 e9c36e0
update to using inline SVG and setIcon component functionality
wseymour15 8ece4f3
add tests and update setIcon calls
wseymour15 eb57850
update sandbox page with inline svg
wseymour15 79bbc2f
minor documentation updates
wseymour15 de322e2
add player example to sandbox
wseymour15 cf09d5d
add images to dist directory
wseymour15 a898a68
small doc updates and additional test
wseymour15 144907a
sandbox fix
wseymour15 4997916
move images directory
wseymour15 f150ddc
update sandbox and npm commands to build images in dist
wseymour15 5039685
update rollup config to include svg sprite as data uri
wseymour15 a4352a4
remove images directory from dist
wseymour15 a3ff4c9
add images to netlify correctly
wseymour15 92a14d8
fix netlify with images
wseymour15 d9f1c55
add sprite to dom and use DOMParser
wseymour15 20c7835
Merge branch 'main' into feat-add-svg-icons
wseymour15 9c52208
make svg icons responsive to font-size
wseymour15 4575c88
small doc update for set icon
wseymour15 0e465bd
remove unnecessary rollup plugin
wseymour15 9c90924
minor style change to volume icons
wseymour15 5076cdf
Merge branch 'main' into feat-add-svg-icons
wseymour15 c65109b
css update to account for Chinese font sizing
wseymour15 7643e8f
additional change for chinese sliders
wseymour15 357adf1
small css change and svg sprite failure fix
wseymour15 a63a20c
Merge branch 'main' into feat-add-svg-icons
wseymour15 edd3448
use experimental naming and minor icon improvements
wseymour15 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'); | ||
} |
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 :)