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
bf49560d
Commit
bf49560d
authored
Feb 12, 2024
by
Alejandro Celaya
Committed by
Alejandro Celaya
Feb 13, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add more specific labels for some close buttons
parent
39ccd7eb
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
8 deletions
+10
-8
HelpPanel.tsx
src/sidebar/components/HelpPanel.tsx
+1
-1
ShareDialog.tsx
src/sidebar/components/ShareDialog/ShareDialog.tsx
+1
-1
TabHeader.tsx
src/sidebar/components/tabs/TabHeader.tsx
+8
-6
No files found.
src/sidebar/components/HelpPanel.tsx
View file @
bf49560d
...
@@ -114,7 +114,7 @@ function HelpPanel({ session }: HelpPanelProps) {
...
@@ -114,7 +114,7 @@ function HelpPanel({ session }: HelpPanelProps) {
onActiveChanged=
{
onActiveChanged
}
onActiveChanged=
{
onActiveChanged
}
variant=
"custom"
variant=
"custom"
>
>
<
TabHeader
>
<
TabHeader
closeTitle=
"Close help panel"
>
<
Tab
<
Tab
id=
{
tutorialTabId
}
id=
{
tutorialTabId
}
aria
-
controls=
{
tutorialPanelId
}
aria
-
controls=
{
tutorialPanelId
}
...
...
src/sidebar/components/ShareDialog/ShareDialog.tsx
View file @
bf49560d
...
@@ -39,7 +39,7 @@ export default function ShareDialog({ shareTab }: ShareDialogProps) {
...
@@ -39,7 +39,7 @@ export default function ShareDialog({ shareTab }: ShareDialogProps) {
panelName=
"shareGroupAnnotations"
panelName=
"shareGroupAnnotations"
variant=
"custom"
variant=
"custom"
>
>
<
TabHeader
>
<
TabHeader
closeTitle=
"Close share panel"
>
{
shareTab
&&
(
{
shareTab
&&
(
<
Tab
<
Tab
id=
"share-panel-tab"
id=
"share-panel-tab"
...
...
src/sidebar/components/tabs/TabHeader.tsx
View file @
bf49560d
...
@@ -2,14 +2,16 @@ import { CloseButton, TabList } from '@hypothesis/frontend-shared';
...
@@ -2,14 +2,16 @@ import { CloseButton, TabList } from '@hypothesis/frontend-shared';
import
classnames
from
'classnames'
;
import
classnames
from
'classnames'
;
import
type
{
ComponentChildren
}
from
'preact'
;
import
type
{
ComponentChildren
}
from
'preact'
;
export
type
TabHeaderProps
=
{
children
:
ComponentChildren
;
/** Title for the close button. */
closeTitle
:
string
;
};
/**
/**
* Render a header to go above a Card, with contents in a TabList
* Render a header to go above a Card, with contents in a TabList
*/
*/
export
default
function
TabHeader
({
export
default
function
TabHeader
({
children
,
closeTitle
}:
TabHeaderProps
)
{
children
,
}:
{
children
:
ComponentChildren
;
})
{
return
(
return
(
<
div
data
-
testid=
"tab-header"
className=
"flex items-center"
>
<
div
data
-
testid=
"tab-header"
className=
"flex items-center"
>
<
CloseButton
<
CloseButton
...
@@ -30,7 +32,7 @@ export default function TabHeader({
...
@@ -30,7 +32,7 @@ export default function TabHeader({
// the `Tab` components rendered inside the `TabList`. See issue #6131.
// the `Tab` components rendered inside the `TabList`. See issue #6131.
'touch:!min-h-0'
,
'touch:!min-h-0'
,
)
}
)
}
title=
"Close"
title=
{
closeTitle
}
variant=
"custom"
variant=
"custom"
size=
"sm"
size=
"sm"
/>
/>
...
...
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