Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
coopwire-hypothesis
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
孙灵跃 Leon Sun
coopwire-hypothesis
Commits
f44903b1
Commit
f44903b1
authored
Jan 24, 2023
by
Lyza Danger Gardner
Committed by
Lyza Gardner
Jan 26, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unused icon assets and legacy registration of icons
parent
1d4417dc
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
0 additions
and
184 deletions
+0
-184
icons.js
src/annotator/icons.js
+0
-34
index.ts
src/annotator/index.ts
+0
-5
annotate.svg
src/images/icons/annotate.svg
+0
-3
expand-menu.svg
src/images/icons/expand-menu.svg
+0
-3
lock.svg
src/images/icons/lock.svg
+0
-9
pointer.svg
src/images/icons/pointer.svg
+0
-1
reply.svg
src/images/icons/reply.svg
+0
-3
sort.svg
src/images/icons/sort.svg
+0
-1
icons.js
src/sidebar/icons.js
+0
-110
index.js
src/sidebar/index.js
+0
-6
bootstrap.js
src/sidebar/test/bootstrap.js
+0
-9
No files found.
src/annotator/icons.js
deleted
100644 → 0
View file @
1d4417dc
// @ts-nocheck
import
{
cancel
,
caretLeft
,
caretRight
,
caution
,
hide
,
highlight
,
note
,
show
,
}
from
'@hypothesis/frontend-shared/lib/icons'
;
// Different variant than shared icon
import
annotateIcon
from
'../images/icons/annotate.svg'
;
// Not in shared icon set
import
pointerIcon
from
'../images/icons/pointer.svg'
;
/**
* Set of icons used by the annotator part of the application via the `Icon`
* component.
*/
export
const
annotatorIcons
=
{
annotate
:
annotateIcon
,
cancel
,
caution
,
'caret-left'
:
caretLeft
,
'caret-right'
:
caretRight
,
hide
,
highlight
,
note
,
pointer
:
pointerIcon
,
show
,
};
src/annotator/index.ts
View file @
f44903b1
...
@@ -4,11 +4,6 @@ import 'focus-visible';
...
@@ -4,11 +4,6 @@ import 'focus-visible';
// Enable debug checks for Preact. Removed in prod builds by Rollup config.
// Enable debug checks for Preact. Removed in prod builds by Rollup config.
import
'preact/debug'
;
import
'preact/debug'
;
// Load icons.
import
{
registerIcons
}
from
'@hypothesis/frontend-shared'
;
import
{
annotatorIcons
}
from
'./icons'
;
registerIcons
(
annotatorIcons
);
import
{
import
{
PortProvider
,
PortProvider
,
installPortCloseWorkaroundForSafari
,
installPortCloseWorkaroundForSafari
,
...
...
src/images/icons/annotate.svg
deleted
100644 → 0
View file @
1d4417dc
<svg
xmlns=
"http://www.w3.org/2000/svg"
width=
"16"
height=
"16"
viewBox=
"0 0 16 16"
>
<path
fill=
"currentColor"
fill-rule=
"nonzero"
d=
"M15 0c.27 0 .505.099.703.297A.961.961 0 0116 1v15l-4-3H1a.974.974 0 01-.703-.29A.953.953 0 010 12V1C0 .719.096.482.29.29A.966.966 0 011 0h14zM7 3l-.469.063c-.312.041-.656.187-1.031.437-.375.25-.719.646-1.031 1.188C4.156 5.229 4 6 4 7l.002.063.006.062a.896.896 0 01.008.11l-.002.074-.006.066a1.447 1.447 0 00.43 1.188C4.729 8.854 5.082 9 5.5 9c.417 0 .77-.146 1.063-.438C6.854 8.271 7 7.918 7 7.5c0-.417-.146-.77-.438-1.063A1.447 1.447 0 005.5 6c-.073 0-.146.005-.219.016-.073.01-.14.026-.203.046.177-1.03.542-1.632 1.094-1.804L7 4V3zm5 0l-.469.063c-.312.041-.656.187-1.031.437-.375.25-.719.646-1.031 1.188C9.156 5.229 9 6 9 7l.002.063.006.062a.896.896 0 01.008.11l-.002.074-.006.066a1.447 1.447 0 00.43 1.188c.291.291.645.437 1.062.437.417 0 .77-.146 1.063-.438.291-.291.437-.645.437-1.062 0-.417-.146-.77-.438-1.063A1.447 1.447 0 0010.5 6c-.073 0-.146.005-.219.016-.073.01-.14.026-.203.046.177-1.03.542-1.632 1.094-1.804L12 4V3z"
/>
</svg>
src/images/icons/expand-menu.svg
deleted
100755 → 0
View file @
1d4417dc
<svg
xmlns=
"http://www.w3.org/2000/svg"
width=
"16"
height=
"16"
viewBox=
"0 0 16 16"
>
<path
fill=
"currentColor"
fill-rule=
"nonzero"
d=
"M7.456 11.788L1.226 5.92a.695.695 0 0 1 0-1.025l.726-.684a.804.804 0 0 1 1.087-.001L8 8.861l4.961-4.65a.804.804 0 0 1 1.087.001l.727.684c.3.283.3.742 0 1.025l-6.23 5.867a.804.804 0 0 1-1.09 0z"
/>
</svg>
\ No newline at end of file
src/images/icons/lock.svg
deleted
100644 → 0
View file @
1d4417dc
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width=
"48px"
height=
"56px"
viewBox=
"0 0 48 56"
version=
"1.1"
xmlns=
"http://www.w3.org/2000/svg"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
>
<g
stroke=
"none"
stroke-width=
"1"
fill=
"none"
fill-rule=
"evenodd"
>
<g
fill=
"currentColor"
>
<rect
x=
"0"
y=
"24"
width=
"48"
height=
"32"
></rect>
<path
d=
"M24,0 C24,0 8,0 8,16 L8,32 L16,32 L16,16.0000004 C16,8 24,8 24,8 C24,8 32,8 32,16 L32,32 L40,32 L40,16 C40,0 24,0 24,0 Z"
></path>
</g>
</g>
</svg>
\ No newline at end of file
src/images/icons/pointer.svg
deleted
100644 → 0
View file @
1d4417dc
<svg
xmlns=
"http://www.w3.org/2000/svg"
width=
"15"
height=
"8"
viewBox=
"0 0 15 8"
aria-hidden=
"true"
focusable=
"false"
><path
d=
"M0 8 L7 0 L15 8"
stroke=
"currentColor"
strokeWidth=
"2"
/></svg>
src/images/icons/reply.svg
deleted
100644 → 0
View file @
1d4417dc
<svg
xmlns=
"http://www.w3.org/2000/svg"
width=
"16"
height=
"16"
viewBox=
"0 0 16 16"
>
<path
fill=
"currentColor"
fill-rule=
"nonzero"
d=
"M6.422 5.422c2 0 3.542.417 4.625 1.25 1.083.833 1.875 1.75 2.375 2.75s.792 1.917.875 2.75l.125 1.25h-2l-.094-.938c-.062-.625-.281-1.312-.656-2.062-.375-.75-.969-1.438-1.781-2.063-.813-.625-1.97-.937-3.47-.937H4.829l2 2-1.406 1.422L1 6.422 5.422 2l1.406 1.422-2 2h1.594z"
/>
</svg>
src/images/icons/sort.svg
deleted
100644 → 0
View file @
1d4417dc
<svg
xmlns=
"http://www.w3.org/2000/svg"
width=
"16"
height=
"16"
viewBox=
"0 0 16 16"
aria-hidden=
"true"
focusable=
"false"
class=
"Icon Icon--sort"
><g
fill-rule=
"evenodd"
><rect
fill=
"none"
stroke=
"none"
x=
"0"
y=
"0"
width=
"16"
height=
"16"
></rect><path
fill=
"none"
stroke=
"currentColor"
stroke-linecap=
"round"
stroke-linejoin=
"round"
stroke-width=
"2"
d=
"M5 9V2v7zM1 5l4-4 4 4m2 2v7-7zm-4 4l4 4 4-4"
></path></g></svg>
src/sidebar/icons.js
deleted
100644 → 0
View file @
1d4417dc
// @ts-nocheck - TS doesn't understand SVG imports.
import
{
arrowLeft
,
arrowRight
,
cancel
,
caretRight
,
caretUp
,
ccStd
,
ccZero
,
check
,
collapse
,
copy
,
edit
,
editorLatex
,
editorQuote
,
editorTextBold
,
editorTextItalic
,
email
,
expand
,
external
,
flag
,
flagFilled
,
globe
,
groups
,
help
,
hide
,
highlight
,
image
,
leave
,
link
,
listOrdered
,
listUnordered
,
logo
,
plus
,
profile
,
refresh
,
restricted
,
search
,
share
,
socialFacebook
,
socialTwitter
,
trash
,
}
from
'@hypothesis/frontend-shared/lib/icons'
;
// The following icons differ here from the shared-package versions
import
annotateIcon
from
'../images/icons/annotate.svg'
;
import
lockIcon
from
'../images/icons/lock.svg'
;
import
replyIcon
from
'../images/icons/reply.svg'
;
import
sortIcon
from
'../images/icons/sort.svg'
;
// This is very similar to caretDown but is larger
import
expandMenuIcon
from
'../images/icons/expand-menu.svg'
;
// Not in shared package
import
pointerIcon
from
'../images/icons/pointer.svg'
;
/**
* Set of icons used by the sidebar application
*/
export
const
sidebarIcons
=
{
add
:
plus
,
annotate
:
annotateIcon
,
'arrow-left'
:
arrowLeft
,
'arrow-right'
:
arrowRight
,
cancel
,
'caret-right'
:
caretRight
,
'cc-std'
:
ccStd
,
'cc-zero'
:
ccZero
,
'collapse-menu'
:
caretUp
,
collapse
,
collapsed
:
caretRight
,
copy
,
edit
,
email
,
'expand-menu'
:
expandMenuIcon
,
error
:
cancel
,
expand
,
external
,
facebook
:
socialFacebook
,
flag
,
'flag--active'
:
flagFilled
,
'format-bold'
:
editorTextBold
,
'format-functions'
:
editorLatex
,
'format-italic'
:
editorTextItalic
,
'format-list-numbered'
:
listOrdered
,
'format-list-unordered'
:
listUnordered
,
'format-quote'
:
editorQuote
,
groups
,
help
,
hide
,
highlight
,
image
,
leave
,
link
,
lock
:
lockIcon
,
logo
,
pointer
:
pointerIcon
,
profile
,
public
:
globe
,
refresh
,
restricted
,
reply
:
replyIcon
,
search
,
share
,
success
:
check
,
sort
:
sortIcon
,
trash
,
twitter
:
socialTwitter
,
};
src/sidebar/index.js
View file @
f44903b1
...
@@ -88,12 +88,6 @@ function setupFrameSync(frameSync, store) {
...
@@ -88,12 +88,6 @@ function setupFrameSync(frameSync, store) {
}
}
}
}
// Register icons used by the sidebar app (and maybe other assets in future).
import
{
registerIcons
}
from
'@hypothesis/frontend-shared'
;
import
{
sidebarIcons
}
from
'./icons'
;
registerIcons
(
sidebarIcons
);
// The entry point component for the app.
// The entry point component for the app.
import
{
render
}
from
'preact'
;
import
{
render
}
from
'preact'
;
import
HypothesisApp
from
'./components/HypothesisApp'
;
import
HypothesisApp
from
'./components/HypothesisApp'
;
...
...
src/sidebar/test/bootstrap.js
View file @
f44903b1
...
@@ -13,15 +13,6 @@ import { Adapter } from 'enzyme-adapter-preact-pure';
...
@@ -13,15 +13,6 @@ import { Adapter } from 'enzyme-adapter-preact-pure';
configure
({
adapter
:
new
Adapter
()
});
configure
({
adapter
:
new
Adapter
()
});
// Make all the icons that are registered by the application available in tests.
import
{
sidebarIcons
}
from
'../icons'
;
import
{
annotatorIcons
}
from
'../../annotator/icons'
;
import
{
registerIcons
}
from
'@hypothesis/frontend-shared'
;
registerIcons
({
...
sidebarIcons
,
...
annotatorIcons
,
});
// Ensure that uncaught exceptions between tests result in the tests failing.
// Ensure that uncaught exceptions between tests result in the tests failing.
// This works around an issue with mocha / karma-mocha, see
// This works around an issue with mocha / karma-mocha, see
// https://github.com/hypothesis/client/issues/2249.
// https://github.com/hypothesis/client/issues/2249.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment