Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.

[#167163350] front end setup #1

Merged
merged 8 commits into from
Jul 23, 2019
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
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
27 changes: 23 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
"name": "TODO",
"name": "io-onboarding-pa-fe",
"version": "0.0.1",
"description": "TODO",
"description": "io-onboarding-pa-fe",
"repository": "https://github.com/teamdigitale/TODO",
"author": "https://teamdigitale.governo.it",
"license": "MIT",
"scripts": {
"start": "parcel ./public/index.html",
"prebuild": "rimraf dist",
"build": "tsc",
"postversion": "git push && git push --tags",
Expand All @@ -15,19 +16,37 @@
"devDependencies": {
"@types/jest": "^24.0.13",
"@types/node": "10.14.1",
"@types/react": "16.8.23",
"@types/react-dom": "16.8.4",
"@types/reactstrap": "^8.0.1",
"danger": "^8.0.0",
"danger-plugin-digitalcitizenship": "*",
"italia-tslint-rules": "*",
"jest": "^24.8.0",
"parcel-bundler": "^1.12.3",
"prettier": "^1.12.1",
"rimraf": "^2.6.2",
"sass": "^1.22.4",
"ts-jest": "^24.0.2",
"tslint": "^5.1.0",
"typescript": "^3.5.0"
"typescript": "3.5.3"
},
"dependencies": {
"@coreui/coreui": "^2.1.12",
"@coreui/coreui-plugin-chartjs-custom-tooltips": "^1.3.1",
"@coreui/icons": "0.3.0",
"@coreui/react": "^2.5.1",
"bootstrap": "^4.3.1",
"bootstrap-italia": "^1.3.2",
"chart.js": "^2.8.0",
"fp-ts": "1.12.0",
"io-ts": "1.8.5"
"io-ts": "1.8.5",
"react": "^16.8.6",
"react-dom": "^16.8.6",
"react-router-config": "^5.0.1",
"react-router-dom": "^5.0.1",
"react-scripts": "3.0.1",
"reactstrap": "^8.0.0"
},
"jest": {
"testEnvironment": "node",
Expand Down
14 changes: 14 additions & 0 deletions public/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Onboarding PA</title>
</head>
<body>
<div id="root"></div>
<script src="../src/index.tsx"></script>
</body>
</html>
7 changes: 7 additions & 0 deletions src/App.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// Styles
// CoreUI Icons Set
@import '../node_modules/@coreui/icons/css/coreui-icons.css';
// Bootstrap italia
@import '../node_modules/bootstrap-italia/dist/css/bootstrap-italia.min.css';
// Import Main styles for this applicationsc
@import 'scss/style.scss';
9 changes: 9 additions & 0 deletions src/App.test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import * as React from "react";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

put tests under __tests__ folders

import * as ReactDOM from "react-dom";
import { App } from "./App";

it("renders without crashing", () => {
const div = document.createElement("div");
ReactDOM.render(<App />, div);
ReactDOM.unmountComponentAtNode(div);
});
11 changes: 11 additions & 0 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import * as React from "react";

import "./App.scss";

export const App: React.FC = () => {
return (
<div className="App">
<h1 className="primary-bg white-color">Piattaforma Onboard PA</h1>
</div>
);
};
5 changes: 5 additions & 0 deletions src/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import * as React from "react";
import { render } from "react-dom";
import { App } from "./App";

render(<App />, document.getElementById("root"));
5 changes: 5 additions & 0 deletions src/scss/style.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// Import styles
@import "../../node_modules/@coreui/coreui/scss/coreui";

// Temp fix for reactstrap
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

create a story in the backlog to remove the temp fix explaining when it can be removed + add link to the story in this comment + prefix the comment with TODO:

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The temp fix was added by CoreUI devs to fix a problem with right dropdown when used in app navbar
The issue can be reproduced in https://github.com/coreui/coreui-free-react-admin-template, when the fix is commented out, the dropdown menu that is shown from user avatar has the wrong width (.app-header .dropdown-item has min width of 180px and overflows menu)
Should be fixed by CoreUI devs or will be fixed with further analysis later
Opened story https://www.pivotaltracker.com/story/show/167402768 to keep track and added TODO prefix to comment

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add the link to the story in the comment below the todo

@import '../../node_modules/@coreui/coreui/scss/dropdown-menu-right';
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"strict": true,
"noImplicitAny": true,
"declaration": true,
"sourceMap": true
"sourceMap": true,
"jsx": "preserve"
},
"lib": [],
"include": [
Expand Down
Loading