File tree Expand file tree Collapse file tree 9 files changed +29
-25
lines changed Expand file tree Collapse file tree 9 files changed +29
-25
lines changed Original file line number Diff line number Diff line change 14
14
"@babel/preset-react" : " ^7.0.0" ,
15
15
"@babel/preset-typescript" : " ^7.16.7" ,
16
16
"@hypothesis/frontend-build" : " ^3.0.0" ,
17
- "@hypothesis/frontend-shared" : " ^8.16 .0" ,
17
+ "@hypothesis/frontend-shared" : " ^9.0 .0" ,
18
18
"@hypothesis/frontend-testing" : " ^1.3.1" ,
19
19
"@npmcli/arborist" : " ^9.0.0" ,
20
20
"@octokit/rest" : " ^21.0.0" ,
Original file line number Diff line number Diff line change 1
1
import {
2
2
LinkButton ,
3
3
HighlightIcon ,
4
- LockIcon ,
4
+ LockFilledIcon ,
5
5
} from '@hypothesis/frontend-shared' ;
6
6
import { useMemo } from 'preact/hooks' ;
7
7
@@ -115,7 +115,7 @@ function AnnotationHeader({
115
115
< header >
116
116
< div className = "flex gap-x-1 items-center flex-wrap-reverse" >
117
117
{ isPrivate ( annotation . permissions ) && ! isEditing && (
118
- < LockIcon
118
+ < LockFilledIcon
119
119
className = "w-[12px] h-[12px]"
120
120
title = "This annotation is visible only to you"
121
121
/>
Original file line number Diff line number Diff line change 3
3
CancelIcon ,
4
4
GlobeIcon ,
5
5
GroupsIcon ,
6
- LockIcon ,
6
+ LockFilledIcon ,
7
7
MenuExpandIcon ,
8
8
} from '@hypothesis/frontend-shared' ;
9
9
import classnames from 'classnames' ;
@@ -116,7 +116,7 @@ function AnnotationPublishControl({
116
116
onClick = { ( ) => onSetPrivate ( false ) }
117
117
/>
118
118
< MenuItem
119
- icon = { LockIcon }
119
+ icon = { LockFilledIcon }
120
120
label = "Only Me"
121
121
isSelected = { isPrivate }
122
122
onClick = { ( ) => onSetPrivate ( true ) }
Original file line number Diff line number Diff line change @@ -104,15 +104,15 @@ describe('AnnotationHeader', () => {
104
104
105
105
const wrapper = createAnnotationHeader ( ) ;
106
106
107
- assert . isTrue ( wrapper . find ( 'LockIcon ' ) . exists ( ) ) ;
107
+ assert . isTrue ( wrapper . find ( 'LockFilledIcon ' ) . exists ( ) ) ;
108
108
} ) ;
109
109
110
110
it ( 'should not render an "Only Me" icon if the annotation is being edited' , ( ) => {
111
111
fakeIsPrivate . returns ( true ) ;
112
112
113
113
const wrapper = createAnnotationHeader ( { isEditing : true } ) ;
114
114
115
- assert . isFalse ( wrapper . find ( 'LockIcon ' ) . exists ( ) ) ;
115
+ assert . isFalse ( wrapper . find ( 'LockFilledIcon ' ) . exists ( ) ) ;
116
116
} ) ;
117
117
118
118
it ( 'should not render an "Only Me" icon if the annotation is not private' , ( ) => {
Original file line number Diff line number Diff line change 1
- import { GlobeIcon , GroupsIcon , LockIcon } from '@hypothesis/frontend-shared' ;
1
+ import {
2
+ GlobeIcon ,
3
+ GroupsIcon ,
4
+ LockFilledIcon ,
5
+ } from '@hypothesis/frontend-shared' ;
2
6
import {
3
7
checkAccessibility ,
4
8
mockImportedComponents ,
@@ -175,7 +179,7 @@ describe('AnnotationPublishControl', () => {
175
179
const wrapper = createAnnotationPublishControl ( ) ;
176
180
const privateMenuItem = wrapper . find ( 'MenuItem' ) . at ( 1 ) ;
177
181
178
- assert . equal ( privateMenuItem . prop ( 'icon' ) , LockIcon ) ;
182
+ assert . equal ( privateMenuItem . prop ( 'icon' ) , LockFilledIcon ) ;
179
183
} ) ;
180
184
181
185
it ( 'should have an "Only me" label' , ( ) => {
Original file line number Diff line number Diff line change @@ -2,10 +2,10 @@ import {
2
2
confirm ,
3
3
CopyIcon ,
4
4
ExternalIcon ,
5
- GlobeAltIcon ,
6
- GlobeAltLockIcon ,
5
+ GlobeIcon ,
6
+ GlobeLockIcon ,
7
7
LeaveIcon ,
8
- LockIcon ,
8
+ LockFilledIcon ,
9
9
} from '@hypothesis/frontend-shared' ;
10
10
import classnames from 'classnames' ;
11
11
@@ -32,9 +32,9 @@ function GroupIcon({ type }: { type: GroupType }) {
32
32
title = { title }
33
33
data-testid = "group-icon"
34
34
>
35
- { type === 'open' && < GlobeAltIcon /> }
36
- { type === 'restricted' && < GlobeAltLockIcon /> }
37
- { type === 'private' && < LockIcon /> }
35
+ { type === 'open' && < GlobeIcon /> }
36
+ { type === 'restricted' && < GlobeLockIcon /> }
37
+ { type === 'private' && < LockFilledIcon /> }
38
38
</ div >
39
39
) ;
40
40
}
Original file line number Diff line number Diff line change @@ -381,17 +381,17 @@ describe('GroupListItem', () => {
381
381
[
382
382
{
383
383
type : 'private' ,
384
- expectedIcon : 'LockIcon ' ,
384
+ expectedIcon : 'LockFilledIcon ' ,
385
385
expectedTitle : 'Private group' ,
386
386
} ,
387
387
{
388
388
type : 'restricted' ,
389
- expectedIcon : 'GlobeAltLockIcon ' ,
389
+ expectedIcon : 'GlobeLockIcon ' ,
390
390
expectedTitle : 'Restricted group' ,
391
391
} ,
392
392
{
393
393
type : 'open' ,
394
- expectedIcon : 'GlobeAltIcon ' ,
394
+ expectedIcon : 'GlobeIcon ' ,
395
395
expectedTitle : 'Public group' ,
396
396
} ,
397
397
] . forEach ( ( { type, expectedIcon, expectedTitle } ) => {
Original file line number Diff line number Diff line change 3
3
Input ,
4
4
InputGroup ,
5
5
IconButton ,
6
- LockIcon ,
6
+ LockFilledIcon ,
7
7
} from '@hypothesis/frontend-shared' ;
8
8
import { useCallback } from 'preact/hooks' ;
9
9
@@ -94,7 +94,7 @@ function ShareAnnotations({ toastMessenger }: ShareAnnotationsProps) {
94
94
) } { ' ' }
95
95
< span >
96
96
Private (
97
- < LockIcon className = "inline w-[14px] h-[14px] -mt-0.5" /> { ' ' }
97
+ < LockFilledIcon className = "inline w-[14px] h-[14px] -mt-0.5" /> { ' ' }
98
98
< em > Only Me</ em > ) annotations are only visible to you.
99
99
</ span >
100
100
</ p >
Original file line number Diff line number Diff line change @@ -2282,15 +2282,15 @@ __metadata:
2282
2282
languageName: node
2283
2283
linkType: hard
2284
2284
2285
- "@hypothesis/frontend-shared@npm:^8.16 .0":
2286
- version: 8.16.1
2287
- resolution: "@hypothesis/frontend-shared@npm:8.16.1 "
2285
+ "@hypothesis/frontend-shared@npm:^9.0 .0":
2286
+ version: 9.0.0
2287
+ resolution: "@hypothesis/frontend-shared@npm:9.0.0 "
2288
2288
dependencies:
2289
2289
highlight.js: ^11.6.0
2290
2290
wouter-preact: ^3.0.0
2291
2291
peerDependencies:
2292
2292
preact: ^10.25.1
2293
- checksum: 9c1037d4e8f10ad8423e244a75d1f5c1000433b0f519fc87c43dff51cf570d6dc702838dc188cd63c5a3f7a821e0d95ef2114eb2788fded2d30813a915228628
2293
+ checksum: 203f8562d9d0dd5fc6e26cd2e56d0264ea3129ed8e54673d13a15646f501221139f12c9a092b82e15a0c60f476821937617a7db9c9e5715b03aeebe082b0f986
2294
2294
languageName: node
2295
2295
linkType: hard
2296
2296
@@ -8787,7 +8787,7 @@ __metadata:
8787
8787
"@babel/preset-react": ^7.0.0
8788
8788
"@babel/preset-typescript": ^7.16.7
8789
8789
"@hypothesis/frontend-build": ^3.0.0
8790
- "@hypothesis/frontend-shared": ^8.16 .0
8790
+ "@hypothesis/frontend-shared": ^9.0 .0
8791
8791
"@hypothesis/frontend-testing": ^1.3.1
8792
8792
"@npmcli/arborist": ^9.0.0
8793
8793
"@octokit/rest": ^21.0.0
You can’t perform that action at this time.
0 commit comments