Skip to content
New issue

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

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

Already on GitHub? # to your account

CRDCDH-35 Redesign Form Section B #9

Merged
merged 27 commits into from
Jun 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
3f70c67
Added MUI date picker dependencies and wrapped LocalizationProvider a…
Alejandro-Vega Jun 20, 2023
51e97a4
Added Nunito google font
Alejandro-Vega Jun 20, 2023
5a0ccc6
Styled FormView navigation buttons and controls
Alejandro-Vega Jun 20, 2023
dbb1273
Created AddRemoveButton to be reusable when adding or removing conten…
Alejandro-Vega Jun 20, 2023
63c7286
Updated form title and fonts
Alejandro-Vega Jun 20, 2023
38f6e4e
Updated text, select, and autocomplete input styling
Alejandro-Vega Jun 20, 2023
4e82de8
Added plannedPublications to Application and example data to the simu…
Alejandro-Vega Jun 20, 2023
874e8c5
Updated styling for Publication and Repository sections. As well as t…
Alejandro-Vega Jun 20, 2023
6c9c946
Updated Section B content, as well as added Planned Publications sec…
Alejandro-Vega Jun 20, 2023
0c21af4
Added input adornment icon assets necessary for autocomplete, select,…
Alejandro-Vega Jun 22, 2023
c37a0ae
Updated plannedPublications type
Alejandro-Vega Jun 22, 2023
7ec40f4
Updated plannedPublication and tooltip spacing. Also, date picker inp…
Alejandro-Vega Jun 22, 2023
0d9c563
Created a configuration file for Questionnaire Section B Funding List
Alejandro-Vega Jun 22, 2023
ef9c0e0
Updated section B to use expectedDate instead and also modified fundi…
Alejandro-Vega Jun 22, 2023
d3076c2
Removed withStyles, removed unecessary props, add make it so planned …
Alejandro-Vega Jun 22, 2023
be52249
Converted components to use styled instead of withStyles
Alejandro-Vega Jun 22, 2023
07a83c1
Added error validation to DatePickerInput and converted it to use sty…
Alejandro-Vega Jun 22, 2023
522bc23
Fixed typo
Alejandro-Vega Jun 22, 2023
cec80cb
Replaced MUI tolltip icon with svg asset instead
Alejandro-Vega Jun 22, 2023
60ef916
Fixed border color when focused and placeholder color for all inputs
Alejandro-Vega Jun 22, 2023
d42bc38
Fixed icon being cut off at certain zoom
Alejandro-Vega Jun 22, 2023
755e2b5
Fix dayjs errors with the DatePicker value
Alejandro-Vega Jun 22, 2023
c460bec
Icon issue had to do with the svg file itself, fixed svg and reverted…
Alejandro-Vega Jun 23, 2023
38543a9
Added id to inputs for datepicker and select components so that the l…
Alejandro-Vega Jun 23, 2023
8a76ec8
Merge branch 'dev' of https://github.com/CBIIT/crdc-datahub-ui into C…
Alejandro-Vega Jun 23, 2023
bcd52a6
merge incoming package lock
Alejandro-Vega Jun 23, 2023
541f025
Merge branch 'dev' into CRDCDH-35-Redesign
jonkiky Jun 26, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
94 changes: 92 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,15 @@
"@mui/lab": "^5.0.0-alpha.130",
"@mui/material": "^5.13.1",
"@mui/styles": "^5.13.1",
"@mui/x-date-pickers": "^6.8.0",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^13.5.0",
"@types/jest": "^27.5.2",
"@types/node": "^16.18.31",
"@types/react": "^18.2.6",
"@types/react-dom": "^18.2.4",
"dayjs": "^1.11.8",
"graphql": "^16.6.0",
"lodash": "^4.17.21",
"nprogress": "^0.2.0",
Expand Down
18 changes: 10 additions & 8 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
import { RouterProvider, createBrowserRouter } from 'react-router-dom';
import { ThemeProvider, CssBaseline, createTheme } from '@mui/material';
import routeConfig from './router';
import { RouterProvider, createBrowserRouter } from "react-router-dom";
import { ThemeProvider, CssBaseline, createTheme } from "@mui/material";
import { LocalizationProvider } from "@mui/x-date-pickers";
import { AdapterDayjs } from "@mui/x-date-pickers/AdapterDayjs";
import routeConfig from "./router";

const theme = createTheme({
typography: {
fontFamily: "'Nunito', sans-serif",
},
});

const router = createBrowserRouter(
routeConfig,
);
const router = createBrowserRouter(routeConfig);

function App() {
return (
<ThemeProvider theme={theme}>
<CssBaseline />
<RouterProvider router={router} />
<LocalizationProvider dateAdapter={AdapterDayjs}>
<CssBaseline />
<RouterProvider router={router} />
</LocalizationProvider>
</ThemeProvider>
);
}
Expand Down
18 changes: 18 additions & 0 deletions src/assets/icons/calendar.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/assets/icons/dropdown_arrows.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/assets/icons/info_circle.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
51 changes: 51 additions & 0 deletions src/components/Questionnaire/AddRemoveButton.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
import { Button, ButtonProps, Stack, StackProps, styled } from "@mui/material";
import { FC } from "react";

const ActionButton = styled(Button, {
shouldForwardProp: (prop) => prop !== "textColor" && prop !== "iconColor"
})<Props>`
font-weight: 700;
font-size: 15px;
font-family: 'Nunito', 'Rubik', sans-serif;
line-height: 16px;
color: ${(props) => props.textColor ?? "#000000"};
padding: 0;
justify-content: end;
min-width: 143px;
border: none !important;
background: transparent;
text-transform: none;
& .MuiButton-startIcon {
color: ${(props) => props.iconColor ?? "#6EC882"};
margin-right: 4px;
& svg {
font-size: 23px;
}
}
`;

type Props = ButtonProps & {
label?: string;
placement?: StackProps["justifyContent"];
iconColor?: string;
textColor?: string;
};

const AddRemoveButton: FC<Props> = ({
label,
placement = "end",
...rest
}) => (
<Stack direction="row" justifyContent={placement} alignItems="center">
<ActionButton
variant="outlined"
type="button"
size="small"
{...rest}
>
{label}
</ActionButton>
</Stack>
);

export default AddRemoveButton;
Loading