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
56b6769e
Commit
56b6769e
authored
Apr 16, 2021
by
Lyza Danger Gardner
Committed by
Lyza Gardner
Apr 19, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace use of button components with versions in `frontend-shared`
parent
fba6751a
Changes
25
Hide whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
53 additions
and
65 deletions
+53
-65
ButtonPatterns.js
dev-server/ui-playground/components/ButtonPatterns.js
+6
-6
SharedButtonPatterns.js
...ground/shared/components/patterns/SharedButtonPatterns.js
+6
-6
NotebookModal.js
src/annotator/components/NotebookModal.js
+1
-2
ConfirmDialog.js
src/shared/components/ConfirmDialog.js
+2
-2
Dialog.js
src/shared/components/Dialog.js
+4
-3
AnnotationActionBar.js
src/sidebar/components/Annotation/AnnotationActionBar.js
+4
-4
AnnotationBody.js
src/sidebar/components/Annotation/AnnotationBody.js
+1
-2
AnnotationHeader.js
src/sidebar/components/Annotation/AnnotationHeader.js
+1
-3
AnnotationPublishControl.js
...sidebar/components/Annotation/AnnotationPublishControl.js
+1
-3
AnnotationReplyToggle.js
src/sidebar/components/Annotation/AnnotationReplyToggle.js
+1
-1
AnnotationShareControl.js
src/sidebar/components/Annotation/AnnotationShareControl.js
+5
-3
Excerpt.js
src/sidebar/components/Excerpt.js
+1
-2
FilterStatus.js
src/sidebar/components/FilterStatus.js
+3
-3
LoggedOutMessage.js
src/sidebar/components/LoggedOutMessage.js
+1
-3
LoginPromptPanel.js
src/sidebar/components/LoginPromptPanel.js
+2
-1
NotebookView.js
src/sidebar/components/NotebookView.js
+1
-1
PaginationNavigation.js
src/sidebar/components/PaginationNavigation.js
+2
-2
Panel.js
src/sidebar/components/Panel.js
+1
-3
SearchInput.js
src/sidebar/components/SearchInput.js
+1
-1
SelectionTabs.js
src/sidebar/components/SelectionTabs.js
+1
-3
ShareAnnotationsPanel.js
src/sidebar/components/ShareAnnotationsPanel.js
+1
-3
SidebarContentError.js
src/sidebar/components/SidebarContentError.js
+2
-2
Thread.js
src/sidebar/components/Thread.js
+1
-2
TopBar.js
src/sidebar/components/TopBar.js
+2
-2
VersionInfo.js
src/sidebar/components/VersionInfo.js
+2
-2
No files found.
dev-server/ui-playground/components/ButtonPatterns.js
View file @
56b6769e
import
{
IconButton
,
LabeledButton
,
LinkButton
,
}
from
'@hypothesis/frontend-shared'
;
import
{
PatternPage
,
Pattern
,
...
...
@@ -5,12 +11,6 @@ import {
PatternExample
,
}
from
'../shared/components/PatternPage'
;
import
{
IconButton
,
LabeledButton
,
LinkButton
,
}
from
'../../../src/shared/components/buttons'
;
export
default
function
ButtonPatterns
()
{
return
(
<
PatternPage
title
=
"Buttons"
>
...
...
dev-server/ui-playground/shared/components/patterns/SharedButtonPatterns.js
View file @
56b6769e
import
{
IconButton
,
LabeledButton
,
LinkButton
,
}
from
'@hypothesis/frontend-shared'
;
import
{
PatternPage
,
Pattern
,
...
...
@@ -5,12 +11,6 @@ import {
PatternExample
,
}
from
'../PatternPage'
;
import
{
IconButton
,
LabeledButton
,
LinkButton
,
}
from
'../../../../../src/shared/components/buttons'
;
export
default
function
SharedButtonPatterns
()
{
return
(
<
PatternPage
title
=
"Buttons"
>
...
...
src/annotator/components/NotebookModal.js
View file @
56b6769e
import
{
LabeledButton
}
from
'@hypothesis/frontend-shared'
;
import
{
useEffect
,
useRef
,
useState
}
from
'preact/hooks'
;
import
classnames
from
'classnames'
;
import
{
createSidebarConfig
}
from
'../config/sidebar'
;
import
{
LabeledButton
}
from
'../../shared/components/buttons'
;
/**
* @typedef NotebookIframeProps
* @prop {Record<string, any>} config
...
...
src/shared/components/ConfirmDialog.js
View file @
56b6769e
import
Dialog
from
'./Dialog
'
;
import
{
LabeledButton
}
from
'@hypothesis/frontend-shared
'
;
import
{
LabeledButton
}
from
'./buttons
'
;
import
Dialog
from
'./Dialog
'
;
/**
* @typedef ConfirmDialogProps
...
...
src/shared/components/Dialog.js
View file @
56b6769e
import
{
useElementShouldClose
}
from
'@hypothesis/frontend-shared'
;
import
{
LabeledButton
,
useElementShouldClose
,
}
from
'@hypothesis/frontend-shared'
;
import
{
Fragment
}
from
'preact'
;
import
{
useEffect
,
useLayoutEffect
,
useRef
,
useState
}
from
'preact/hooks'
;
import
classNames
from
'classnames'
;
import
{
LabeledButton
}
from
'./buttons'
;
let
idCounter
=
0
;
/**
...
...
src/sidebar/components/Annotation/AnnotationActionBar.js
View file @
56b6769e
import
{
useStoreProxy
}
from
'../../store/use-store'
;
import
{
IconButton
}
from
'@hypothesis/frontend-shared'
;
import
{
confirm
}
from
'../../../shared/prompts'
;
import
{
sharingEnabled
,
annotationSharingLink
,
}
from
'../../helpers/annotation-sharing'
;
import
{
isPrivate
,
permits
}
from
'../../helpers/permissions'
;
import
{
withServices
}
from
'../../service-context'
;
import
{
IconButton
}
from
'../../../shared/components/buttons'
;
import
{
confirm
}
from
'../../../shared/prompts'
;
import
{
useStoreProxy
}
from
'../../store/use-store'
;
import
AnnotationShareControl
from
'./AnnotationShareControl'
;
...
...
src/sidebar/components/Annotation/AnnotationBody.js
View file @
56b6769e
import
{
LabeledButton
}
from
'@hypothesis/frontend-shared'
;
import
{
useState
}
from
'preact/hooks'
;
import
{
useStoreProxy
}
from
'../../store/use-store'
;
...
...
@@ -5,8 +6,6 @@ import { isHidden } from '../../helpers/annotation-metadata';
import
{
withServices
}
from
'../../service-context'
;
import
{
applyTheme
}
from
'../../helpers/theme'
;
import
{
LabeledButton
}
from
'../../../shared/components/buttons'
;
import
Excerpt
from
'../Excerpt'
;
import
MarkdownView
from
'../MarkdownView'
;
import
TagList
from
'../TagList'
;
...
...
src/sidebar/components/Annotation/AnnotationHeader.js
View file @
56b6769e
import
{
SvgIcon
}
from
'@hypothesis/frontend-shared'
;
import
{
SvgIcon
,
LinkButton
}
from
'@hypothesis/frontend-shared'
;
import
{
useMemo
}
from
'preact/hooks'
;
import
{
withServices
}
from
'../../service-context'
;
...
...
@@ -13,8 +13,6 @@ import {
import
{
annotationDisplayName
}
from
'../../helpers/annotation-user'
;
import
{
isPrivate
}
from
'../../helpers/permissions'
;
import
{
LinkButton
}
from
'../../../shared/components/buttons'
;
import
AnnotationDocumentInfo
from
'./AnnotationDocumentInfo'
;
import
AnnotationShareInfo
from
'./AnnotationShareInfo'
;
import
AnnotationTimestamps
from
'./AnnotationTimestamps'
;
...
...
src/sidebar/components/Annotation/AnnotationPublishControl.js
View file @
56b6769e
import
{
SvgIcon
}
from
'@hypothesis/frontend-shared'
;
import
{
LabeledButton
,
SvgIcon
}
from
'@hypothesis/frontend-shared'
;
import
{
useStoreProxy
}
from
'../../store/use-store'
;
import
{
isNew
,
isReply
}
from
'../../helpers/annotation-metadata'
;
...
...
@@ -6,8 +6,6 @@ import { isShared } from '../../helpers/permissions';
import
{
withServices
}
from
'../../service-context'
;
import
{
applyTheme
}
from
'../../helpers/theme'
;
import
{
LabeledButton
}
from
'../../../shared/components/buttons'
;
import
Menu
from
'../Menu'
;
import
MenuItem
from
'../MenuItem'
;
...
...
src/sidebar/components/Annotation/AnnotationReplyToggle.js
View file @
56b6769e
import
{
LinkButton
}
from
'
../../../shared/components/buttons
'
;
import
{
LinkButton
}
from
'
@hypothesis/frontend-shared
'
;
/**
* @typedef AnnotationReplyToggleProps
...
...
src/sidebar/components/Annotation/AnnotationShareControl.js
View file @
56b6769e
import
{
SvgIcon
,
useElementShouldClose
}
from
'@hypothesis/frontend-shared'
;
import
{
IconButton
,
SvgIcon
,
useElementShouldClose
,
}
from
'@hypothesis/frontend-shared'
;
import
{
useEffect
,
useRef
,
useState
}
from
'preact/hooks'
;
import
{
isShareableURI
}
from
'../../helpers/annotation-sharing'
;
...
...
@@ -7,8 +11,6 @@ import { isPrivate } from '../../helpers/permissions';
import
{
withServices
}
from
'../../service-context'
;
import
{
isIOS
}
from
'../../../shared/user-agent'
;
import
{
IconButton
}
from
'../../../shared/components/buttons'
;
import
ShareLinks
from
'../ShareLinks'
;
/**
...
...
src/sidebar/components/Excerpt.js
View file @
56b6769e
import
{
LinkButton
}
from
'@hypothesis/frontend-shared'
;
import
classnames
from
'classnames'
;
import
{
useCallback
,
useLayoutEffect
,
useRef
,
useState
}
from
'preact/hooks'
;
...
...
@@ -5,8 +6,6 @@ import observeElementSize from '../util/observe-element-size';
import
{
withServices
}
from
'../service-context'
;
import
{
applyTheme
}
from
'../helpers/theme'
;
import
{
LinkButton
}
from
'../../shared/components/buttons'
;
/**
* @typedef InlineControlsProps
* @prop {boolean} isCollapsed
...
...
src/sidebar/components/FilterStatus.js
View file @
56b6769e
import
{
LabeledButton
}
from
'@hypothesis/frontend-shared'
;
import
{
useMemo
}
from
'preact/hooks'
;
import
{
countVisible
}
from
'../helpers/thread'
;
import
{
LabeledButton
}
from
'../../shared/components/buttons'
;
import
{
useStoreProxy
}
from
'../store/use-store'
;
import
useRootThread
from
'./hooks/use-root-thread'
;
import
{
useStoreProxy
}
from
'../store/use-store'
;
/**
* @typedef {import('../helpers/build-thread').Thread} Thread
...
...
src/sidebar/components/LoggedOutMessage.js
View file @
56b6769e
import
{
SvgIcon
}
from
'@hypothesis/frontend-shared'
;
import
{
LinkButton
,
SvgIcon
}
from
'@hypothesis/frontend-shared'
;
import
{
withServices
}
from
'../service-context'
;
import
{
LinkButton
}
from
'../../shared/components/buttons'
;
/** @typedef {import('../services/service-url').ServiceUrlGetter} ServiceUrlGetter */
/**
...
...
src/sidebar/components/LoginPromptPanel.js
View file @
56b6769e
import
{
LabeledButton
}
from
'@hypothesis/frontend-shared'
;
import
{
useStoreProxy
}
from
'../store/use-store'
;
import
{
LabeledButton
}
from
'../../shared/components/buttons'
;
import
SidebarPanel
from
'./SidebarPanel'
;
/**
...
...
src/sidebar/components/NotebookView.js
View file @
56b6769e
import
{
IconButton
}
from
'@hypothesis/frontend-shared'
;
import
{
useEffect
,
useLayoutEffect
,
useRef
,
useState
}
from
'preact/hooks'
;
import
scrollIntoView
from
'scroll-into-view'
;
import
{
IconButton
}
from
'../../shared/components/buttons'
;
import
{
ResultSizeError
}
from
'../search-client'
;
import
{
withServices
}
from
'../service-context'
;
import
{
useStoreProxy
}
from
'../store/use-store'
;
...
...
src/sidebar/components/PaginationNavigation.js
View file @
56b6769e
import
{
pageNumberOptions
}
from
'../util/pagination
'
;
import
{
LabeledButton
}
from
'@hypothesis/frontend-shared
'
;
import
{
LabeledButton
}
from
'../../shared/components/buttons
'
;
import
{
pageNumberOptions
}
from
'../util/pagination
'
;
/**
* @typedef PaginationNavigationProps
...
...
src/sidebar/components/Panel.js
View file @
56b6769e
import
{
SvgIcon
}
from
'@hypothesis/frontend-shared'
;
import
{
LabeledButton
}
from
'../../shared/components/buttons'
;
import
{
LabeledButton
,
SvgIcon
}
from
'@hypothesis/frontend-shared'
;
/**
* @typedef PanelProps
...
...
src/sidebar/components/SearchInput.js
View file @
56b6769e
import
{
IconButton
}
from
'@hypothesis/frontend-shared'
;
import
classnames
from
'classnames'
;
import
{
useRef
,
useState
}
from
'preact/hooks'
;
import
{
useStoreProxy
}
from
'../store/use-store'
;
import
{
IconButton
}
from
'../../shared/components/buttons'
;
import
Spinner
from
'./Spinner'
;
/**
...
...
src/sidebar/components/SelectionTabs.js
View file @
56b6769e
import
{
LabeledButton
,
SvgIcon
}
from
'@hypothesis/frontend-shared'
;
import
classnames
from
'classnames'
;
import
{
SvgIcon
}
from
'@hypothesis/frontend-shared'
;
import
{
applyTheme
}
from
'../helpers/theme'
;
import
{
useStoreProxy
}
from
'../store/use-store'
;
import
{
withServices
}
from
'../service-context'
;
import
{
LabeledButton
}
from
'../../shared/components/buttons'
;
/**
* @typedef {import('../../types/config').MergedConfig} MergedConfig
* @typedef {import('../../types/sidebar').TabName} TabName
...
...
src/sidebar/components/ShareAnnotationsPanel.js
View file @
56b6769e
import
{
SvgIcon
}
from
'@hypothesis/frontend-shared'
;
import
{
IconButton
,
SvgIcon
}
from
'@hypothesis/frontend-shared'
;
import
{
useStoreProxy
}
from
'../store/use-store'
;
import
{
pageSharingLink
}
from
'../helpers/annotation-sharing'
;
...
...
@@ -6,8 +6,6 @@ import { copyText } from '../util/copy-to-clipboard';
import
{
withServices
}
from
'../service-context'
;
import
{
notNull
}
from
'../util/typing'
;
import
{
IconButton
}
from
'../../shared/components/buttons'
;
import
ShareLinks
from
'./ShareLinks'
;
import
SidebarPanel
from
'./SidebarPanel'
;
import
Spinner
from
'./Spinner'
;
...
...
src/sidebar/components/SidebarContentError.js
View file @
56b6769e
import
{
useStoreProxy
}
from
'../store/use-store
'
;
import
{
LabeledButton
}
from
'@hypothesis/frontend-shared
'
;
import
{
LabeledButton
}
from
'../../shared/components/buttons
'
;
import
{
useStoreProxy
}
from
'../store/use-store
'
;
import
Panel
from
'./Panel'
;
...
...
src/sidebar/components/Thread.js
View file @
56b6769e
import
{
IconButton
,
LabeledButton
}
from
'@hypothesis/frontend-shared'
;
import
classnames
from
'classnames'
;
import
{
useCallback
,
useMemo
}
from
'preact/hooks'
;
...
...
@@ -5,8 +6,6 @@ import { useStoreProxy } from '../store/use-store';
import
{
withServices
}
from
'../service-context'
;
import
{
countHidden
,
countVisible
}
from
'../helpers/thread'
;
import
{
IconButton
,
LabeledButton
}
from
'../../shared/components/buttons'
;
import
Annotation
from
'./Annotation'
;
import
ModerationBanner
from
'./ModerationBanner'
;
...
...
src/sidebar/components/TopBar.js
View file @
56b6769e
import
{
IconButton
,
LinkButton
}
from
'@hypothesis/frontend-shared'
;
import
bridgeEvents
from
'../../shared/bridge-events'
;
import
serviceConfig
from
'../config/service-config'
;
import
{
useStoreProxy
}
from
'../store/use-store'
;
...
...
@@ -5,8 +7,6 @@ import isThirdPartyService from '../helpers/is-third-party-service';
import
{
withServices
}
from
'../service-context'
;
import
{
applyTheme
}
from
'../helpers/theme'
;
import
{
IconButton
,
LinkButton
}
from
'../../shared/components/buttons'
;
import
GroupList
from
'./GroupList'
;
import
SearchInput
from
'./SearchInput'
;
import
SortMenu
from
'./SortMenu'
;
...
...
src/sidebar/components/VersionInfo.js
View file @
56b6769e
import
{
LabeledButton
}
from
'@hypothesis/frontend-shared'
;
import
{
copyText
}
from
'../util/copy-to-clipboard'
;
import
{
withServices
}
from
'../service-context'
;
import
{
LabeledButton
}
from
'../../shared/components/buttons'
;
/**
* @typedef VersionInfoProps
* @prop {import('../helpers/version-data').default} versionData - Object with version information
...
...
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