-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#59 #60 #120 #121 Implements the download modals for the dataset and run pages: - Adds remix-i18next for i18n interpolation and component nesting - Refactor tabs to use MUI - Add layout context - Use loremflickr for cat images - Add `<semibold />` to `<I18n />` component - Add hook for storing state in query parameters - download modal components - configure download - download options ## Demo ### Dataset page ### via S3 <img width="649" alt="image" src="https://github.com/chanzuckerberg/cryoet-data-portal/assets/2176050/55e215bc-c721-46be-b092-fee9b311955a"> ### via API <img width="650" alt="image" src="https://github.com/chanzuckerberg/cryoet-data-portal/assets/2176050/603d6b11-60fc-4fc3-b53c-6820916ba9c9"> ## Run page ### Configure download - download tomogram <img width="651" alt="image" src="https://github.com/chanzuckerberg/cryoet-data-portal/assets/2176050/29b3f0bc-3f3e-4239-91ab-89e5af137dbe"> ### Configure download - download all annotations <img width="636" alt="image" src="https://github.com/chanzuckerberg/cryoet-data-portal/assets/2176050/51333cec-bc49-42ce-94f7-0a9a72913dba"> ### Download options - download tomogram - via direct download <img width="636" alt="image" src="https://github.com/chanzuckerberg/cryoet-data-portal/assets/2176050/9a5409e2-496f-4251-bad1-fdfaf5aa7378"> ### Download options - download tomogram - via curl <img width="637" alt="image" src="https://github.com/chanzuckerberg/cryoet-data-portal/assets/2176050/7242883c-8b92-4734-8065-996cd6e14994"> ### Download options - download tomogram - via S3 <img width="641" alt="image" src="https://github.com/chanzuckerberg/cryoet-data-portal/assets/2176050/5605b89d-c094-4ed8-926b-48961008c030"> ### Download options - download tomogram - via API <img width="654" alt="image" src="https://github.com/chanzuckerberg/cryoet-data-portal/assets/2176050/a31f0010-8441-460a-988e-c07009dec6a3"> ### Download options - all annotations - via S3 <img width="633" alt="image" src="https://github.com/chanzuckerberg/cryoet-data-portal/assets/2176050/914f4307-fedc-40f9-a738-fb51e1896f9e"> ### Download options - all annotations - via API <img width="641" alt="image" src="https://github.com/chanzuckerberg/cryoet-data-portal/assets/2176050/b3029885-e585-474f-8969-04e910439ce6">
- Loading branch information
1 parent
720aeb7
commit 76a3063
Showing
54 changed files
with
2,035 additions
and
197 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import Axios from 'axios' | ||
import { setupCache } from 'axios-cache-interceptor' | ||
|
||
export const axios = | ||
process.env.NODE_ENV === 'production' ? setupCache(Axios) : Axios |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import { Button } from '@czi-sds/components' | ||
import { ReactNode } from 'react' | ||
|
||
import { useI18n } from 'app/hooks/useI18n' | ||
import { cns } from 'app/utils/cns' | ||
|
||
export function CopyBox({ | ||
className, | ||
content, | ||
title, | ||
titleClassName, | ||
}: { | ||
className?: string | ||
content: ReactNode | ||
title?: ReactNode | ||
titleClassName?: string | ||
}) { | ||
const { t } = useI18n() | ||
|
||
return ( | ||
<div className={className}> | ||
{title && ( | ||
<p | ||
className={cns( | ||
'text-sds-header-xs leading-sds-header-xs font-semibold mb-sds-xxs', | ||
titleClassName, | ||
)} | ||
> | ||
{title}: | ||
</p> | ||
)} | ||
|
||
<div | ||
className={cns( | ||
'bg-sds-gray-100 border-[0.5px] border-sds-gray-300', | ||
'p-sds-default flex gap-sds-s', | ||
)} | ||
> | ||
<pre className="whitespace-normal break-all flex-grow">{content}</pre> | ||
|
||
<Button | ||
className="!min-w-0 uppercase !p-0" | ||
onClick={() => navigator.clipboard.writeText(String(content))} | ||
> | ||
{t('copy')} | ||
</Button> | ||
</div> | ||
</div> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.