-
Notifications
You must be signed in to change notification settings - Fork 393
Feature: Icon Mixins #4031
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
Open
crhallberg
wants to merge
42
commits into
vufind-org:dev
Choose a base branch
from
crhallberg:icon-mixins
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Feature: Icon Mixins #4031
Changes from 35 commits
Commits
Show all changes
42 commits
Select commit
Hold shift + click to select a range
2e3f353
feat: create and use Font Awesome 4 mixin.
crhallberg c7e204f
feat: create and use Font Awesome 6 mixin.
crhallberg 34455cc
fix: simplify styles and implementation for Unicode icons.
crhallberg 914d03c
refactor: use defaultSet to declutter icon mixin configs.
crhallberg c669fc3
chore: remove extraneous files.
crhallberg 3b72f06
feat: add missing text icon template.
crhallberg 76f967d
Merge remote-tracking branch 'origin/dev' into icon-mixins
crhallberg b5a03de
style: remove whitespace.
crhallberg 535ec35
chore: remove vendor less and scss files.
crhallberg cc5ae43
Merge remote-tracking branch 'origin/dev' into icon-mixins
crhallberg c8b4d8b
test(icons): adjust tests to match updated Unicode icons.
crhallberg b68232a
chore(bs5): update BS5 scss.
crhallberg 880122e
chore: lessToSass
crhallberg 61dd5f6
chore: fix whitespace issue leading to differences between less and s…
crhallberg aeace0e
Merge remote-tracking branch 'origin/dev' into icon-mixins
crhallberg 96e4df0
fix: missing font-awesome vendor?
crhallberg d5db7f2
remove: FA4.
crhallberg fb6139b
revert: un-upgrade some vendor libraries.
crhallberg 3f98cd4
refactor: move basic icons to root.
crhallberg 1b7e0ec
css(devtools): improve organization and presentation of Icons preview.
crhallberg 31da54e
mixin(fa6): use npm and JS to update the Font Awesome vendor files.
crhallberg 0494929
docs: improve documentation.
crhallberg baddb9f
Merge remote-tracking branch 'origin/dev' into icon-mixins
crhallberg ed94961
tests: fix expected Unicode icon class.
crhallberg 0b8d625
lint
crhallberg 072e19d
Merge remote-tracking branch 'origin/dev' into icon-mixins
crhallberg fe10f45
icons: improve icons, improve readability, remove v4 icons.
crhallberg 00036e8
icons: check and normalize all icons. add FA7 mixin.
crhallberg af956a7
icons: improve devtools table
crhallberg b4709c8
meta: reduce diffs
crhallberg 00e2ff1
meta: diff reduce (remove SVGs)
crhallberg d709a78
mixins: tool updates.
crhallberg 0e3c7bd
fix: revert use of period class divider - messes with image sets. Ren…
crhallberg 97c7fda
chore: php-cs-fixer
crhallberg 7c0c700
docs: fix FontAwesome reference.
crhallberg 928725c
Merge branch 'dev' into icon-mixins
demiankatz e8bdd52
Merge branch 'dev' into icon-mixins
demiankatz 9ab07a6
Apply suggestion from @demiankatz
demiankatz f6ece4f
Remove obsolete icon.
demiankatz b54cf04
Revert name change to simplify.
demiankatz 055f22a
Merge branch 'dev' into icon-mixins
demiankatz aa74aba
Merge branch 'dev' into icon-mixins
demiankatz 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 hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -140,14 +140,20 @@ protected function mapIcon(string $name, $aliasTrail = []): array | |
| $rtl = $this->rtl ? '-rtl' : ''; | ||
| $icon = $this->iconMap[$name . $rtl] ?? $this->iconMap[$name] ?? $name; | ||
| $set = $this->defaultSet; | ||
| $class = null; | ||
|
|
||
| // Override set from config (ie. FontAwesome:icon) | ||
| if (str_contains($icon, ':')) { | ||
| $parts = explode(':', $icon, 3); | ||
| $parts = explode(':', $icon, 2); | ||
| $set = $parts[0]; | ||
| $icon = $parts[1]; | ||
| $class = $parts[2] ?? null; | ||
| } | ||
|
|
||
| // Special case classes | ||
| $class = null; | ||
| if (str_contains($icon, ':')) { | ||
| $parts = explode(':', $icon, 2); | ||
| $icon = $parts[0]; | ||
| $class = str_replace('.', ' ', $parts[1]); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is the purpose of this string replace? Is it worth adding a comment? |
||
| } | ||
|
|
||
| // Special case: aliases: | ||
|
|
||
This file contains hidden or 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
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -26,3 +26,7 @@ | |
| text-align: left; | ||
| vertical-align: middle; | ||
| } | ||
|
|
||
| .icon-table { | ||
| width: fit-content; | ||
| } | ||
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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.
Is .gitignore the only way to avoid thousands of files in these vendor directories? If so, this intersects with the discussions on #4591 about our general strategy for JS-adjacent dependencies. If not, can we just commit the smaller subset of needed files and not .gitignore vendor files at this time?
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.
I can remove this right before we merge so that all the files are in place.