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
bd5b2de0
Commit
bd5b2de0
authored
Feb 05, 2021
by
Eduardo Sanz García
Committed by
Eduardo
Feb 05, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove createElement imports and substitute Fragments
parent
369a8d5d
Changes
144
Hide whitespace changes
Inline
Side-by-side
Showing
144 changed files
with
31 additions
and
165 deletions
+31
-165
use-element-should-close-test.js
...nd-shared/src/hooks/test/use-element-should-close-test.js
+0
-1
svg-icon.js
frontend-shared/src/svg-icon.js
+0
-1
svg-icon-test.js
frontend-shared/src/test/svg-icon-test.js
+1
-1
adder.js
src/annotator/adder.js
+1
-1
adder-toolbar.js
src/annotator/components/adder-toolbar.js
+0
-1
buckets.js
src/annotator/components/buckets.js
+0
-1
buckets-test.js
src/annotator/components/test/buckets-test.js
+0
-1
toolbar-test.js
src/annotator/components/test/toolbar-test.js
+0
-1
toolbar.js
src/annotator/components/toolbar.js
+0
-1
bucket-bar.js
src/annotator/plugin/bucket-bar.js
+1
-1
pdf.js
src/annotator/plugin/pdf.js
+3
-3
adder-test.js
src/annotator/test/adder-test.js
+0
-1
highlighter-test.js
src/annotator/test/highlighter-test.js
+1
-1
toolbar.js
src/annotator/toolbar.js
+1
-1
renderer-options-test.js
src/shared/test/renderer-options-test.js
+0
-1
shortcut-test.js
src/shared/test/shortcut-test.js
+1
-1
Annotation.js
src/sidebar/components/Annotation.js
+0
-1
AnnotationActionBar.js
src/sidebar/components/AnnotationActionBar.js
+0
-1
AnnotationBody.js
src/sidebar/components/AnnotationBody.js
+0
-1
AnnotationDocumentInfo.js
src/sidebar/components/AnnotationDocumentInfo.js
+0
-1
AnnotationEditor.js
src/sidebar/components/AnnotationEditor.js
+0
-1
AnnotationHeader.js
src/sidebar/components/AnnotationHeader.js
+0
-1
AnnotationLicense.js
src/sidebar/components/AnnotationLicense.js
+0
-1
AnnotationMissing.js
src/sidebar/components/AnnotationMissing.js
+0
-1
AnnotationPublishControl.js
src/sidebar/components/AnnotationPublishControl.js
+0
-1
AnnotationQuote.js
src/sidebar/components/AnnotationQuote.js
+0
-1
AnnotationReplyToggle.js
src/sidebar/components/AnnotationReplyToggle.js
+0
-1
AnnotationShareControl.js
src/sidebar/components/AnnotationShareControl.js
+0
-1
AnnotationShareInfo.js
src/sidebar/components/AnnotationShareInfo.js
+0
-1
AnnotationTimestamps.js
src/sidebar/components/AnnotationTimestamps.js
+0
-1
AnnotationUser.js
src/sidebar/components/AnnotationUser.js
+0
-1
AnnotationView.js
src/sidebar/components/AnnotationView.js
+2
-3
AutocompleteList.js
src/sidebar/components/AutocompleteList.js
+0
-1
Button.js
src/sidebar/components/Button.js
+0
-1
Excerpt.js
src/sidebar/components/Excerpt.js
+0
-1
FilterSelect.js
src/sidebar/components/FilterSelect.js
+0
-1
FilterStatus.js
src/sidebar/components/FilterStatus.js
+0
-1
GroupList.js
src/sidebar/components/GroupList.js
+0
-1
GroupListItem.js
src/sidebar/components/GroupListItem.js
+2
-3
GroupListSection.js
src/sidebar/components/GroupListSection.js
+0
-1
HelpPanel.js
src/sidebar/components/HelpPanel.js
+0
-1
HypothesisApp.js
src/sidebar/components/HypothesisApp.js
+0
-1
LoggedOutMessage.js
src/sidebar/components/LoggedOutMessage.js
+0
-1
LoginPromptPanel.js
src/sidebar/components/LoginPromptPanel.js
+0
-1
MarkdownEditor.js
src/sidebar/components/MarkdownEditor.js
+1
-1
MarkdownView.js
src/sidebar/components/MarkdownView.js
+0
-1
Menu.js
src/sidebar/components/Menu.js
+2
-3
MenuItem.js
src/sidebar/components/MenuItem.js
+2
-3
MenuKeyboardNavigation.js
src/sidebar/components/MenuKeyboardNavigation.js
+0
-1
MenuSection.js
src/sidebar/components/MenuSection.js
+3
-3
ModerationBanner.js
src/sidebar/components/ModerationBanner.js
+0
-1
NewNoteBtn.js
src/sidebar/components/NewNoteBtn.js
+0
-1
NotebookFilters.js
src/sidebar/components/NotebookFilters.js
+0
-2
NotebookResultCount.js
src/sidebar/components/NotebookResultCount.js
+0
-2
NotebookView.js
src/sidebar/components/NotebookView.js
+0
-1
SearchInput.js
src/sidebar/components/SearchInput.js
+0
-1
SelectionTabs.js
src/sidebar/components/SelectionTabs.js
+0
-1
ShareAnnotationsPanel.js
src/sidebar/components/ShareAnnotationsPanel.js
+2
-3
ShareLinks.js
src/sidebar/components/ShareLinks.js
+0
-1
SidebarContentError.js
src/sidebar/components/SidebarContentError.js
+0
-1
SidebarPanel.js
src/sidebar/components/SidebarPanel.js
+0
-1
SidebarView.js
src/sidebar/components/SidebarView.js
+0
-1
Slider.js
src/sidebar/components/Slider.js
+0
-1
SortMenu.js
src/sidebar/components/SortMenu.js
+0
-1
Spinner.js
src/sidebar/components/Spinner.js
+0
-2
StreamSearchInput.js
src/sidebar/components/StreamSearchInput.js
+0
-1
StreamView.js
src/sidebar/components/StreamView.js
+0
-1
TagEditor.js
src/sidebar/components/TagEditor.js
+0
-1
TagList.js
src/sidebar/components/TagList.js
+0
-1
Thread.js
src/sidebar/components/Thread.js
+2
-3
ThreadCard.js
src/sidebar/components/ThreadCard.js
+0
-1
ThreadList.js
src/sidebar/components/ThreadList.js
+0
-1
ToastMessages.js
src/sidebar/components/ToastMessages.js
+0
-1
TopBar.js
src/sidebar/components/TopBar.js
+2
-3
Tutorial.js
src/sidebar/components/Tutorial.js
+0
-1
UserMenu.js
src/sidebar/components/UserMenu.js
+0
-1
VersionInfo.js
src/sidebar/components/VersionInfo.js
+0
-1
use-filter-options-test.js
src/sidebar/components/hooks/test/use-filter-options-test.js
+0
-1
use-root-thread-test.js
src/sidebar/components/hooks/test/use-root-thread-test.js
+0
-1
Annotation-test.js
src/sidebar/components/test/Annotation-test.js
+0
-1
AnnotationActionBar-test.js
src/sidebar/components/test/AnnotationActionBar-test.js
+0
-1
AnnotationBody-test.js
src/sidebar/components/test/AnnotationBody-test.js
+0
-1
AnnotationDocumentInfo-test.js
src/sidebar/components/test/AnnotationDocumentInfo-test.js
+0
-1
AnnotationEditor-test.js
src/sidebar/components/test/AnnotationEditor-test.js
+0
-1
AnnotationHeader-test.js
src/sidebar/components/test/AnnotationHeader-test.js
+0
-1
AnnotationMissing-test.js
src/sidebar/components/test/AnnotationMissing-test.js
+0
-1
AnnotationPublishControl-test.js
src/sidebar/components/test/AnnotationPublishControl-test.js
+0
-1
AnnotationQuote-test.js
src/sidebar/components/test/AnnotationQuote-test.js
+0
-1
AnnotationReplyToggle-test.js
src/sidebar/components/test/AnnotationReplyToggle-test.js
+0
-1
AnnotationShareControl-test.js
src/sidebar/components/test/AnnotationShareControl-test.js
+0
-1
AnnotationShareInfo-test.js
src/sidebar/components/test/AnnotationShareInfo-test.js
+0
-1
AnnotationTimestamps-test.js
src/sidebar/components/test/AnnotationTimestamps-test.js
+0
-1
AnnotationUser-test.js
src/sidebar/components/test/AnnotationUser-test.js
+0
-1
AnnotationView-test.js
src/sidebar/components/test/AnnotationView-test.js
+0
-1
AutocompletList-test.js
src/sidebar/components/test/AutocompletList-test.js
+0
-1
Button-test.js
src/sidebar/components/test/Button-test.js
+0
-1
Excerpt-test.js
src/sidebar/components/test/Excerpt-test.js
+0
-1
FilterSelect-test.js
src/sidebar/components/test/FilterSelect-test.js
+0
-1
FilterStatus-test.js
src/sidebar/components/test/FilterStatus-test.js
+0
-1
GroupList-test.js
src/sidebar/components/test/GroupList-test.js
+0
-1
GroupListItem-test.js
src/sidebar/components/test/GroupListItem-test.js
+0
-1
GroupListSection-test.js
src/sidebar/components/test/GroupListSection-test.js
+0
-1
HelpPanel-test.js
src/sidebar/components/test/HelpPanel-test.js
+0
-1
HypothesisApp-test.js
src/sidebar/components/test/HypothesisApp-test.js
+0
-1
LoggedOutMessage-test.js
src/sidebar/components/test/LoggedOutMessage-test.js
+0
-1
LoginPromptPanel-test.js
src/sidebar/components/test/LoginPromptPanel-test.js
+0
-1
MarkdownEditor-test.js
src/sidebar/components/test/MarkdownEditor-test.js
+1
-1
MarkdownView-test.js
src/sidebar/components/test/MarkdownView-test.js
+0
-1
Menu-test.js
src/sidebar/components/test/Menu-test.js
+0
-1
MenuItem-test.js
src/sidebar/components/test/MenuItem-test.js
+0
-1
MenuKeyboardNavigation-test.js
src/sidebar/components/test/MenuKeyboardNavigation-test.js
+0
-1
MenuSection-test.js
src/sidebar/components/test/MenuSection-test.js
+0
-1
ModerationBanner-test.js
src/sidebar/components/test/ModerationBanner-test.js
+0
-1
NewNoteBtn-test.js
src/sidebar/components/test/NewNoteBtn-test.js
+0
-1
NotebookFilters-test.js
src/sidebar/components/test/NotebookFilters-test.js
+0
-1
NotebookResultCount-test.js
src/sidebar/components/test/NotebookResultCount-test.js
+0
-1
NotebookView-test.js
src/sidebar/components/test/NotebookView-test.js
+0
-1
SearchInput-test.js
src/sidebar/components/test/SearchInput-test.js
+0
-1
SelectionTabs-test.js
src/sidebar/components/test/SelectionTabs-test.js
+0
-1
ShareAnnotationsPanel-test.js
src/sidebar/components/test/ShareAnnotationsPanel-test.js
+0
-1
ShareLinks-test.js
src/sidebar/components/test/ShareLinks-test.js
+0
-1
SidebarContentError-test.js
src/sidebar/components/test/SidebarContentError-test.js
+0
-1
SidebarPanel-test.js
src/sidebar/components/test/SidebarPanel-test.js
+0
-1
SidebarView-test.js
src/sidebar/components/test/SidebarView-test.js
+0
-1
SortMenu-test.js
src/sidebar/components/test/SortMenu-test.js
+0
-1
Spinner-test.js
src/sidebar/components/test/Spinner-test.js
+0
-1
StreamSearchInput-test.js
src/sidebar/components/test/StreamSearchInput-test.js
+0
-1
StreamView-test.js
src/sidebar/components/test/StreamView-test.js
+0
-1
TagEditor-test.js
src/sidebar/components/test/TagEditor-test.js
+0
-1
TagList-test.js
src/sidebar/components/test/TagList-test.js
+0
-1
Thread-test.js
src/sidebar/components/test/Thread-test.js
+0
-1
ThreadCard-test.js
src/sidebar/components/test/ThreadCard-test.js
+0
-1
ThreadList-test.js
src/sidebar/components/test/ThreadList-test.js
+0
-1
ToastMessages-test.js
src/sidebar/components/test/ToastMessages-test.js
+0
-1
TopBar-test.js
src/sidebar/components/test/TopBar-test.js
+0
-1
Tutorial-test.js
src/sidebar/components/test/Tutorial-test.js
+0
-1
UserMenu-test.js
src/sidebar/components/test/UserMenu-test.js
+0
-1
VersionInfo-test.js
src/sidebar/components/test/VersionInfo-test.js
+0
-1
slider-test.js
src/sidebar/components/test/slider-test.js
+0
-1
index.js
src/sidebar/index.js
+1
-1
service-context.js
src/sidebar/service-context.js
+1
-1
use-store-test.js
src/sidebar/store/test/use-store-test.js
+0
-1
threading-test.js
src/sidebar/test/integration/threading-test.js
+0
-1
service-context-test.js
src/sidebar/test/service-context-test.js
+1
-1
No files found.
frontend-shared/src/hooks/test/use-element-should-close-test.js
View file @
bd5b2de0
import
{
mount
}
from
'enzyme'
;
import
{
createElement
}
from
'preact'
;
import
{
useRef
}
from
'preact/hooks'
;
import
{
act
}
from
'preact/test-utils'
;
...
...
frontend-shared/src/svg-icon.js
View file @
bd5b2de0
import
classnames
from
'classnames'
;
import
{
createElement
}
from
'preact'
;
import
{
useLayoutEffect
,
useRef
}
from
'preact/hooks'
;
import
propTypes
from
'prop-types'
;
...
...
frontend-shared/src/test/svg-icon-test.js
View file @
bd5b2de0
import
{
createElement
,
render
}
from
'preact'
;
import
{
render
}
from
'preact'
;
import
{
SvgIcon
,
availableIcons
,
registerIcons
}
from
'../svg-icon'
;
...
...
src/annotator/adder.js
View file @
bd5b2de0
import
{
createElement
,
render
}
from
'preact'
;
import
{
render
}
from
'preact'
;
import
AdderToolbar
from
'./components/adder-toolbar'
;
import
{
isTouchDevice
}
from
'../shared/user-agent'
;
...
...
src/annotator/components/adder-toolbar.js
View file @
bd5b2de0
import
classnames
from
'classnames'
;
import
{
SvgIcon
}
from
'@hypothesis/frontend-shared'
;
import
{
createElement
}
from
'preact'
;
import
propTypes
from
'prop-types'
;
import
{
useShortcut
}
from
'../../shared/shortcut'
;
...
...
src/annotator/components/buckets.js
View file @
bd5b2de0
import
{
createElement
}
from
'preact'
;
import
classnames
from
'classnames'
;
import
propTypes
from
'prop-types'
;
import
scrollIntoView
from
'scroll-into-view'
;
...
...
src/annotator/components/test/buckets-test.js
View file @
bd5b2de0
import
{
mount
}
from
'enzyme'
;
import
{
createElement
}
from
'preact'
;
import
{
checkAccessibility
}
from
'../../../test-util/accessibility'
;
...
...
src/annotator/components/test/toolbar-test.js
View file @
bd5b2de0
import
{
mount
}
from
'enzyme'
;
import
{
createElement
}
from
'preact'
;
import
Toolbar
from
'../toolbar'
;
...
...
src/annotator/components/toolbar.js
View file @
bd5b2de0
import
{
SvgIcon
}
from
'@hypothesis/frontend-shared'
;
import
propTypes
from
'prop-types'
;
import
{
createElement
}
from
'preact'
;
/**
* @param {Object} props
...
...
src/annotator/plugin/bucket-bar.js
View file @
bd5b2de0
import
Delegator
from
'../delegator'
;
import
{
createElement
,
render
}
from
'preact'
;
import
{
render
}
from
'preact'
;
import
Buckets
from
'../components/buckets'
;
import
{
anchorBuckets
}
from
'../util/buckets'
;
...
...
src/annotator/plugin/pdf.js
View file @
bd5b2de0
import
{
SvgIcon
}
from
'@hypothesis/frontend-shared'
;
import
debounce
from
'lodash.debounce'
;
import
{
Fragment
,
createElement
,
render
}
from
'preact'
;
import
{
render
}
from
'preact'
;
import
*
as
pdfAnchoring
from
'../anchoring/pdf'
;
import
Delegator
from
'../delegator'
;
...
...
@@ -20,7 +20,7 @@ import PDFMetadata from './pdf-metadata';
*/
function
WarningBanner
()
{
return
(
<
Fragment
>
<>
<
div
className
=
"annotator-pdf-warning-banner__type"
>
<
SvgIcon
name
=
"caution"
...
...
@@ -38,7 +38,7 @@ function WarningBanner() {
<
/a>{' '
}
in
order
to
annotate
with
Hypothesis
.
<
/div
>
<
/
Fragment
>
<
/
>
);
}
...
...
src/annotator/test/adder-test.js
View file @
bd5b2de0
import
{
act
}
from
'preact/test-utils'
;
import
{
createElement
}
from
'preact'
;
import
{
mount
}
from
'enzyme'
;
import
{
...
...
src/annotator/test/highlighter-test.js
View file @
bd5b2de0
import
{
createElement
,
render
}
from
'preact'
;
import
{
render
}
from
'preact'
;
import
{
getBoundingClientRect
,
...
...
src/annotator/toolbar.js
View file @
bd5b2de0
import
{
create
Element
,
create
Ref
,
render
}
from
'preact'
;
import
{
createRef
,
render
}
from
'preact'
;
import
Toolbar
from
'./components/toolbar'
;
...
...
src/shared/test/renderer-options-test.js
View file @
bd5b2de0
import
{
createElement
}
from
'preact'
;
import
{
setupBrowserFixes
}
from
'../renderer-options'
;
describe
(
'shared/renderer-options'
,
()
=>
{
...
...
src/shared/test/shortcut-test.js
View file @
bd5b2de0
import
{
createElement
,
render
}
from
'preact'
;
import
{
render
}
from
'preact'
;
import
{
act
}
from
'preact/test-utils'
;
import
{
matchShortcut
,
installShortcut
,
useShortcut
}
from
'../shortcut'
;
...
...
src/sidebar/components/Annotation.js
View file @
bd5b2de0
import
classnames
from
'classnames'
;
import
{
createElement
}
from
'preact'
;
import
propTypes
from
'prop-types'
;
import
{
useStoreProxy
}
from
'../store/use-store'
;
...
...
src/sidebar/components/AnnotationActionBar.js
View file @
bd5b2de0
import
{
createElement
}
from
'preact'
;
import
propTypes
from
'prop-types'
;
import
{
useStoreProxy
}
from
'../store/use-store'
;
...
...
src/sidebar/components/AnnotationBody.js
View file @
bd5b2de0
import
{
createElement
}
from
'preact'
;
import
{
useState
}
from
'preact/hooks'
;
import
propTypes
from
'prop-types'
;
...
...
src/sidebar/components/AnnotationDocumentInfo.js
View file @
bd5b2de0
import
{
createElement
}
from
'preact'
;
import
propTypes
from
'prop-types'
;
import
*
as
annotationMetadata
from
'../helpers/annotation-metadata'
;
...
...
src/sidebar/components/AnnotationEditor.js
View file @
bd5b2de0
import
{
normalizeKeyName
}
from
'@hypothesis/frontend-shared'
;
import
{
createElement
}
from
'preact'
;
import
{
useState
}
from
'preact/hooks'
;
import
propTypes
from
'prop-types'
;
...
...
src/sidebar/components/AnnotationHeader.js
View file @
bd5b2de0
import
{
SvgIcon
}
from
'@hypothesis/frontend-shared'
;
import
{
createElement
}
from
'preact'
;
import
{
useMemo
}
from
'preact/hooks'
;
import
propTypes
from
'prop-types'
;
...
...
src/sidebar/components/AnnotationLicense.js
View file @
bd5b2de0
import
{
SvgIcon
}
from
'@hypothesis/frontend-shared'
;
import
{
createElement
}
from
'preact'
;
/**
* Render information about CC licensing
...
...
src/sidebar/components/AnnotationMissing.js
View file @
bd5b2de0
import
classnames
from
'classnames'
;
import
{
createElement
}
from
'preact'
;
import
propTypes
from
'prop-types'
;
import
AnnotationReplyToggle
from
'./AnnotationReplyToggle'
;
...
...
src/sidebar/components/AnnotationPublishControl.js
View file @
bd5b2de0
import
{
SvgIcon
}
from
'@hypothesis/frontend-shared'
;
import
{
createElement
}
from
'preact'
;
import
propTypes
from
'prop-types'
;
import
{
useStoreProxy
}
from
'../store/use-store'
;
...
...
src/sidebar/components/AnnotationQuote.js
View file @
bd5b2de0
import
classnames
from
'classnames'
;
import
{
createElement
}
from
'preact'
;
import
propTypes
from
'prop-types'
;
import
{
isOrphan
,
quote
}
from
'../helpers/annotation-metadata'
;
...
...
src/sidebar/components/AnnotationReplyToggle.js
View file @
bd5b2de0
import
{
createElement
}
from
'preact'
;
import
propTypes
from
'prop-types'
;
import
Button
from
'./Button'
;
...
...
src/sidebar/components/AnnotationShareControl.js
View file @
bd5b2de0
import
{
SvgIcon
,
useElementShouldClose
}
from
'@hypothesis/frontend-shared'
;
import
{
createElement
}
from
'preact'
;
import
{
useEffect
,
useRef
,
useState
}
from
'preact/hooks'
;
import
propTypes
from
'prop-types'
;
...
...
src/sidebar/components/AnnotationShareInfo.js
View file @
bd5b2de0
import
{
SvgIcon
}
from
'@hypothesis/frontend-shared'
;
import
{
createElement
}
from
'preact'
;
import
propTypes
from
'prop-types'
;
import
{
useStoreProxy
}
from
'../store/use-store'
;
...
...
src/sidebar/components/AnnotationTimestamps.js
View file @
bd5b2de0
import
{
createElement
}
from
'preact'
;
import
{
useEffect
,
useMemo
,
useState
}
from
'preact/hooks'
;
import
propTypes
from
'prop-types'
;
...
...
src/sidebar/components/AnnotationUser.js
View file @
bd5b2de0
import
{
createElement
}
from
'preact'
;
import
propTypes
from
'prop-types'
;
import
{
isThirdPartyUser
,
username
}
from
'../helpers/account-id'
;
...
...
src/sidebar/components/AnnotationView.js
View file @
bd5b2de0
import
{
Fragment
,
createElement
}
from
'preact'
;
import
{
useEffect
,
useState
}
from
'preact/hooks'
;
import
propTypes
from
'prop-types'
;
...
...
@@ -82,7 +81,7 @@ function AnnotationView({ loadAnnotationsService, onLogin }) {
]);
return
(
<
Fragment
>
<>
{
fetchError
&&
(
// This is the same error shown if a direct-linked annotation cannot
// be fetched in the sidebar. Fortunately the error message makes sense
...
...
@@ -90,7 +89,7 @@ function AnnotationView({ loadAnnotationsService, onLogin }) {
<
SidebarContentError
errorType
=
"annotation"
onLoginRequest
=
{
onLogin
}
/
>
)}
<
ThreadList
thread
=
{
rootThread
}
/
>
<
/
Fragment
>
<
/
>
);
}
...
...
src/sidebar/components/AutocompleteList.js
View file @
bd5b2de0
import
{
createElement
}
from
'preact'
;
import
classnames
from
'classnames'
;
import
{
useMemo
}
from
'preact/hooks'
;
import
propTypes
from
'prop-types'
;
...
...
src/sidebar/components/Button.js
View file @
bd5b2de0
import
{
SvgIcon
}
from
'@hypothesis/frontend-shared'
;
import
{
createElement
}
from
'preact'
;
import
propTypes
from
'prop-types'
;
/**
...
...
src/sidebar/components/Excerpt.js
View file @
bd5b2de0
import
classnames
from
'classnames'
;
import
{
createElement
}
from
'preact'
;
import
{
useCallback
,
useLayoutEffect
,
useRef
,
useState
}
from
'preact/hooks'
;
import
propTypes
from
'prop-types'
;
...
...
src/sidebar/components/FilterSelect.js
View file @
bd5b2de0
import
{
SvgIcon
}
from
'@hypothesis/frontend-shared'
;
import
{
createElement
}
from
'preact'
;
import
propTypes
from
'prop-types'
;
import
Menu
from
'./Menu'
;
...
...
src/sidebar/components/FilterStatus.js
View file @
bd5b2de0
import
{
createElement
}
from
'preact'
;
import
{
useMemo
}
from
'preact/hooks'
;
import
propTypes
from
'prop-types'
;
...
...
src/sidebar/components/GroupList.js
View file @
bd5b2de0
import
{
createElement
}
from
'preact'
;
import
{
useMemo
,
useState
}
from
'preact/hooks'
;
import
propTypes
from
'prop-types'
;
...
...
src/sidebar/components/GroupListItem.js
View file @
bd5b2de0
import
{
Fragment
,
createElement
}
from
'preact'
;
import
propTypes
from
'prop-types'
;
import
{
useStoreProxy
}
from
'../store/use-store'
;
...
...
@@ -105,7 +104,7 @@ function GroupListItem({
onClick
=
{
isSelectable
?
focusGroup
:
toggleSubmenu
}
onToggleSubmenu
=
{
toggleSubmenu
}
submenu
=
{
<
Fragment
>
<>
<
ul
>
{
activityUrl
&&
(
<
li
>
...
...
@@ -143,7 +142,7 @@ function GroupListItem({
This
group
is
restricted
to
specific
URLs
.
<
/p
>
)}
<
/
Fragment
>
<
/
>
}
/
>
);
...
...
src/sidebar/components/GroupListSection.js
View file @
bd5b2de0
import
{
createElement
}
from
'preact'
;
import
propTypes
from
'prop-types'
;
import
GroupListItem
from
'./GroupListItem'
;
...
...
src/sidebar/components/HelpPanel.js
View file @
bd5b2de0
import
{
SvgIcon
}
from
'@hypothesis/frontend-shared'
;
import
{
createElement
}
from
'preact'
;
import
{
useCallback
,
useMemo
,
useState
}
from
'preact/hooks'
;
import
propTypes
from
'prop-types'
;
...
...
src/sidebar/components/HypothesisApp.js
View file @
bd5b2de0
import
classnames
from
'classnames'
;
import
{
createElement
}
from
'preact'
;
import
{
useEffect
,
useMemo
}
from
'preact/hooks'
;
import
propTypes
from
'prop-types'
;
...
...
src/sidebar/components/LoggedOutMessage.js
View file @
bd5b2de0
import
{
SvgIcon
}
from
'@hypothesis/frontend-shared'
;
import
{
createElement
}
from
'preact'
;
import
propTypes
from
'prop-types'
;
import
{
withServices
}
from
'../service-context'
;
...
...
src/sidebar/components/LoginPromptPanel.js
View file @
bd5b2de0
import
{
createElement
}
from
'preact'
;
import
propTypes
from
'prop-types'
;
import
{
useStoreProxy
}
from
'../store/use-store'
;
...
...
src/sidebar/components/MarkdownEditor.js
View file @
bd5b2de0
import
classnames
from
'classnames'
;
import
{
SvgIcon
,
normalizeKeyName
}
from
'@hypothesis/frontend-shared'
;
import
{
create
Element
,
create
Ref
}
from
'preact'
;
import
{
createRef
}
from
'preact'
;
import
{
useEffect
,
useMemo
,
useRef
,
useState
}
from
'preact/hooks'
;
import
propTypes
from
'prop-types'
;
...
...
src/sidebar/components/MarkdownView.js
View file @
bd5b2de0
import
classnames
from
'classnames'
;
import
{
createElement
}
from
'preact'
;
import
{
useEffect
,
useMemo
,
useRef
}
from
'preact/hooks'
;
import
propTypes
from
'prop-types'
;
...
...
src/sidebar/components/Menu.js
View file @
bd5b2de0
...
...
@@ -4,7 +4,6 @@ import {
normalizeKeyName
,
useElementShouldClose
,
}
from
'@hypothesis/frontend-shared'
;
import
{
Fragment
,
createElement
}
from
'preact'
;
import
{
useCallback
,
useEffect
,
useRef
,
useState
}
from
'preact/hooks'
;
import
propTypes
from
'prop-types'
;
...
...
@@ -186,7 +185,7 @@ export default function Menu({
<
/span
>
<
/button
>
{
isOpen
&&
(
<
Fragment
>
<>
{
menuArrow
(
arrowClass
)}
<
div
className
=
{
classnames
(
...
...
@@ -203,7 +202,7 @@ export default function Menu({
{
children
}
<
/MenuKeyboardNavigation
>
<
/div
>
<
/
Fragment
>
<
/
>
)}
<
/div
>
);
...
...
src/sidebar/components/MenuItem.js
View file @
bd5b2de0
import
classnames
from
'classnames'
;
import
{
SvgIcon
,
normalizeKeyName
}
from
'@hypothesis/frontend-shared'
;
import
{
Fragment
,
createElement
}
from
'preact'
;
import
{
useEffect
,
useRef
}
from
'preact/hooks'
;
import
propTypes
from
'prop-types'
;
...
...
@@ -215,7 +214,7 @@ export default function MenuItem({
);
}
return
(
<
Fragment
>
<>
{
menuItem
}
{
hasSubmenuVisible
&&
(
<
Slider
visible
=
{
/** @type {boolean} */
(
isSubmenuVisible
)}
>
...
...
@@ -228,7 +227,7 @@ export default function MenuItem({
<
/MenuKeyboardNavigation
>
<
/Slider
>
)}
<
/
Fragment
>
<
/
>
);
}
...
...
src/sidebar/components/MenuKeyboardNavigation.js
View file @
bd5b2de0
import
{
normalizeKeyName
}
from
'@hypothesis/frontend-shared'
;
import
{
createElement
}
from
'preact'
;
import
{
useEffect
,
useRef
}
from
'preact/hooks'
;
import
propTypes
from
'prop-types'
;
...
...
src/sidebar/components/MenuSection.js
View file @
bd5b2de0
import
{
Fragment
,
createElement
,
toChildArray
}
from
'preact'
;
import
{
toChildArray
}
from
'preact'
;
import
propTypes
from
'prop-types'
;
/** @typedef {import("preact").JSX.Element} JSXElement */
...
...
@@ -28,14 +28,14 @@ import propTypes from 'prop-types';
*/
export
default
function
MenuSection
({
heading
,
children
})
{
return
(
<
Fragment
>
<>
{
heading
&&
<
h2
className
=
"MenuSection__heading"
>
{
heading
}
<
/h2>
}
<
ul
className
=
"MenuSection__content"
>
{
toChildArray
(
children
).
map
(
child
=>
(
<
li
key
=
{
/** @type {JSXElement} **/
(
child
).
key
}
>
{
child
}
<
/li
>
))}
<
/ul
>
<
/
Fragment
>
<
/
>
);
}
...
...
src/sidebar/components/ModerationBanner.js
View file @
bd5b2de0
import
classnames
from
'classnames'
;
import
{
createElement
}
from
'preact'
;
import
propTypes
from
'prop-types'
;
import
{
useStoreProxy
}
from
'../store/use-store'
;
...
...
src/sidebar/components/NewNoteBtn.js
View file @
bd5b2de0
import
{
createElement
}
from
'preact'
;
import
propTypes
from
'prop-types'
;
import
{
useStoreProxy
}
from
'../store/use-store'
;
...
...
src/sidebar/components/NotebookFilters.js
View file @
bd5b2de0
import
{
createElement
}
from
'preact'
;
import
{
useStoreProxy
}
from
'../store/use-store'
;
import
{
useUserFilterOptions
}
from
'./hooks/use-filter-options'
;
...
...
src/sidebar/components/NotebookResultCount.js
View file @
bd5b2de0
import
{
createElement
}
from
'preact'
;
import
useRootThread
from
'./hooks/use-root-thread'
;
import
{
useStoreProxy
}
from
'../store/use-store'
;
import
{
countVisible
}
from
'../helpers/thread'
;
...
...
src/sidebar/components/NotebookView.js
View file @
bd5b2de0
import
{
createElement
}
from
'preact'
;
import
{
useEffect
}
from
'preact/hooks'
;
import
propTypes
from
'prop-types'
;
...
...
src/sidebar/components/SearchInput.js
View file @
bd5b2de0
import
classnames
from
'classnames'
;
import
{
createElement
}
from
'preact'
;
import
{
useRef
,
useState
}
from
'preact/hooks'
;
import
propTypes
from
'prop-types'
;
...
...
src/sidebar/components/SelectionTabs.js
View file @
bd5b2de0
import
classnames
from
'classnames'
;
import
{
SvgIcon
}
from
'@hypothesis/frontend-shared'
;
import
{
createElement
}
from
'preact'
;
import
propTypes
from
'prop-types'
;
import
{
useStoreProxy
}
from
'../store/use-store'
;
...
...
src/sidebar/components/ShareAnnotationsPanel.js
View file @
bd5b2de0
import
{
createElement
,
Fragment
}
from
'preact'
;
import
{
SvgIcon
}
from
'@hypothesis/frontend-shared'
;
import
propTypes
from
'prop-types'
;
...
...
@@ -62,7 +61,7 @@ function ShareAnnotationsPanel({ analytics, toastMessenger }) {
{
sharingReady
&&
(
<
div
className
=
"ShareAnnotationsPanel"
>
{
shareURI
?
(
<
Fragment
>
<>
<
div
className
=
"ShareAnnotationsPanel__intro"
>
{
notNull
(
focusedGroup
).
type
===
'private'
?
(
<
p
>
...
...
@@ -111,7 +110,7 @@ function ShareAnnotationsPanel({ analytics, toastMessenger }) {
shareURI
=
{
shareURI
}
analyticsEventName
=
{
analytics
.
events
.
DOCUMENT_SHARED
}
/
>
<
/
Fragment
>
<
/
>
)
:
(
<
p
>
These
annotations
cannot
be
shared
because
this
document
is
not
...
...
src/sidebar/components/ShareLinks.js
View file @
bd5b2de0
import
{
SvgIcon
}
from
'@hypothesis/frontend-shared'
;
import
{
createElement
}
from
'preact'
;
import
propTypes
from
'prop-types'
;
import
{
withServices
}
from
'../service-context'
;
...
...
src/sidebar/components/SidebarContentError.js
View file @
bd5b2de0
import
{
SvgIcon
}
from
'@hypothesis/frontend-shared'
;
import
{
createElement
}
from
'preact'
;
import
classnames
from
'classnames'
;
import
propTypes
from
'prop-types'
;
...
...
src/sidebar/components/SidebarPanel.js
View file @
bd5b2de0
import
{
SvgIcon
}
from
'@hypothesis/frontend-shared'
;
import
{
createElement
}
from
'preact'
;
import
{
useEffect
,
useRef
}
from
'preact/hooks'
;
import
propTypes
from
'prop-types'
;
import
scrollIntoView
from
'scroll-into-view'
;
...
...
src/sidebar/components/SidebarView.js
View file @
bd5b2de0
import
{
createElement
}
from
'preact'
;
import
propTypes
from
'prop-types'
;
import
{
useEffect
,
useRef
}
from
'preact/hooks'
;
...
...
src/sidebar/components/Slider.js
View file @
bd5b2de0
import
{
createElement
}
from
'preact'
;
import
{
useCallback
,
useEffect
,
useRef
,
useState
}
from
'preact/hooks'
;
import
propTypes
from
'prop-types'
;
...
...
src/sidebar/components/SortMenu.js
View file @
bd5b2de0
import
{
SvgIcon
}
from
'@hypothesis/frontend-shared'
;
import
{
createElement
}
from
'preact'
;
import
{
useStoreProxy
}
from
'../store/use-store'
;
...
...
src/sidebar/components/Spinner.js
View file @
bd5b2de0
import
{
createElement
}
from
'preact'
;
/**
* Loading indicator.
*/
...
...
src/sidebar/components/StreamSearchInput.js
View file @
bd5b2de0
import
{
createElement
}
from
'preact'
;
import
propTypes
from
'prop-types'
;
import
{
useStoreProxy
}
from
'../store/use-store'
;
...
...
src/sidebar/components/StreamView.js
View file @
bd5b2de0
import
{
createElement
}
from
'preact'
;
import
{
useCallback
,
useEffect
}
from
'preact/hooks'
;
import
propTypes
from
'prop-types'
;
...
...
src/sidebar/components/TagEditor.js
View file @
bd5b2de0
...
...
@@ -3,7 +3,6 @@ import {
normalizeKeyName
,
useElementShouldClose
,
}
from
'@hypothesis/frontend-shared'
;
import
{
createElement
}
from
'preact'
;
import
{
useRef
,
useState
}
from
'preact/hooks'
;
import
propTypes
from
'prop-types'
;
...
...
src/sidebar/components/TagList.js
View file @
bd5b2de0
import
{
createElement
}
from
'preact'
;
import
{
useMemo
}
from
'preact/hooks'
;
import
propTypes
from
'prop-types'
;
...
...
src/sidebar/components/Thread.js
View file @
bd5b2de0
import
classnames
from
'classnames'
;
import
{
createElement
,
Fragment
}
from
'preact'
;
import
{
useCallback
,
useMemo
}
from
'preact/hooks'
;
import
propTypes
from
'prop-types'
;
...
...
@@ -64,7 +63,7 @@ function Thread({ showDocumentInfo = false, thread, threadsService }) {
const
annotationContent
=
useMemo
(()
=>
{
if
(
showAnnotation
)
{
return
(
<
Fragment
>
<>
<
ModerationBanner
annotation
=
{
thread
.
annotation
}
/
>
<
Annotation
annotation
=
{
thread
.
annotation
}
...
...
@@ -75,7 +74,7 @@ function Thread({ showDocumentInfo = false, thread, threadsService }) {
showDocumentInfo
=
{
showDocumentInfo
}
threadIsCollapsed
=
{
thread
.
collapsed
}
/
>
<
/
Fragment
>
<
/
>
);
}
else
if
(
showMissingAnnotation
)
{
return
(
...
...
src/sidebar/components/ThreadCard.js
View file @
bd5b2de0
import
classnames
from
'classnames'
;
import
debounce
from
'lodash.debounce'
;
import
{
createElement
}
from
'preact'
;
import
{
useCallback
,
useMemo
}
from
'preact/hooks'
;
import
propTypes
from
'prop-types'
;
...
...
src/sidebar/components/ThreadList.js
View file @
bd5b2de0
import
{
createElement
}
from
'preact'
;
import
{
useEffect
,
useLayoutEffect
,
useMemo
,
useState
}
from
'preact/hooks'
;
import
propTypes
from
'prop-types'
;
import
debounce
from
'lodash.debounce'
;
...
...
src/sidebar/components/ToastMessages.js
View file @
bd5b2de0
import
classnames
from
'classnames'
;
import
{
SvgIcon
}
from
'@hypothesis/frontend-shared'
;
import
{
createElement
}
from
'preact'
;
import
propTypes
from
'prop-types'
;
import
{
useStoreProxy
}
from
'../store/use-store'
;
...
...
src/sidebar/components/TopBar.js
View file @
bd5b2de0
import
{
Fragment
,
createElement
}
from
'preact'
;
import
propTypes
from
'prop-types'
;
import
bridgeEvents
from
'../../shared/bridge-events'
;
...
...
@@ -79,7 +78,7 @@ function TopBar({
};
const
loginControl
=
(
<
Fragment
>
<>
{
auth
.
status
===
'unknown'
&&
(
<
span
className
=
"TopBar__login-links"
>
⋯
<
/span
>
)}
...
...
@@ -103,7 +102,7 @@ function TopBar({
{
auth
.
status
===
'logged-in'
&&
(
<
UserMenu
auth
=
{
auth
}
onLogout
=
{
onLogout
}
/
>
)}
<
/
Fragment
>
<
/
>
);
return
(
...
...
src/sidebar/components/Tutorial.js
View file @
bd5b2de0
import
{
SvgIcon
}
from
'@hypothesis/frontend-shared'
;
import
{
createElement
}
from
'preact'
;
import
propTypes
from
'prop-types'
;
import
isThirdPartyService
from
'../helpers/is-third-party-service'
;
...
...
src/sidebar/components/UserMenu.js
View file @
bd5b2de0
import
{
SvgIcon
}
from
'@hypothesis/frontend-shared'
;
import
{
createElement
}
from
'preact'
;
import
propTypes
from
'prop-types'
;
import
bridgeEvents
from
'../../shared/bridge-events'
;
...
...
src/sidebar/components/VersionInfo.js
View file @
bd5b2de0
import
{
createElement
}
from
'preact'
;
import
propTypes
from
'prop-types'
;
import
{
copyText
}
from
'../util/copy-to-clipboard'
;
...
...
src/sidebar/components/hooks/test/use-filter-options-test.js
View file @
bd5b2de0
import
{
mount
}
from
'enzyme'
;
import
{
createElement
}
from
'preact'
;
import
{
useUserFilterOptions
}
from
'../use-filter-options'
;
import
{
$imports
}
from
'../use-filter-options'
;
...
...
src/sidebar/components/hooks/test/use-root-thread-test.js
View file @
bd5b2de0
import
{
mount
}
from
'enzyme'
;
import
{
createElement
}
from
'preact'
;
import
useRootThread
from
'../use-root-thread'
;
import
{
$imports
}
from
'../use-root-thread'
;
...
...
src/sidebar/components/test/Annotation-test.js
View file @
bd5b2de0
import
{
mount
}
from
'enzyme'
;
import
{
createElement
}
from
'preact'
;
import
*
as
fixtures
from
'../../test/annotation-fixtures'
;
...
...
src/sidebar/components/test/AnnotationActionBar-test.js
View file @
bd5b2de0
import
{
mount
}
from
'enzyme'
;
import
{
createElement
}
from
'preact'
;
import
{
act
}
from
'preact/test-utils'
;
import
AnnotationActionBar
from
'../AnnotationActionBar'
;
...
...
src/sidebar/components/test/AnnotationBody-test.js
View file @
bd5b2de0
import
{
mount
}
from
'enzyme'
;
import
{
createElement
}
from
'preact'
;
import
{
act
}
from
'preact/test-utils'
;
import
*
as
fixtures
from
'../../test/annotation-fixtures'
;
...
...
src/sidebar/components/test/AnnotationDocumentInfo-test.js
View file @
bd5b2de0
import
{
mount
}
from
'enzyme'
;
import
{
createElement
}
from
'preact'
;
import
*
as
fixtures
from
'../../test/annotation-fixtures'
;
import
AnnotationDocumentInfo
from
'../AnnotationDocumentInfo'
;
...
...
src/sidebar/components/test/AnnotationEditor-test.js
View file @
bd5b2de0
import
{
mount
}
from
'enzyme'
;
import
{
createElement
}
from
'preact'
;
import
{
act
}
from
'preact/test-utils'
;
import
*
as
fixtures
from
'../../test/annotation-fixtures'
;
...
...
src/sidebar/components/test/AnnotationHeader-test.js
View file @
bd5b2de0
import
{
mount
}
from
'enzyme'
;
import
{
createElement
}
from
'preact'
;
import
*
as
fixtures
from
'../../test/annotation-fixtures'
;
import
AnnotationHeader
from
'../AnnotationHeader'
;
...
...
src/sidebar/components/test/AnnotationMissing-test.js
View file @
bd5b2de0
import
{
mount
}
from
'enzyme'
;
import
{
createElement
}
from
'preact'
;
import
AnnotationMissing
,
{
$imports
}
from
'../AnnotationMissing'
;
...
...
src/sidebar/components/test/AnnotationPublishControl-test.js
View file @
bd5b2de0
import
{
mount
}
from
'enzyme'
;
import
{
createElement
}
from
'preact'
;
import
*
as
fixtures
from
'../../test/annotation-fixtures'
;
import
AnnotationPublishControl
from
'../AnnotationPublishControl'
;
...
...
src/sidebar/components/test/AnnotationQuote-test.js
View file @
bd5b2de0
import
{
mount
}
from
'enzyme'
;
import
{
createElement
}
from
'preact'
;
import
AnnotationQuote
from
'../AnnotationQuote'
;
import
{
$imports
}
from
'../AnnotationQuote'
;
...
...
src/sidebar/components/test/AnnotationReplyToggle-test.js
View file @
bd5b2de0
import
{
mount
}
from
'enzyme'
;
import
{
createElement
}
from
'preact'
;
import
{
act
}
from
'preact/test-utils'
;
import
AnnotationReplyToggle
from
'../AnnotationReplyToggle'
;
...
...
src/sidebar/components/test/AnnotationShareControl-test.js
View file @
bd5b2de0
import
{
mount
}
from
'enzyme'
;
import
{
createElement
}
from
'preact'
;
import
{
act
}
from
'preact/test-utils'
;
import
AnnotationShareControl
from
'../AnnotationShareControl'
;
...
...
src/sidebar/components/test/AnnotationShareInfo-test.js
View file @
bd5b2de0
import
{
mount
}
from
'enzyme'
;
import
{
createElement
}
from
'preact'
;
import
*
as
fixtures
from
'../../test/annotation-fixtures'
;
import
AnnotationShareInfo
from
'../AnnotationShareInfo'
;
...
...
src/sidebar/components/test/AnnotationTimestamps-test.js
View file @
bd5b2de0
import
{
mount
}
from
'enzyme'
;
import
{
createElement
}
from
'preact'
;
import
*
as
fixtures
from
'../../test/annotation-fixtures'
;
import
{
act
}
from
'preact/test-utils'
;
...
...
src/sidebar/components/test/AnnotationUser-test.js
View file @
bd5b2de0
import
{
mount
}
from
'enzyme'
;
import
{
createElement
}
from
'preact'
;
import
AnnotationUser
from
'../AnnotationUser'
;
import
{
$imports
}
from
'../AnnotationUser'
;
...
...
src/sidebar/components/test/AnnotationView-test.js
View file @
bd5b2de0
import
{
createElement
}
from
'preact'
;
import
{
mount
}
from
'enzyme'
;
import
{
waitFor
}
from
'../../../test-util/wait'
;
...
...
src/sidebar/components/test/AutocompletList-test.js
View file @
bd5b2de0
import
{
mount
}
from
'enzyme'
;
import
{
createElement
}
from
'preact'
;
import
AutocompleteList
from
'../AutocompleteList'
;
import
{
$imports
}
from
'../AutocompleteList'
;
...
...
src/sidebar/components/test/Button-test.js
View file @
bd5b2de0
import
{
mount
}
from
'enzyme'
;
import
{
createElement
}
from
'preact'
;
import
Button
from
'../Button'
;
import
{
$imports
}
from
'../Button'
;
...
...
src/sidebar/components/test/Excerpt-test.js
View file @
bd5b2de0
import
{
mount
}
from
'enzyme'
;
import
{
createElement
}
from
'preact'
;
import
{
act
}
from
'preact/test-utils'
;
import
Excerpt
from
'../Excerpt'
;
...
...
src/sidebar/components/test/FilterSelect-test.js
View file @
bd5b2de0
import
{
mount
}
from
'enzyme'
;
import
{
createElement
}
from
'preact'
;
import
FilterSelect
from
'../FilterSelect'
;
import
{
$imports
}
from
'../FilterSelect'
;
...
...
src/sidebar/components/test/FilterStatus-test.js
View file @
bd5b2de0
import
{
mount
}
from
'enzyme'
;
import
{
createElement
}
from
'preact'
;
import
FilterStatus
,
{
$imports
}
from
'../FilterStatus'
;
...
...
src/sidebar/components/test/GroupList-test.js
View file @
bd5b2de0
import
{
mount
}
from
'enzyme'
;
import
{
createElement
}
from
'preact'
;
import
{
act
}
from
'preact/test-utils'
;
import
GroupList
from
'../GroupList'
;
...
...
src/sidebar/components/test/GroupListItem-test.js
View file @
bd5b2de0
import
{
mount
}
from
'enzyme'
;
import
{
createElement
}
from
'preact'
;
import
{
act
}
from
'preact/test-utils'
;
import
{
events
}
from
'../../services/analytics'
;
...
...
src/sidebar/components/test/GroupListSection-test.js
View file @
bd5b2de0
import
{
mount
}
from
'enzyme'
;
import
{
createElement
}
from
'preact'
;
import
GroupListSection
from
'../GroupListSection'
;
import
{
$imports
}
from
'../GroupListSection'
;
...
...
src/sidebar/components/test/HelpPanel-test.js
View file @
bd5b2de0
import
{
mount
}
from
'enzyme'
;
import
{
createElement
}
from
'preact'
;
import
{
act
}
from
'preact/test-utils'
;
import
HelpPanel
from
'../HelpPanel'
;
...
...
src/sidebar/components/test/HypothesisApp-test.js
View file @
bd5b2de0
import
{
mount
}
from
'enzyme'
;
import
{
createElement
}
from
'preact'
;
import
bridgeEvents
from
'../../../shared/bridge-events'
;
import
mockImportedComponents
from
'../../../test-util/mock-imported-components'
;
...
...
src/sidebar/components/test/LoggedOutMessage-test.js
View file @
bd5b2de0
import
{
mount
}
from
'enzyme'
;
import
{
createElement
}
from
'preact'
;
import
LoggedOutMessage
from
'../LoggedOutMessage'
;
import
{
$imports
}
from
'../LoggedOutMessage'
;
...
...
src/sidebar/components/test/LoginPromptPanel-test.js
View file @
bd5b2de0
import
{
mount
}
from
'enzyme'
;
import
{
createElement
}
from
'preact'
;
import
LoginPromptPanel
from
'../LoginPromptPanel'
;
import
{
$imports
}
from
'../LoginPromptPanel'
;
...
...
src/sidebar/components/test/MarkdownEditor-test.js
View file @
bd5b2de0
import
{
mount
}
from
'enzyme'
;
import
{
createElement
,
render
}
from
'preact'
;
import
{
render
}
from
'preact'
;
import
{
act
}
from
'preact/test-utils'
;
import
{
LinkType
}
from
'../../markdown-commands'
;
...
...
src/sidebar/components/test/MarkdownView-test.js
View file @
bd5b2de0
import
{
mount
}
from
'enzyme'
;
import
{
createElement
}
from
'preact'
;
import
MarkdownView
from
'../MarkdownView'
;
import
{
$imports
}
from
'../MarkdownView'
;
...
...
src/sidebar/components/test/Menu-test.js
View file @
bd5b2de0
import
{
mount
}
from
'enzyme'
;
import
{
createElement
}
from
'preact'
;
import
{
act
}
from
'preact/test-utils'
;
import
Menu
from
'../Menu'
;
...
...
src/sidebar/components/test/MenuItem-test.js
View file @
bd5b2de0
import
{
mount
}
from
'enzyme'
;
import
{
createElement
}
from
'preact'
;
import
{
act
}
from
'preact/test-utils'
;
import
MenuItem
from
'../MenuItem'
;
...
...
src/sidebar/components/test/MenuKeyboardNavigation-test.js
View file @
bd5b2de0
import
{
mount
}
from
'enzyme'
;
import
{
createElement
}
from
'preact'
;
import
MenuKeyboardNavigation
from
'../MenuKeyboardNavigation'
;
import
{
$imports
}
from
'../MenuKeyboardNavigation'
;
...
...
src/sidebar/components/test/MenuSection-test.js
View file @
bd5b2de0
import
{
mount
}
from
'enzyme'
;
import
{
createElement
}
from
'preact'
;
import
MenuSection
from
'../MenuSection'
;
import
{
$imports
}
from
'../MenuSection'
;
...
...
src/sidebar/components/test/ModerationBanner-test.js
View file @
bd5b2de0
import
{
mount
}
from
'enzyme'
;
import
{
createElement
}
from
'preact'
;
import
*
as
fixtures
from
'../../test/annotation-fixtures'
;
import
ModerationBanner
from
'../ModerationBanner'
;
...
...
src/sidebar/components/test/NewNoteBtn-test.js
View file @
bd5b2de0
import
{
mount
}
from
'enzyme'
;
import
{
createElement
}
from
'preact'
;
import
{
act
}
from
'preact/test-utils'
;
import
NewNoteButton
from
'../NewNoteBtn'
;
...
...
src/sidebar/components/test/NotebookFilters-test.js
View file @
bd5b2de0
import
{
mount
}
from
'enzyme'
;
import
{
createElement
}
from
'preact'
;
import
NotebookFilters
from
'../NotebookFilters'
;
import
{
$imports
}
from
'../NotebookFilters'
;
...
...
src/sidebar/components/test/NotebookResultCount-test.js
View file @
bd5b2de0
import
{
mount
}
from
'enzyme'
;
import
{
createElement
}
from
'preact'
;
import
NotebookResultCount
from
'../NotebookResultCount'
;
import
{
$imports
}
from
'../NotebookResultCount'
;
...
...
src/sidebar/components/test/NotebookView-test.js
View file @
bd5b2de0
import
{
mount
}
from
'enzyme'
;
import
{
createElement
}
from
'preact'
;
import
mockImportedComponents
from
'../../../test-util/mock-imported-components'
;
...
...
src/sidebar/components/test/SearchInput-test.js
View file @
bd5b2de0
import
{
mount
}
from
'enzyme'
;
import
{
createElement
}
from
'preact'
;
import
SearchInput
from
'../SearchInput'
;
import
{
$imports
}
from
'../SearchInput'
;
...
...
src/sidebar/components/test/SelectionTabs-test.js
View file @
bd5b2de0
import
{
mount
}
from
'enzyme'
;
import
{
createElement
}
from
'preact'
;
import
SelectionTabs
from
'../SelectionTabs'
;
import
{
$imports
}
from
'../SelectionTabs'
;
...
...
src/sidebar/components/test/ShareAnnotationsPanel-test.js
View file @
bd5b2de0
import
{
mount
}
from
'enzyme'
;
import
{
createElement
}
from
'preact'
;
import
ShareAnnotationsPanel
from
'../ShareAnnotationsPanel'
;
import
{
$imports
}
from
'../ShareAnnotationsPanel'
;
...
...
src/sidebar/components/test/ShareLinks-test.js
View file @
bd5b2de0
import
{
mount
}
from
'enzyme'
;
import
{
createElement
}
from
'preact'
;
import
ShareLinks
from
'../ShareLinks'
;
import
{
$imports
}
from
'../ShareLinks'
;
...
...
src/sidebar/components/test/SidebarContentError-test.js
View file @
bd5b2de0
import
{
mount
}
from
'enzyme'
;
import
{
createElement
}
from
'preact'
;
import
SidebarContentError
from
'../SidebarContentError'
;
import
{
$imports
}
from
'../SidebarContentError'
;
...
...
src/sidebar/components/test/SidebarPanel-test.js
View file @
bd5b2de0
import
{
mount
}
from
'enzyme'
;
import
{
createElement
}
from
'preact'
;
import
SidebarPanel
from
'../SidebarPanel'
;
import
{
$imports
}
from
'../SidebarPanel'
;
...
...
src/sidebar/components/test/SidebarView-test.js
View file @
bd5b2de0
import
{
mount
}
from
'enzyme'
;
import
{
createElement
}
from
'preact'
;
import
SidebarView
from
'../SidebarView'
;
import
{
$imports
}
from
'../SidebarView'
;
...
...
src/sidebar/components/test/SortMenu-test.js
View file @
bd5b2de0
import
{
mount
}
from
'enzyme'
;
import
{
createElement
}
from
'preact'
;
import
SortMenu
from
'../SortMenu'
;
import
{
$imports
}
from
'../SortMenu'
;
...
...
src/sidebar/components/test/Spinner-test.js
View file @
bd5b2de0
import
{
mount
}
from
'enzyme'
;
import
{
createElement
}
from
'preact'
;
import
Spinner
from
'../Spinner'
;
...
...
src/sidebar/components/test/StreamSearchInput-test.js
View file @
bd5b2de0
import
{
mount
}
from
'enzyme'
;
import
{
createElement
}
from
'preact'
;
import
{
act
}
from
'preact/test-utils'
;
import
StreamSearchInput
from
'../StreamSearchInput'
;
...
...
src/sidebar/components/test/StreamView-test.js
View file @
bd5b2de0
import
{
mount
}
from
'enzyme'
;
import
{
createElement
}
from
'preact'
;
import
mockImportedComponents
from
'../../../test-util/mock-imported-components'
;
import
{
waitFor
}
from
'../../../test-util/wait'
;
...
...
src/sidebar/components/test/TagEditor-test.js
View file @
bd5b2de0
import
{
mount
}
from
'enzyme'
;
import
{
createElement
}
from
'preact'
;
import
{
act
}
from
'preact/test-utils'
;
import
AutocompleteList
from
'../AutocompleteList'
;
...
...
src/sidebar/components/test/TagList-test.js
View file @
bd5b2de0
import
{
mount
}
from
'enzyme'
;
import
{
createElement
}
from
'preact'
;
import
TagList
from
'../TagList'
;
import
{
$imports
}
from
'../TagList'
;
...
...
src/sidebar/components/test/Thread-test.js
View file @
bd5b2de0
import
{
mount
}
from
'enzyme'
;
import
{
createElement
}
from
'preact'
;
import
{
act
}
from
'preact/test-utils'
;
import
Thread
from
'../Thread'
;
...
...
src/sidebar/components/test/ThreadCard-test.js
View file @
bd5b2de0
import
{
mount
}
from
'enzyme'
;
import
{
createElement
}
from
'preact'
;
import
ThreadCard
from
'../ThreadCard'
;
import
{
$imports
}
from
'../ThreadCard'
;
...
...
src/sidebar/components/test/ThreadList-test.js
View file @
bd5b2de0
import
{
mount
}
from
'enzyme'
;
import
{
createElement
}
from
'preact'
;
import
{
act
}
from
'preact/test-utils'
;
import
ThreadList
from
'../ThreadList'
;
...
...
src/sidebar/components/test/ToastMessages-test.js
View file @
bd5b2de0
import
{
mount
}
from
'enzyme'
;
import
{
createElement
}
from
'preact'
;
import
{
act
}
from
'preact/test-utils'
;
import
mockImportedComponents
from
'../../../test-util/mock-imported-components'
;
...
...
src/sidebar/components/test/TopBar-test.js
View file @
bd5b2de0
import
{
mount
}
from
'enzyme'
;
import
{
createElement
}
from
'preact'
;
import
bridgeEvents
from
'../../../shared/bridge-events'
;
import
TopBar
from
'../TopBar'
;
...
...
src/sidebar/components/test/Tutorial-test.js
View file @
bd5b2de0
import
{
mount
}
from
'enzyme'
;
import
{
createElement
}
from
'preact'
;
import
Tutorial
from
'../Tutorial'
;
import
{
$imports
}
from
'../Tutorial'
;
...
...
src/sidebar/components/test/UserMenu-test.js
View file @
bd5b2de0
import
{
mount
}
from
'enzyme'
;
import
{
createElement
}
from
'preact'
;
import
bridgeEvents
from
'../../../shared/bridge-events'
;
import
UserMenu
from
'../UserMenu'
;
...
...
src/sidebar/components/test/VersionInfo-test.js
View file @
bd5b2de0
import
{
mount
}
from
'enzyme'
;
import
{
createElement
}
from
'preact'
;
import
VersionInfo
from
'../VersionInfo'
;
import
{
$imports
}
from
'../VersionInfo'
;
...
...
src/sidebar/components/test/slider-test.js
View file @
bd5b2de0
import
{
mount
}
from
'enzyme'
;
import
{
createElement
}
from
'preact'
;
import
Slider
from
'../Slider'
;
...
...
src/sidebar/index.js
View file @
bd5b2de0
...
...
@@ -99,7 +99,7 @@ import iconSet from './icons';
registerIcons
(
iconSet
);
// The entry point component for the app.
import
{
createElement
,
render
}
from
'preact'
;
import
{
render
}
from
'preact'
;
import
HypothesisApp
from
'./components/HypothesisApp'
;
import
{
ServiceContext
}
from
'./service-context'
;
...
...
src/sidebar/service-context.js
View file @
bd5b2de0
...
...
@@ -12,7 +12,7 @@
* @typedef {import("redux").Store} Store
*/
import
{
createContext
,
createElement
}
from
'preact'
;
import
{
createContext
}
from
'preact'
;
import
{
useContext
}
from
'preact/hooks'
;
/**
...
...
src/sidebar/store/test/use-store-test.js
View file @
bd5b2de0
import
{
mount
}
from
'enzyme'
;
import
{
createElement
}
from
'preact'
;
import
{
act
}
from
'preact/test-utils'
;
import
createStore
from
'../create-store'
;
...
...
src/sidebar/test/integration/threading-test.js
View file @
bd5b2de0
import
{
mount
}
from
'enzyme'
;
import
{
createElement
}
from
'preact'
;
import
{
useReducer
}
from
'preact/hooks'
;
import
{
act
}
from
'preact/test-utils'
;
...
...
src/sidebar/test/service-context-test.js
View file @
bd5b2de0
import
{
mount
}
from
'enzyme'
;
import
{
createElement
,
render
}
from
'preact'
;
import
{
render
}
from
'preact'
;
import
propTypes
from
'prop-types'
;
import
{
ServiceContext
,
withServices
,
useService
}
from
'../service-context'
;
...
...
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