Skip to content

Commit

Permalink
Merge pull request #90 from policy-design-lab/release-0.3.0
Browse files Browse the repository at this point in the history
Release 0.3.0
  • Loading branch information
sandeep-ps authored May 3, 2023
2 parents b209724 + 96a39ad commit 4f891c5
Show file tree
Hide file tree
Showing 39 changed files with 4,913 additions and 4,178 deletions.
246 changes: 65 additions & 181 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,196 +1,80 @@
{
"root": true,
"extends": [
"airbnb",
"prettier",
"plugin:prettier/recommended",
"plugin:react/recommended"
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:react/recommended",
"plugin:react/jsx-runtime"
],
"plugins": [
"prettier",
"react"
],
"parser": "@babel/eslint-parser",
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
"settings": {
"react": {
"version": "detect"
}
},
"overrides": [
{
"files": ["*.ts", "*.tsx"],
"extends": [
"plugin:@typescript-eslint/recommended"
],
"plugins": [
"@typescript-eslint"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig.json",
"tsconfigRootDir": "./"
}
}
],
"parser": "@babel/eslint-parser",
"env": {
"browser": true,
"es6": true,
"browser": true,
"node": true,
"jest": true
},
"settings": {
"import/resolver": {
"node": {
"moduleDirectory": [
"src",
"node_modules"
],
"extensions": [
".js",
".jsx",
".ts",
".tsx"
]
}
}
"jquery": true,
"mocha": true
},
"rules": {
"prettier/prettier": ["error",{
"endOfLine": "auto"}
],
"brace-style": [
"error",
"1tbs",
{
"allowSingleLine": true
}
],
"camelcase": "off",
"comma-dangle": [
"error",
"never"
],
"default-case": "off",
"function-paren-newline": [
"error",
"consistent"
],
"import/extensions": [
"error",
"ignorePackages",
{
"js": "never",
"jsx": "never",
"ts": "never",
"tsx": "never"
}
],
"import/no-extraneous-dependencies": 0,
"import/prefer-default-export": "off",
"jsx-a11y/control-has-associated-label": "off",
"max-len": [
"warn",
{
"code": 120,
"tabWidth": 4,
"ignoreComments": true,
"ignoreTrailingComments": true,
"ignoreUrls": true,
"ignoreStrings": true,
"ignoreTemplateLiterals": true,
"ignoreRegExpLiterals": true
}
],
"no-console": [
"error",
{
"allow": [
"error",
"warn"
]
}
],
"no-mixed-operators": "error",
"no-multi-spaces": [
"error",
{
"ignoreEOLComments": true
}
],
"no-param-reassign": [
"error",
{
"props": false
}
],
"no-underscore-dangle": "off",
"no-unused-expressions": [
"error",
{
"allowShortCircuit": true
}
],
"no-use-before-define": "off",
"object-curly-spacing": [
"error",
"always"
],
"operator-linebreak": [
"warn",
"after"
],
"prefer-destructuring": "off",
"quotes": [
"error",
"single",
{
"avoidEscape": true
}
],
"quote-props": [
"error",
"consistent-as-needed",
{
"keywords": false,
"unnecessary": true,
"numbers": false
}
],
"semi": [
"error",
"always"
],
"react/destructuring-assignment": "off",
"react/jsx-curly-newline": "off",
"react/jsx-filename-extension": [
"error",
{
"extensions": [
".jsx",
".tsx"
]
}
],
"react/jsx-indent": [
"error",
4
],
"react/jsx-indent-props": [
"error",
4
],
"react/jsx-one-expression-per-line": "off",
"react/jsx-props-no-spreading": "off",
"react/jsx-tag-spacing": "error",
"react/jsx-wrap-multilines": "off",
"react/jsx-uses-vars": 2,
"react/jsx-uses-react": 2,
"react/require-default-props": "off",
"react/static-property-placement": [
"warn",
"static public field"
],
"@typescript-eslint/explicit-function-return-type": "off"
"no-mixed-spaces-and-tabs": ["warn", "smart-tabs"],
"eqeqeq": ["warn", "smart"],
"no-eval": "warn",
"quotes": ["warn", "double"],
"indent": ["warn", "tab"],
"no-console": 1,
"no-debugger": 1,
"no-var": "error",
"semi": ["warn", "always"],
"no-trailing-spaces": 0,
"eol-last": "warn",
"no-underscore-dangle": 0,
"no-alert": 0,
"no-lone-blocks": 0,
"no-unused-vars": "warn",
"prefer-template": "warn",
"jsx-quotes": 1,
"prefer-const": ["warn", {
"destructuring": "any",
"ignoreReadBeforeAssign": false
}],
"react/display-name": [ 1, {"ignoreTranspilerName": false }],
"react/forbid-prop-types": [1, {"forbid": ["any"]}],
"react/jsx-boolean-value": 0,
"react/jsx-closing-bracket-location": 0,
"react/jsx-curly-spacing": 1,
"react/jsx-indent-props": 0,
"react/jsx-key": 1,
"react/jsx-max-props-per-line": 0,
"react/jsx-no-bind": 0,
"react/jsx-no-duplicate-props": 1,
"react/jsx-no-literals": 0,
"react/jsx-no-undef": 1,
"react/jsx-pascal-case": 1,
"react/jsx-sort-prop-types": 0,
"react/jsx-sort-props": 0,
"react/jsx-uses-react": 0,
"react/jsx-uses-vars": 1,
"react/no-danger": 1,
"react/no-did-mount-set-state": 1,
"react/no-did-update-set-state": 1,
"react/no-direct-mutation-state": 1,
"react/no-multi-comp": 1,
"react/no-set-state": 0,
"react/no-unknown-property": 1,
"react/prefer-es6-class": 1,
"react/prop-types": 0,
"react/react-in-jsx-scope": 0,
"react/self-closing-comp": 1,
"react/sort-comp": 1,
"react/jsx-wrap-multilines": 1
},
"globals": {
}
}
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ build/
coverage/
node_modules/

# IDEA:
.idea/
**.iml

.env
*.log
.huskyrc
*.DS_Store
29 changes: 29 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,32 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [0.3.0] - 2023-05-03

### Added
- Popup alert for unfinished programs [#58](https://github.com/policy-design-lab/pdl-frontend/issues/58)
- Navigation from PDL title and PDL logo [#51](https://github.com/policy-design-lab/pdl-frontend/issues/51)
- Icon for left menu [#62](https://github.com/policy-design-lab/pdl-frontend/issues/62)
- Background color for selected columns in table [#68](https://github.com/policy-design-lab/pdl-frontend/issues/68)

### Changed
- Landing page uses the api endpoint for AllProgram Maps [#20](https://github.com/policy-design-lab/pdl-frontend/issues/20)- Table sorting icon [#55](https://github.com/policy-design-lab/pdl-frontend/issues/55)
- Landing page text display for each different tab selection [#53](https://github.com/policy-design-lab/pdl-frontend/issues/53)
- The left menu margin and background color [#61](https://github.com/policy-design-lab/pdl-frontend/issues/61)
- Number style for semi-donut chart [#64](https://github.com/policy-design-lab/pdl-frontend/issues/64)
- Popup menu styles [#66](https://github.com/policy-design-lab/pdl-frontend/issues/66)
- Table styles [#76](https://github.com/policy-design-lab/pdl-frontend/issues/76)
- Updated EQIP JSON data files. [#84](https://github.com/policy-design-lab/pdl-frontend/issues/84)
- Map legends and EQIP popper text [#91](https://github.com/policy-design-lab/pdl-frontend/issues/91)
- color schemes back and hid crop insurance tab for release 0.3.0 [#105](https://github.com/policy-design-lab/pdl-frontend/issues/105)

### Fixed
- Table sorting functions [#49](https://github.com/policy-design-lab/pdl-frontend/issues/49)
- Dynamic api uri creation [#78](https://github.com/policy-design-lab/pdl-frontend/issues/78)
- Tooltip styles for semi donut chart [#80](https://github.com/policy-design-lab/pdl-frontend/issues/80)
- Number format shown on map when hovering [#82](https://github.com/policy-design-lab/pdl-frontend/issues/82)
- Errors in the EQIP JSON data files. [#87](https://github.com/policy-design-lab/pdl-frontend/issues/87)

## [0.2.0] - 2023-03-03

### Added
Expand Down Expand Up @@ -35,3 +61,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Landing page details(colors, etc) based on figma design [#9](https://github.com/policy-design-lab/pdl-frontend/issues/9)
- Map data json [#12](https://github.com/policy-design-lab/pdl-frontend/issues/12)
- Final landing page changes for initial milestone [#15](https://github.com/policy-design-lab/pdl-frontend/issues/15)

[unreleased]: https://github.com/policy-design-lab/pdl-frontend/compare/0.3.0...HEAD
[0.3.0]: https://github.com/policy-design-lab/pdl-frontend/tag/0.3.0
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "policy-design-lab",
"version": "0.2.0",
"version": "0.3.0",
"description": "the front end of policy design lab",
"repository": "https://github.com/policy-design-lab/pdl-frontend",
"main": "src/app.tsx",
"scripts": {
"start": "webpack serve --config webpack.dev.js",
"build": "webpack --config ./webpack.prod.js",
"test": "jest --coverage",
"test": "jest --coverage --passWithNoTests",
"test:watch": "npm run test -- --watch",
"lint": "eslint src",
"lint:fix": "npm run lint -- --fix",
Expand Down
23 changes: 23 additions & 0 deletions src/app.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
const baseConfig = {
// put any unchanging configuration information in here
};

const deployConfig = {
apiUrl: "/pdl",
...baseConfig
};

const localConfig = {
apiUrl: "http://localhost:5000/pdl",
...baseConfig
};

// eslint-disable-next-line no-unused-vars
function getConfig() {
if (process.env.APP_ENV === "local") {
return localConfig;
}
return deployConfig;
}

export const config = getConfig();
14 changes: 7 additions & 7 deletions src/app.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import React from 'react';
import Main from './main';
import React from "react";
import Main from "./main";

export default function App(): JSX.Element {
return (
<div>
<Main />
</div>
);
return (
<div>
<Main />
</div>
);
}
Loading

0 comments on commit 4f891c5

Please sign in to comment.