Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Frontend] Data Upload v1: Move Uploaded Files to New Settings Page #37

Merged
merged 7 commits into from
Sep 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
76 changes: 58 additions & 18 deletions publisher/src/components/DataUpload/DataUpload.styles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import styled from "styled-components/macro";

import { rem } from "../../utils";
import { OpacityGradient } from "../Forms";
import { HEADER_BAR_HEIGHT, palette, typography } from "../GlobalStyles";
import {
Cell,
Expand All @@ -29,8 +30,6 @@ import {
Table,
} from "../Reports";

const ROW_HEIGHT = 42;

export const DataUploadContainer = styled.div`
width: 100%;
height: 100%;
Expand Down Expand Up @@ -311,14 +310,14 @@ export const Icon = styled.img<{ grayscale?: boolean }>`
${({ grayscale }) => grayscale && `filter: grayscale(1);`}
`;

export const ModalLoadingWrapper = styled.div`
div {
height: 100%;
top: 25%;
}
export const UploadedFilesLoading = styled.div`
width: 100%;
display: flex;
justify-content: center;
margin-top: 50px;
`;

export const ModalErrorWrapper = styled.div`
export const UploadedFilesError = styled.div`
display: flex;
justify-content: center;
margin-top: 25px;
Expand All @@ -336,16 +335,21 @@ export const ActionsContainer = styled.div`
justify-content: flex-end;
align-items: center;
background: ${palette.solid.offwhite};
gap: 10px;
padding-left: 20px;
padding: 0 20px;
position: absolute;
right: 22px;
right: 0;
z-index: 3;
width: 25vw;
`;

export const ActionButton = styled.div<{ red?: boolean }>`
white-space: nowrap;
background: ${palette.solid.offwhite};
color: ${({ red }) => (red ? palette.solid.red : palette.solid.blue)};

&:not(:last-child) {
margin-right: 10px;
}

&:hover {
color: ${palette.solid.darkgrey};
}
Expand Down Expand Up @@ -497,13 +501,20 @@ export const ConfirmationPageContainer = styled.div`
`;

export const UploadedFilesContainer = styled.div`
height: 100%;
padding: ${ROW_HEIGHT}px 0;
max-height: 50vh;
overflow-y: scroll;
`;

export const UploadedFilesWrapper = styled.div`
margin-top: 50px;
position: relative;
`;

export const UploadedFilesTable = styled(Table)`
padding: unset;
max-height: 40vh;
overflow-y: scroll;
padding-bottom: 50px;
`;

export const ExtendedTabbedBar = styled(TabbedBar)`
Expand All @@ -514,23 +525,47 @@ export const ExtendedRow = styled(Row)`
color: ${({ selected }) => selected && palette.highlight.grey9};
position: relative;
transition: unset;
padding-left: 0;
padding-right: 8px;
`;

export const ExtendedLabelRow = styled(LabelRow)`
position: fixed;
position: sticky;
top: 0;
background: ${palette.solid.white};
z-index: 1;
z-index: 5;
padding-left: 0;
padding-right: 8px;
`;

export const ExtendedCell = styled(Cell)`
&:first-child {
flex: 4 1 auto;
flex: 3 1 auto;
}

&:nth-child(2) {
flex: 3 1 auto;
}

@media only screen and (max-width: 1050px) {
&:not(:first-child, :last-child) {
display: none;
}
}
`;

export const ExtendedLabelCell = styled(LabelCell)`
&:first-child {
flex: 4 1 auto;
flex: 3 1 auto;
}
&:nth-child(2) {
flex: 3 1 auto;
}

@media only screen and (max-width: 1050px) {
&:not(:first-child, :last-child) {
display: none;
}
}
`;

Expand Down Expand Up @@ -574,3 +609,8 @@ export const CheckIcon = styled.img`
width: 16px;
margin-right: 5px;
`;

export const ExtendedOpacityGradient = styled(OpacityGradient)`
height: 50px;
position: absolute;
`;