Skip to content
This repository has been archived by the owner on Feb 28, 2022. It is now read-only.

Commit

Permalink
Merging final CFB changes into Master (#413)
Browse files Browse the repository at this point in the history
* Update README.md

* For backwards compatibility, /admin should redirect to /revere/admin (#305)

* Ensure that header and page height add to 100% (#312)

* Did some basic "boyscouting", deleted a lot of unused/commented code (#318)

Basic housekeeping stuff. Part of my effort to clean up and refactor the code according to this guide: https://dev.to/gonedark/10-practices-for-readable-code-143a . This addresses the first two points, code formatting and deleting dead code. Also followed some "boyscouting" guidelines seen here: https://jasonmccreary.me/articles/are-you-a-boy-scout//

* Show cursor pointer for </a>

* Notfoundpage #306 (#311)

* fix(error-page): implement NotFoundPage on 404

remove console log

show NotFoundPage on correct path but wrong route => revere/dewdfewfwf returns NotFoundPage

fix(notfoundpage): fix app rendering notfound on all resource pages

fix(404-page): fix 404 on pages not found

* fix(AppContainer): handle 404

* fix(404): disabled 404 on :resource/admin page

* Change categoryautosortscript to category (#324)

* Bump macaddress from 0.2.8 to 0.2.9 (#322)

Bumps [macaddress](https://github.com/scravy/node-macaddress) from 0.2.8 to 0.2.9.
- [Release notes](https://github.com/scravy/node-macaddress/releases)
- [Commits](scravy/node-macaddress@0.2.8...0.2.9)

Signed-off-by: dependabot[bot] <[email protected]>

* Rename category column (#332)

* Change categoryautosortscript to category

* Change "category" to "categories"

* fixed categories label bug. (#333)

* fixed categories label bug.

* added legacy capability with category autosortscript so it works with MSM and other test templates.
once we merge development and master, we will change the revere sheet column D to "Categories", so we can still demo the master branch without too many problems.

* Updated readme with admin/client views

Explained basic differences btw admin/client views and provided example links

* Update README.md

fixed enumerating list

* Sorting selection box improvements (#320)

* Make footer displace main page instead of drawing over it (#336)

* Make footer displace main page instead of drawing over it

* Remove experimental code

* deploying again (#343) (#344)

* Update README.md

* For backwards compatibility, /admin should redirect to /revere/admin (#305)

* Ensure that header and page height add to 100% (#312)

* Did some basic "boyscouting", deleted a lot of unused/commented code (#318)

Basic housekeeping stuff. Part of my effort to clean up and refactor the code according to this guide: https://dev.to/gonedark/10-practices-for-readable-code-143a . This addresses the first two points, code formatting and deleting dead code. Also followed some "boyscouting" guidelines seen here: https://jasonmccreary.me/articles/are-you-a-boy-scout//

* Show cursor pointer for </a>

* Notfoundpage #306 (#311)

* fix(error-page): implement NotFoundPage on 404

remove console log

show NotFoundPage on correct path but wrong route => revere/dewdfewfwf returns NotFoundPage

fix(notfoundpage): fix app rendering notfound on all resource pages

fix(404-page): fix 404 on pages not found

* fix(AppContainer): handle 404

* fix(404): disabled 404 on :resource/admin page

* Change categoryautosortscript to category (#324)

* Bump macaddress from 0.2.8 to 0.2.9 (#322)

Bumps [macaddress](https://github.com/scravy/node-macaddress) from 0.2.8 to 0.2.9.
- [Release notes](https://github.com/scravy/node-macaddress/releases)
- [Commits](scravy/node-macaddress@0.2.8...0.2.9)

Signed-off-by: dependabot[bot] <[email protected]>

* Rename category column (#332)

* Change categoryautosortscript to category

* Change "category" to "categories"

* fixed categories label bug. (#333)

* fixed categories label bug.

* added legacy capability with category autosortscript so it works with MSM and other test templates.
once we merge development and master, we will change the revere sheet column D to "Categories", so we can still demo the master branch without too many problems.

* Updated readme with admin/client views

Explained basic differences btw admin/client views and provided example links

* Update README.md

fixed enumerating list

* Sorting selection box improvements (#320)

* Make footer displace main page instead of drawing over it (#336)

* Make footer displace main page instead of drawing over it

* Remove experimental code

* Fix tel link (#346)

* 📝 Update Documentation and Templates for Contributors (#355)

* Initial commit of docs with templates and updated CONTRIBUTING guide

* Udpate README for clarity and contributing

* Remove old pull request template

* Update section formatting

* Remove FAQ section until needed

* Update badge centering and remove whitespace

* Update text layout and description text link

* Update broken link and title

* feat: modal replacement (#335)

* Make 'add resource' button toggle add/remove (#361)

* Revert "Make 'add resource' button toggle add/remove (#361)" (#363)

This reverts commit b1a69fd.

* Add correct label to sortbar on the Admin Page (#365)

* Update Contributing Guide(s) Syntax, Style, and Content  (#360)

* Remove old CONTRIBUTING.md

* Updated link to good first issues in contributing guide

* Add additional change category to pull request template

* Make the add-resource button toggle (#364)

* fixed undefined tags bug (#368)

* refactor(entire project): add refactor/css on top on development (#372)

* refactor(entire project): add refactor/css on top on development

* fix(SavedResource): remove function binding in constructor

* chore(yarn): add yarn.lock

* chore(yarn): commit yarn.lock

* chore(vscode settings): add settings.json

* fix(css): implement css fixes

* chore(docs): implement docs folder; add todo on savebutton

* chore(vscode settings): disable auto format

* Fixed Community Connect 'continue' button (#380)

- Changes the 'continue' button to a router link button
- Adds a clearSavedResources redux action and reducer to clear saved
  resources without needing a refresh

* Redux nested state fix and readability improvements (#375)

* Nested state bug fixed, array spread consistency

- The bug with nested state when adding a saved resource is fixed

- Object.assign has been replaced with array spread syntax ([...array1,
  ...array2]) to improve consistency and readability.

* Performance and readability in CardGrid

The mapStateToProps function in the CardGrid component was using a
double for-loop to filter valid results. This fixes that issue by using
a Set, which is O(1) time complexity, so the overall time complexity of
the loop is now O(n) rather than O(n^2).

Additionally, readability is improved by using less code with more
readable apis like map and filter instead of vanilla for loops.

* feat(css): add button animation, rework saved resources (#381)

* feat(css): add button animation, rework saved resources

* remove container-fluid

* feat(loading screen): add custom loading screen

* refactor(appcontainer): remove isfetching conditional in render return

* refactor(app container): break up components

* modify saved resources css

* Added eslint with airbnb config

* Improved eslint config and deps

* Upgraded react-scripts and some dependencies

* Fixed minor Loading bug

* Pinned and updated some react dependencies

* Autofix eslint

* Added prettier with eslint integration

* manually fixed some stuff

* Improved eslint and prettier integration

* Explicitly added recompose to dependencies

* Linted all manual errors

Top changes:
- Added missing propTypes to components
- Export default over named export when only one export
- Possibly confusing namespace collisions

* Fixed some outstanding bugs

* Minor changes

- Removed @emotion dependencies
- Removed NotFoundPageLayout dead code
- Changed a method on SavedResourcesContainer to an arrow function

* Added lint-staged and husky for automatic linting

* Added trailing commas config to prettier

* Autofixed trailing commas

* Fixed accidental bug in OrganizationMarker

* Clear all categories (#391)

* Refactored handleChange and filter resource

1. TODO have filteredResource outside the handle change so we can
handle the selectedCategory state correctly
1. Right now the selectedCategory gets added everytime the check-
box is clicked.

* Refactor lifecycle methods and change styling

- Refactored filter categories
- Replaced checkboxes with list items
- Sort categories alphabetically

* Include proptypes and fix export issue

1. updated proptypes
2. fixed styling using the linter

* Fixed proptypes and included default prop types

* Move clear categories button below list

* WIP feat/code-quality: Code Quality Improvements (#390)

* Fixed plural and singular use in redux

* More plural changes

* Removed dead index.css file

* Updated some packages, and removed ^ from all packages

* Updated packages and fixed deprecation

- Updated reactstrap, react-beautiful-dnd
- Fixed deprecation warnings for component methods

* Updated eslint

* Manually linted to align with new rules

* Removed unused packages

* Update more packages, fix sorting bug

* Removed unused mapbox-gl, updated react testing

* Improved OrganizationCard performance

Uses setImmediate on query-string manipulation for add and remove, which
allows rendering to happen faster

* Removed qs-lite, refactored query-string

- Removed qs-lite, an outdated dependency
- Refactored query-string usage for resources into a utils file
- Removed setImmediate, causing animation issues

* Added source-map-explorer to analyze bundle size

* Admin view and Map View toggle button to more easily build your saved resources page

* Added a localstorage entry for hideFeedback to remind in a week, rather than on refresh

* Fixed redux mutated state bug in CategoryList

* Fixed mutating bug... again

* fix social media links (#399)

* Copy Button on SavedResources Panel (#405)

* add margin to buttons

* add copy button

* increase space between buttons

* use hooks to change icon & title on click

* Implemented print page (#407)

* Implemented print page

* Removed console log

* Added print icon

* Added website

* Removed console log

* 402 space in distance (#404)


* Update OrganizationCardSocialMedia.js

* Add space in distance for each organization card
when running on development.

* Bump tar from 2.2.1 to 2.2.2 (#410)

Bumps [tar](https://github.com/npm/node-tar) from 2.2.1 to 2.2.2.
- [Release notes](https://github.com/npm/node-tar/releases)
- [Commits](isaacs/node-tar@v2.2.1...v2.2.2)

Signed-off-by: dependabot[bot] <[email protected]>

* Bump mixin-deep from 1.3.1 to 1.3.2 (#409)

Bumps [mixin-deep](https://github.com/jonschlinkert/mixin-deep) from 1.3.1 to 1.3.2.
- [Release notes](https://github.com/jonschlinkert/mixin-deep/releases)
- [Commits](jonschlinkert/mixin-deep@1.3.1...1.3.2)

Signed-off-by: dependabot[bot] <[email protected]>

* Bump eslint-utils from 1.4.0 to 1.4.3 (#408)

Bumps [eslint-utils](https://github.com/mysticatea/eslint-utils) from 1.4.0 to 1.4.3.
- [Release notes](https://github.com/mysticatea/eslint-utils/releases)
- [Commits](mysticatea/eslint-utils@v1.4.0...v1.4.3)

Signed-off-by: dependabot[bot] <[email protected]>

* Add and use Collapsible for the categories (#403)

* Add and use Collapsible fir the categories

* first attempt at styling collapseable

* round edges

Co-authored-by: ndesai06 <[email protected]>
Co-authored-by: galia traub <[email protected]>
Co-authored-by: Jason Zhao <[email protected]>
Co-authored-by: Shoubhik Bose <[email protected]>
Co-authored-by: David Ko <[email protected]>
Co-authored-by: Charlie Kelly <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tim Christovich <[email protected]>
Co-authored-by: John Paul Penaloza <[email protected]>
Co-authored-by: Merritt Blanks <[email protected]>
Co-authored-by: Khoawala <[email protected]>
Co-authored-by: Lucas Chartier <[email protected]>
  • Loading branch information
13 people authored Jan 23, 2020
1 parent 7c80362 commit 518d0e9
Show file tree
Hide file tree
Showing 58 changed files with 7,358 additions and 6,982 deletions.
112 changes: 112 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
module.exports = {
parser: "babel-eslint",
extends: ["airbnb", "plugin:prettier/recommended", "prettier/react"],
rules: {
"react/jsx-filename-extension": [
1,
{
extensions: [".js", ".jsx"],
},
],
"no-console": 0,
"react/forbid-prop-types": [
2,
{
forbid: ["any"],
},
],
"react/destructuring-assignment": 0,
"react/no-array-index-key": 0,
"jsx-a11y/no-static-element-interactions": 0,
"jsx-a11y/click-events-have-key-events": 0,
"padding-line-between-statements": [
"error",
{
blankLine: "never",
prev: ["singleline-const", "singleline-let", "singleline-var"],
next: ["singleline-const", "singleline-let", "singleline-var"],
},
{
blankLine: "always",
prev: [
"class",
"function",
"multiline-const",
"multiline-let",
"multiline-var",
"multiline-expression",
"multiline-block-like",
],
next: [
"class",
"function",
"multiline-const",
"multiline-let",
"multiline-var",
"multiline-expression",
"multiline-block-like",
"singleline-const",
"singleline-let",
"singleline-var",
],
},
{
blankLine: "always",
prev: [
"class",
"function",
"multiline-const",
"multiline-let",
"multiline-var",
"multiline-expression",
"multiline-block-like",
"singleline-const",
"singleline-let",
"singleline-var",
],
next: [
"class",
"function",
"multiline-const",
"multiline-let",
"multiline-var",
"multiline-expression",
"multiline-block-like",
],
},
{
blankLine: "always",
prev: "*",
next: "cjs-export",
},
{
blankLine: "always",
prev: "cjs-import",
next: "*",
},
{
blankLine: "never",
prev: "cjs-import",
next: "cjs-import",
},
{
blankLine: "always",
prev: "*",
next: "return",
},
],
},
env: {
jest: true,
browser: true,
node: true,
es6: true,
},
parserOptions: {
ecmaVersion: 6,
sourceType: "module",
ecmaFeatures: {
jsx: true,
},
},
};
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ package-lock.json

# misc
.DS_Store
.env
.env.local
.env.development.local
.env.test.local
Expand Down
1 change: 1 addition & 0 deletions .yarnrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
save-prefix ""
108 changes: 65 additions & 43 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,57 +2,79 @@
"name": "community-connect",
"version": "0.1.0",
"private": true,
"dependencies": {
"@emotion/core": "^10.0.10",
"@emotion/styled": "^10.0.10",
"@fortawesome/fontawesome-svg-core": "^1.2.15",
"@fortawesome/free-brands-svg-icons": "^5.7.2",
"@fortawesome/free-solid-svg-icons": "^5.7.2",
"@fortawesome/react-fontawesome": "^0.1.4",
"bootstrap": "^4.1.1",
"classnames": "^2.2.6",
"is-url": "^1.2.4",
"jquery": "^3.4.0",
"lodash": "^4.17.15",
"mapbox-gl": "^0.45.0-beta.1",
"node-sass": "^4.12.0",
"npm": "^6.4.1",
"popper.js": "^1.14.7",
"qs-lite": "^0.0.1",
"query-string": "^6.2.0",
"react": "^16.3.2",
"react-beautiful-dnd": "^9.0.2",
"react-dom": "^16.3.2",
"react-fontawesome": "^1.6.1",
"react-google-maps": "^9.4.5",
"react-loader-spinner": "^2.3.0",
"react-mapbox-gl": "^3.8.0",
"react-read-more-less": "^0.1.6",
"react-redux": "^5.0.7",
"react-router": "latest",
"react-router-dom": "^4.3.1",
"react-testing-library": "^6.1.2",
"reactstrap": "^5.0.0",
"redux-thunk": "^2.3.0",
"sass-loader": "^7.1.0",
"tabletop": "^1.5.2"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test --env=jsdom",
"predeploy": "npm run build",
"deploy": "gh-pages -d build",
"eject": "react-scripts eject"
"eject": "react-scripts eject",
"lint": "eslint \"src/**/*.{js,jsx}\"",
"analyze": "source-map-explorer 'build/static/js/*.js'"
},
"dependencies": {
"@fortawesome/fontawesome-svg-core": "1.2.21",
"@fortawesome/free-brands-svg-icons": "5.10.1",
"@fortawesome/free-solid-svg-icons": "5.10.1",
"@fortawesome/react-fontawesome": "0.1.4",
"bootstrap": "4.3.1",
"classnames": "2.2.6",
"is-url": "1.2.4",
"jquery": "3.4.1",
"lodash": "4.17.15",
"node-sass": "4.12.0",
"popper.js": "1.15.0",
"prop-types": "15.7.2",
"query-string": "6.8.2",
"react": "16.9.0",
"react-beautiful-dnd": "11.0.5",
"react-collapsible": "2.6.0",
"react-dom": "16.9.0",
"react-fontawesome": "1.6.1",
"react-google-maps": "9.4.5",
"react-read-more-less": "0.1.6",
"react-redux": "7.1.0",
"react-router": "5.0.1",
"react-router-dom": "5.0.1",
"react-testing-library": "8.0.1",
"reactstrap": "8.0.1",
"recompose": "0.30.0",
"redux": "4.0.4",
"redux-immutable-state-invariant": "2.1.0",
"redux-thunk": "2.3.0",
"sass-loader": "7.2.0",
"source-map-explorer": "2.0.1",
"tabletop": "1.5.2"
},
"devDependencies": {
"@fortawesome/fontawesome-free": "^5.7.2",
"babel-eslint": "^8.0.1",
"enzyme": "^3.9.0",
"enzyme-adapter-react-16": "^1.12.1",
"jest-emotion": "^10.0.10",
"react-scripts": "2.0.0-next.66cc7a90",
"redux-immutable-state-invariant": "^2.1.0"
"@fortawesome/fontawesome-free": "5.10.1",
"enzyme": "3.10.0",
"enzyme-adapter-react-16": "1.14.0",
"eslint-config-airbnb": "18.0.0",
"eslint-config-prettier": "6.0.0",
"eslint-plugin-import": "2.18.2",
"eslint-plugin-jsx-a11y": "6.2.3",
"eslint-plugin-prettier": "3.1.0",
"eslint-plugin-react": "7.14.3",
"husky": "3.0.3",
"jest-emotion": "10.0.14",
"lint-staged": "9.2.1",
"prettier": "1.18.2",
"react-scripts": "3.1.0"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"*.{js,jsx}": [
"eslint --fix",
"git add"
]
},
"prettier": {
"trailingComma": "es5"
},
"browserslist": {
"development": [
Expand Down
31 changes: 12 additions & 19 deletions src/App/App.test.js
Original file line number Diff line number Diff line change
@@ -1,31 +1,24 @@
import React from 'react';
import AppContainer from './AppContainer';
import {
render,
fireEvent,
cleanup,
waitForElement,
} from 'react-testing-library';
import { Provider } from 'react-redux';
import { BrowserRouter } from 'react-router-dom';
import { createStore } from 'redux';
import { MemoryRouter } from 'react-router';
import Enzyme, { mount } from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';
import React from "react";
import { Provider } from "react-redux";
import { createStore } from "redux";
import { MemoryRouter } from "react-router";
import Enzyme, { mount } from "enzyme";
import Adapter from "enzyme-adapter-react-16";
import AppContainer from "./AppContainer";

Enzyme.configure({ adapter: new Adapter() });

const store = createStore(
() => ({ isFetchingResource: false, savedResource: [], resource: [] }),
['Use Redux'],
["Use Redux"]
);

test('renders without crashing', () => {
const wrapper = mount(
test("renders without crashing", () => {
mount(
<Provider store={store}>
<MemoryRouter initialEntries={['/']}>
<MemoryRouter initialEntries={["/"]}>
<AppContainer />
</MemoryRouter>
</Provider>,
</Provider>
);
});
Loading

0 comments on commit 518d0e9

Please sign in to comment.