Commit 099152fb authored by Alejandro Celaya's avatar Alejandro Celaya Committed by Alejandro Celaya

Move user select first in export annotations dialog

parent 28f09161
...@@ -210,7 +210,7 @@ function ExportAnnotations({ ...@@ -210,7 +210,7 @@ function ExportAnnotations({
> >
{exportableAnnotations.length > 0 ? ( {exportableAnnotations.length > 0 ? (
<> <>
<p className="text-color-text-light mb-3"> <p className="text-color-text-light">
<Link <Link
variant="text-light" variant="text-light"
underline="always" underline="always"
...@@ -221,6 +221,30 @@ function ExportAnnotations({ ...@@ -221,6 +221,30 @@ function ExportAnnotations({
</Link>{' '} </Link>{' '}
about copying and exporting annotations. about copying and exporting annotations.
</p> </p>
<div className="flex flex-col gap-y-3">
<label htmlFor={userSelectId} className="font-medium">
Select which user{"'"}s annotations to export:
</label>
<SelectNext
value={selectedUser}
onChange={setSelectedUser}
buttonId={userSelectId}
buttonContent={
<UserAnnotationsListItem userAnnotations={selectedUser} />
}
data-testid="user-select"
>
<SelectNext.Option value={allAnnotationsOption}>
<UserAnnotationsListItem
userAnnotations={allAnnotationsOption}
/>
</SelectNext.Option>
{userList.map(userInfo => (
<SelectNext.Option key={userInfo.userid} value={userInfo}>
<UserAnnotationsListItem userAnnotations={userInfo} />
</SelectNext.Option>
))}
</SelectNext>
<label <label
data-testid="export-count" data-testid="export-count"
htmlFor={fileInputId} htmlFor={fileInputId}
...@@ -246,7 +270,9 @@ function ExportAnnotations({ ...@@ -246,7 +270,9 @@ function ExportAnnotations({
<SelectNext <SelectNext
value={exportFormat} value={exportFormat}
onChange={setExportFormat} onChange={setExportFormat}
buttonContent={exportFormat.shortTitle ?? exportFormat.title} buttonContent={
exportFormat.shortTitle ?? exportFormat.title
}
data-testid="export-format-select" data-testid="export-format-select"
right right
> >
...@@ -269,27 +295,7 @@ function ExportAnnotations({ ...@@ -269,27 +295,7 @@ function ExportAnnotations({
</div> </div>
)} )}
</div> </div>
<label htmlFor={userSelectId} className="block font-medium"> </div>
Select which user{"'"}s annotations to export:
</label>
<SelectNext
value={selectedUser}
onChange={setSelectedUser}
buttonId={userSelectId}
buttonContent={
<UserAnnotationsListItem userAnnotations={selectedUser} />
}
data-testid="user-select"
>
<SelectNext.Option value={allAnnotationsOption}>
<UserAnnotationsListItem userAnnotations={allAnnotationsOption} />
</SelectNext.Option>
{userList.map(userInfo => (
<SelectNext.Option key={userInfo.userid} value={userInfo}>
<UserAnnotationsListItem userAnnotations={userInfo} />
</SelectNext.Option>
))}
</SelectNext>
</> </>
) : ( ) : (
<p data-testid="no-annotations-message"> <p data-testid="no-annotations-message">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment