Skip to content

Commit

Permalink
Include review comments
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Oertel <[email protected]>
  • Loading branch information
fudler committed Feb 2, 2024
1 parent 78a8302 commit 00b835f
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 25 deletions.
20 changes: 20 additions & 0 deletions new/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,26 @@
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"prettier": {
"printWidth": 100,
"tabWidth": 4,
"useTabs": false,
"semi": true,
"singleQuote": false,
"quoteProps": "as-needed",
"jsxSingleQuote": false,
"trailingComma": "none",
"bracketSpacing": true,
"jsxBracketSameLine": false,
"arrowParens": "avoid",
"requirePragma": false,
"insertPragma": false,
"proseWrap": "preserve",
"htmlWhitespaceSensitivity": "css",
"vueIndentScriptAndStyle": false,
"endOfLine": "lf",
"embeddedLanguageFormatting": "auto"
},
"eslintConfig": {
"extends": [
"react-app",
Expand Down
2 changes: 1 addition & 1 deletion new/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ function App() {
)
}

export default App;
export default App;
35 changes: 13 additions & 22 deletions new/src/components/ScenarioOverview/ScenarioOverview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,32 +91,23 @@ export function MenuBar() {
return(
<StyledDrawer variant="permanent">
<List>
<ListItem sx={{ paddingTop: 0.1, paddingBottom: 0.1 }}>
<ListItemText primary={<Typography variant="h6">SUMMARY</Typography>} />
</ListItem>
<List>
<ListItem sx={{ paddingTop: 0.1, paddingBottom: 0.1 }}>
<ListItemText primary={
<Link href="http://localhost:3000" underline="none" sx={{ color: 'inherit' }}>
All Scenarios
</Link>}
/>
</ListItem>
<ListItem sx={{ paddingTop: 0.1, paddingBottom: 0.1 }}>
<ListItemText primary={
<Link href="http://localhost:3000" underline="none" sx={{ color: 'inherit' }}>
Failed Scenarios
</Link>}
/>
</ListItem>
<ListItem sx={{ paddingTop: 0.1, paddingBottom: 0.1 }}>
<ListItemText primary={
<Link href="http://localhost:3000" underline="none" sx={{ color: 'inherit' }}>
Pending Scenarios
</Link>}
/>
<ListItemText primary={<Typography variant="h6">SUMMARY</Typography>} />
</ListItem>
<List>
{['All Scenarios', 'Failed Scenarios', 'Pending Scenarios'].map((scenario, index) => (
<ListItem key={index} sx={{ paddingTop: 0.1, paddingBottom: 0.1 }}>
<ListItemText primary={
<Link href="http://localhost:3000" underline="none" sx={{ color: 'inherit' }}>
{scenario}
</Link>}
/>
</ListItem>
))}
</List>
</List>
{/* Workshop: Use forEach to implement missing subitems. */}
<ListItem>
<ListItemText primary={<Typography variant="h6">TAGS</Typography>} />
</ListItem>
Expand Down
2 changes: 1 addition & 1 deletion new/src/components/Scenarios/SingleScenarioView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export function SingleScenarioView(props: { reportName: string; scenario: Scenar
<MenuBar/>
</div>
</Grid>
<Grid item xs={12} md={11}>
<Grid item xs={12} md={11}> {/* Workshop: Extract to new component. */}
<Grid container direction="column">
<Grid item xs={12}>
<div style={{ height: '20em'}}>
Expand Down
2 changes: 1 addition & 1 deletion new/src/components/casesTable/CasesTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ interface Column {
export function casesTable(props: CasesTableProps) {

return (<div></div>);
}
}
15 changes: 15 additions & 0 deletions new/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,27 @@
import React from 'react';
import ReactDOM from 'react-dom/client';
import './index.css';
import i18n from "i18next";
import { initReactI18next } from "react-i18next";
import en from "./i18n/en.json";
import App from './App';
import reportWebVitals from './reportWebVitals';

const root = ReactDOM.createRoot(
document.getElementById('root') as HTMLElement
);

i18n.use(initReactI18next).init({
resources: {
en: { translation: en }
},
lng: "en",
fallbackLng: "en",
interpolation: {
escapeValue: false
}
});

root.render(
<React.StrictMode>
<App />
Expand Down

0 comments on commit 00b835f

Please sign in to comment.