Skip to content

Commit 5cd33a9

Browse files
committed
commenting out dark mode
1 parent ecf4caa commit 5cd33a9

39 files changed

+4571
-4706
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -498,6 +498,7 @@ server/RootCA.srl
498498

499499

500500
# End of https://www.gitignore.io/api/node,linux,macos,windows,visualstudio,yarn
501+
501502
/test-results/
502503
/playwright-report/
503504
/playwright/.cache/

__tests__/playwright/example.spec.ts

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
import { test, expect } from '@playwright/test';
1+
// import { test, expect } from '@playwright/test';
22

3-
test('has title', async ({ page }) => {
4-
await page.goto('https://app.reactype.dev/#/');
3+
// test('has title', async ({ page }) => {
4+
// await page.goto('https://app.reactype.dev/#/');
55

6-
// Expect a title "to contain" a substring.
7-
await expect(page).toHaveTitle('ReacType');
8-
});
6+
// // Expect a title "to contain" a substring.
7+
// await expect(page).toHaveTitle('ReacType');
8+
// });
99

10-
test('get started link', async ({ page }) => {
11-
await page.goto('https://playwright.dev/');
10+
// test('get started link', async ({ page }) => {
11+
// await page.goto('https://playwright.dev/');
1212

13-
// Click the get started link.
14-
await page.getByRole('link', { name: 'Get started' }).click();
13+
// // Click the get started link.
14+
// await page.getByRole('link', { name: 'Get started' }).click();
1515

16-
// Expects the URL to contain intro.
17-
await expect(page).toHaveURL(/.*intro/);
18-
});
16+
// // Expects the URL to contain intro.
17+
// await expect(page).toHaveURL(/.*intro/);
18+
// });

app/src/components/ContextAPIManager/AssignTab/components/ComponentDropDrown.tsx

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,16 @@ const ComponentDropDown = ({
1212
componentInput,
1313
setComponentInput
1414
}) => {
15-
const { state, isDarkMode } = useSelector((store: RootState) => ({
16-
state: store.appState,
17-
isDarkMode: store.darkMode.isDarkMode
15+
const {
16+
state
17+
//, isDarkMode
18+
} = useSelector((store: RootState) => ({
19+
state: store.appState
20+
//isDarkMode: store.darkMode.isDarkMode
1821
}));
19-
const color = isDarkMode ? 'white' : 'black';
22+
//const color = isDarkMode ? 'white' : 'black';
23+
const color = 'white';
24+
2025
const onChange = (event, newValue) => {
2126
if (typeof newValue === 'string') {
2227
setComponentInput({
@@ -36,7 +41,6 @@ const ComponentDropDown = ({
3641
};
3742

3843
const filterOptions = (options, params) => {
39-
// setBtnDisabled(true);
4044
const filtered = filter(options, params);
4145
const { inputValue } = params;
4246
// Suggest the creation of a new contextInput
@@ -46,8 +50,6 @@ const ComponentDropDown = ({
4650
inputValue,
4751
name: `Add "${inputValue}"`
4852
});
49-
50-
// setBtnDisabled(false);
5153
}
5254

5355
return filtered;
@@ -67,7 +69,7 @@ const ComponentDropDown = ({
6769
};
6870

6971
const renderOption = (props, option) => (
70-
<li style={{ color: 'black', backgroundColor: 'none'}} {...props}>
72+
<li style={{ color: 'black', backgroundColor: 'none' }} {...props}>
7173
{option.name}
7274
</li>
7375
);

app/src/components/ContextAPIManager/AssignTab/components/ContextDropDown.tsx

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,12 @@ const ContextDropDown = ({
1515
}) => {
1616
const { allContext } = contextStore;
1717

18-
const isDarkMode = useSelector(
19-
(store: RootState) => store.darkMode.isDarkMode
20-
);
21-
const color = isDarkMode ? 'white' : 'black';
18+
// const isDarkMode = useSelector(
19+
// (store: RootState) => store.darkMode.isDarkMode
20+
// );
21+
//const color = isDarkMode ? 'white' : 'black';
22+
const color = 'white';
23+
2224
const onChange = (event, newValue) => {
2325
if (typeof newValue === 'string') {
2426
setContextInput({
@@ -38,7 +40,6 @@ const ContextDropDown = ({
3840
};
3941

4042
const filterOptions = (options, params) => {
41-
// setBtnDisabled(true);
4243
const filtered = filter(options, params);
4344
const { inputValue } = params;
4445
// Suggest the creation of a new contextInput
@@ -48,8 +49,6 @@ const ContextDropDown = ({
4849
inputValue,
4950
name: `Add "${inputValue}"`
5051
});
51-
52-
// setBtnDisabled(false);
5352
}
5453

5554
return filtered;

app/src/components/ContextAPIManager/AssignTab/components/ContextTable.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,7 @@ const rows = [
4545
createData('Cupcake', 305, 3.7, 67, 4.3),
4646
createData('Gingerbread', 356, 16.0, 49, 3.9)
4747
];
48-
{
49-
/* <Table style={{ width: 400, margin: 'auto' }}></Table> */
50-
}
48+
5149
export default function ContextTable() {
5250
return (
5351
<TableContainer component={Paper}>

app/src/components/ContextAPIManager/ContextManager.tsx

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { useContext } from 'react';
1+
import React, { useContext } from 'react';
22
import { makeStyles } from '@mui/styles';
33
import Box from '@mui/material/Box';
44
import Tab from '@mui/material/Tab';
@@ -9,39 +9,46 @@ import TabPanel from '@mui/lab/TabPanel';
99
import CreateContainer from './CreateTab/CreateContainer';
1010
import AssignContainer from './AssignTab/AssignContainer';
1111
import DisplayContainer from './DisplayTab/DisplayContainer';
12-
import { useSelector } from 'react-redux'
12+
import { useSelector } from 'react-redux';
1313
import { RootState } from '../../redux/store';
1414

15-
1615
const useStyles = makeStyles({
1716
contextContainer: {
1817
backgroundColor: '#191919',
19-
height: 'fit-content',
18+
height: 'fit-content'
2019
}
2120
});
2221

2322
const ContextManager = (props): JSX.Element => {
24-
const { isDarkMode, style } = useSelector((store:RootState) => ({
25-
isDarkMode: store.darkMode.isDarkMode,
23+
const {
24+
//isDarkMode,
25+
style
26+
} = useSelector((store: RootState) => ({
27+
// isDarkMode: store.darkMode.isDarkMode,
2628
style: store.styleSlice
2729
}));
2830
const classes = useStyles();
2931
const [value, setValue] = React.useState<string>('1');
30-
32+
3133
const handleChange = (event: React.SyntheticEvent, newValue: string) => {
3234
setValue(newValue);
3335
};
3436

35-
const background_Color = isDarkMode ? '#21262b' : 'white'
36-
const color = isDarkMode ? 'white' : 'white'
37+
// const background_Color = isDarkMode ? '#21262b' : 'white'
38+
// const color = isDarkMode ? 'white' : 'white'
39+
const color = 'white';
3740

3841
return (
3942
<React.Fragment>
4043
<div className={classes.contextContainer} style={style.style}>
4144
<Box sx={{ width: '100%', typography: 'body1' }}>
4245
<TabContext value={value}>
4346
<Box sx={{ borderBottom: 1, borderColor: 'divider' }}>
44-
<TabList onChange={handleChange} centered={true} sx={{color:color}}>
47+
<TabList
48+
onChange={handleChange}
49+
centered={true}
50+
sx={{ color: color }}
51+
>
4552
<Tab style={{ color: color }} label="Create/Edit" value="1" />
4653
<Tab style={{ color: color }} label="Assign" value="2" />
4754
<Tab style={{ color: color }} label="Display" value="3" />
@@ -63,4 +70,4 @@ const ContextManager = (props): JSX.Element => {
6370
);
6471
};
6572

66-
export default ContextManager;
73+
export default ContextManager;

app/src/components/ContextAPIManager/CreateTab/components/AddContextForm.tsx

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,15 @@ const AddContextForm = ({
2525
const { allContext } = contextStore;
2626
const [btnDisabled, setBtnDisabled] = useState(false);
2727
const [open, setOpen] = useState(false);
28-
const { state, isDarkMode } = useSelector((store: RootState) => ({
29-
isDarkMode: store.darkMode.isDarkMode,
28+
const {
29+
state
30+
// isDarkMode
31+
} = useSelector((store: RootState) => ({
32+
//isDarkMode: store.darkMode.isDarkMode,
3033
state: store.appState
3134
}));
32-
const color = isDarkMode ? 'black' : 'white';
35+
//const color = isDarkMode ? 'black' : 'white';
36+
const color = 'white';
3337

3438
//handler for submitting new context for creation
3539
const handleSubmit = () => {
@@ -67,7 +71,7 @@ const AddContextForm = ({
6771
const contexts = allContext.length ? (
6872
allContext.map((context, index) => {
6973
return (
70-
<MenuItem style={{ color: '#383838'}} value={context.name} key={index}>
74+
<MenuItem style={{ color: '#383838' }} value={context.name} key={index}>
7175
{context.name}
7276
</MenuItem>
7377
);
@@ -99,7 +103,7 @@ const AddContextForm = ({
99103
/>
100104
<Snackbar
101105
open={open && !errorStatus}
102-
anchorOrigin={{ vertical: 'top', horizontal: 'center' }}
106+
anchorOrigin={{ vertical: 'top', horizontal: 'center' }}
103107
autoHideDuration={3000}
104108
onClose={handleClose}
105109
>
@@ -129,7 +133,7 @@ const AddContextForm = ({
129133
<Select
130134
required
131135
sx={{ width: 425 }}
132-
style={{ border: '1px solid #0099e6', color: color}}
136+
style={{ border: '1px solid #0099e6', color: color }}
133137
value={currentContext}
134138
label="Select Context"
135139
MenuProps={{ disablePortal: true }}

app/src/components/ContextAPIManager/CreateTab/components/AddDataForm.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const AddDataForm = ({ handleClickInputData, currentContext }) => {
1010
//const [contextInput, setContextInput] = React.useState(null);
1111
const defaultInputData = { inputKey: '', inputValue: '' };
1212
const [dataContext, setDataContext] = React.useState(defaultInputData);
13-
const { isDarkMode } = useSelector((store: RootState) => store.darkMode);
13+
// const { isDarkMode } = useSelector((store: RootState) => store.darkMode);
1414
const saveData = () => {
1515
setDataContext(defaultInputData);
1616
if (dataContext.inputKey === '' || dataContext.inputValue === '') {
@@ -19,7 +19,8 @@ const AddDataForm = ({ handleClickInputData, currentContext }) => {
1919
}
2020
handleClickInputData(currentContext, dataContext);
2121
};
22-
const color = isDarkMode ? 'black' : 'white';
22+
// const color = isDarkMode ? 'black' : 'white';
23+
const color = 'white';
2324

2425
const handleChange = (e) => {
2526
setDataContext((prevDataContext) => {

0 commit comments

Comments
 (0)