Skip to content

Commit

Permalink
Merge pull request #341 from samvera-labs/repeated_svg_ids
Browse files Browse the repository at this point in the history
Remove id attributes from svg elements and condense g elements
  • Loading branch information
cjcolvar authored Jan 17, 2024
2 parents 8932070 + 79ed845 commit b1dbf10
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 28 deletions.
18 changes: 5 additions & 13 deletions src/components/MarkersDisplay/MarkerUtils/SVGIcons.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,7 @@ export const DeleteIcon = () => {
<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" stroke="#ffffff"
style={{ height: '1rem', width: '1rem', scale: 0.8 }}
>
<g id="SVGRepo_bgCarrier" strokeWidth="0"></g>
<g id="SVGRepo_tracerCarrier" strokeLinecap="round" strokeLinejoin="round"></g>
<g id="SVGRepo_iconCarrier">
<g strokeWidth="0" strokeLinecap="round" strokeLinejoin="round">
<path d="M10 12V17" stroke="#ffffff" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"></path>
<path d="M14 12V17" stroke="#ffffff" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"></path>
<path d="M4 7H20" stroke="#ffffff" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"></path>
Expand All @@ -49,13 +47,9 @@ export const SaveIcon = () => {
<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"
style={{ height: '1rem', width: '1rem', scale: 0.8 }}
>
<g id="SVGRepo_bgCarrier" strokeWidth="0"></g>
<g id="SVGRepo_tracerCarrier" strokeLinecap="round" strokeLinejoin="round"></g>
<g id="SVGRepo_iconCarrier">
<g id="Interface / Check">
<path id="Vector" d="M6 12L10.2426 16.2426L18.727 7.75732" stroke="#ffffff"
strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"></path>
</g>
<g strokeWidth="0" strokeLinecap="round" strokeLinejoin="round">
<path id="Vector" d="M6 12L10.2426 16.2426L18.727 7.75732" stroke="#ffffff"
strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"></path>
</g>
</svg>
);
Expand All @@ -66,9 +60,7 @@ export const CancelIcon = () => {
<svg fill="#ffffff" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg"
style={{ height: '1rem', width: '1rem', scale: 0.8 }}
>
<g id="SVGRepo_bgCarrier" strokeWidth="0"></g>
<g id="SVGRepo_tracerCarrier" strokeLinecap="round" strokeLinejoin="round"></g>
<g id="SVGRepo_iconCarrier"> <title>cancel2</title>
<g strokeWidth="0" strokeLinecap="round" strokeLinejoin="round">
<path d="M19.587 16.001l6.096 6.096c0.396 0.396 0.396 1.039 0 1.435l-2.151 2.151c-0.396
0.396-1.038 0.396-1.435 0l-6.097-6.096-6.097 6.096c-0.396 0.396-1.038
0.396-1.434 0l-2.152-2.151c-0.396-0.396-0.396-1.038
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ const NextButtonIcon = ({ scale }) => {
return (
<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" transform="rotate(0)"
style={{ fill: 'white', height: '1.25rem', width: '1.25rem', scale: scale }}>
<g id="SVGRepo_bgCarrier" strokeWidth="0"></g>
<g id="SVGRepo_tracerCarrier" strokeLinecap="round" strokeLinejoin="round"></g>
<g id="SVGRepo_iconCarrier">
<g strokeWidth="0" strokeLinecap="round" strokeLinejoin="round">
<path d="M4 20L15.3333 12L4 4V20Z" fill="#ffffff"></path>
<path d="M20 4H17.3333V20H20V4Z" fill="#ffffff"></path>
</g>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ const PreviousButtonIcon = ({ scale }) => {
return (
<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"
style={{ fill: 'white', height: '1.25rem', width: '1.25rem', scale: scale }}>
<g id="SVGRepo_bgCarrier" strokeWidth="0"></g>
<g id="SVGRepo_tracerCarrier" strokeLinecap="round" strokeLinejoin="round"></g>
<g id="SVGRepo_iconCarrier">
<g strokeWidth="0" strokeLinecap="round" strokeLinejoin="round">
<path d="M20 4L8.66667 12L20 20V4Z" fill="#ffffff"></path>
<path d="M4 20H6.66667V4H4V20Z" fill="#ffffff"></path>
</g>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,7 @@ const TrackScrubberZoomInIcon = ({ scale }) => {
return (
<svg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'
style={{ fill: 'white', height: '1.25rem', width: '1.25rem', scale: scale }}>
<g id='SVGRepo_bgCarrier' strokeWidth='0'></g>
<g id='SVGRepo_tracerCarrier' strokeLinecap='round' strokeLinejoin='round'></g>
<g id='SVGRepo_iconCarrier'>
<g strokeWidth='0' strokeLinecap='round' strokeLinejoin='round'>
<path fill='#ffffff' fillRule='evenodd' d='M4 9a5 5 0 1110 0A5 5 0 014 9zm5-7a7 7 0 104.2 12.6.999.999
0 00.093.107l3 3a1 1 0 001.414-1.414l-3-3a.999.999 0 00-.107-.093A7 7 0 009 2zM8 6.5a1 1 0 112 0V8h1.5a1
1 0 110 2H10v1.5a1 1 0 11-2 0V10H6.5a1 1 0 010-2H8V6.5z'>
Expand All @@ -67,9 +65,7 @@ const TrackScrubberZoomOutIcon = ({ scale }) => {
return (
<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"
style={{ fill: 'white', height: '1.25rem', width: '1.25rem', scale: scale }}>
<g id="SVGRepo_bgCarrier" strokeWidth="0"></g>
<g id="SVGRepo_tracerCarrier" strokeLinecap="round" strokeLinejoin="round"></g>
<g id="SVGRepo_iconCarrier">
<g strokeWidth="0" strokeLinecap="round" strokeLinejoin="round">
<path fillRule="evenodd" clipRule="evenodd" d="M4 11C4 7.13401 7.13401 4 11 4C14.866 4 18 7.13401 18 11C18 14.866
14.866 18 11 18C7.13401 18 4 14.866 4 11ZM11 2C6.02944 2 2 6.02944 2 11C2 15.9706 6.02944 20 11 20C13.125 20 15.078
19.2635 16.6177 18.0319L20.2929 21.7071C20.6834 22.0976 21.3166 22.0976 21.7071 21.7071C22.0976 21.3166 22.0976
Expand Down
4 changes: 1 addition & 3 deletions src/components/StructuredNavigation/NavUtils/ListItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ const LockedSVGIcon = () => {
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"
style={{ height: '0.75rem', width: '0.75rem' }} className="structure-item-locked"
>
<g id="SVGRepo_bgCarrier" strokeWidth="0" />
<g id="SVGRepo_tracerCarrier" strokeLinecap="round" strokeLinejoin="round" />
<g id="SVGRepo_iconCarrier">
<g strokeWidth="0" strokeLinecap="round" strokeLinejoin="round">
<path fillRule="evenodd" clipRule="evenodd" d="M5.25 10.0546V8C5.25 4.27208 8.27208
1.25 12 1.25C15.7279 1.25 18.75 4.27208 18.75 8V10.0546C19.8648 10.1379 20.5907
10.348 21.1213 10.8787C22 11.7574 22 13.1716 22 16C22 18.8284 22 20.2426 21.1213
Expand Down

0 comments on commit b1dbf10

Please sign in to comment.