Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:wevote/WebApp into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
Lisa Primeaux-Redmond committed Jan 11, 2024
2 parents 54ae62e + 8de6d6f commit b3f64c3
Show file tree
Hide file tree
Showing 9 changed files with 10,042 additions and 35,734 deletions.
6 changes: 3 additions & 3 deletions .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
],
"plugins": [
[
"@babel/plugin-proposal-class-properties",
"@babel/plugin-transform-class-properties",
{
"loose": true
}
],
["@babel/plugin-proposal-private-methods", { "loose": true }],
["@babel/plugin-proposal-private-property-in-object", { "loose": true }],
["@babel/plugin-transform-private-methods", { "loose": true }],
["@babel/plugin-transform-private-property-in-object", { "loose": true }],
[
"babel-plugin-styled-components",
{
Expand Down
4 changes: 2 additions & 2 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"parser": "babel-eslint",
"parser": "@babel/eslint-parser",
"parserOptions": {
"sourceType": "module"
},
Expand Down Expand Up @@ -74,7 +74,7 @@
"space-before-function-paren": [1, {"anonymous": "always", "named": "always"}],
"space-in-parens": [1],
"template-curly-spacing": ["warn", "never"],
"react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }],
"react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }]
},
"plugins": [
"react",
Expand Down
45,678 changes: 9,998 additions & 35,680 deletions package-lock.json

Large diffs are not rendered by default.

53 changes: 26 additions & 27 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,25 +40,26 @@
"chromatic": "npx chromatic --project-token=chpt_89afc2af23dd1fd"
},
"devDependencies": {
"@babel/core": "^7.13.16",
"@babel/plugin-proposal-class-properties": "^7.12.13",
"@babel/plugin-proposal-private-methods": "^7.18.6",
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
"@babel/core": "^7.23.7",
"@babel/eslint-parser": "^7.23.3",
"@babel/plugin-syntax-class-properties": "^7.12.13",
"@babel/plugin-syntax-import-meta": "^7.10.4",
"@babel/plugin-transform-runtime": "^7.13.6",
"@babel/preset-env": "^7.13.15",
"@babel/preset-react": "^7.12.1",
"@babel/register": "^7.13.16",
"@babel/plugin-transform-class-properties": "^7.23.3",
"@babel/plugin-transform-private-methods": "^7.23.3",
"@babel/plugin-transform-private-property-in-object": "^7.23.4",
"@babel/plugin-transform-runtime": "^7.23.7",
"@babel/preset-env": "^7.23.7",
"@babel/preset-react": "^7.23.3",
"@babel/register": "^7.23.7",
"@snyk/protect": "^1.657.0",
"@storybook/addon-essentials": "^7.6.3",
"@storybook/addon-interactions": "^7.6.3",
"@storybook/addon-links": "^7.6.3",
"@storybook/addon-onboarding": "^1.0.9",
"@storybook/blocks": "^7.6.3",
"@storybook/react": "^7.6.3",
"@storybook/react-webpack5": "^7.6.3",
"@storybook/test": "^7.6.3",
"@storybook/addon-essentials": "^7.6.7",
"@storybook/addon-interactions": "^7.6.7",
"@storybook/addon-links": "^7.6.7",
"@storybook/addon-onboarding": "^1.0.10",
"@storybook/blocks": "^7.6.7",
"@storybook/react": "^7.6.7",
"@storybook/react-webpack5": "^7.6.7",
"@storybook/test": "^7.6.7",
"@wdio/browserstack-service": "^8.15.10",
"@wdio/cli": "^8.15.10",
"@wdio/config": "^8.15.10",
Expand All @@ -68,15 +69,14 @@
"@wdio/protocols": "^8.14.6",
"@wdio/spec-reporter": "^8.15.10",
"axios": "^1.6.0",
"babel-eslint": "^10.1.0",
"babel-loader": "^9.1.0",
"babel-plugin-styled-components": "^2.0.6",
"babel-loader": "^9.1.3",
"babel-plugin-styled-components": "^2.1.4",
"chai": "^4.3.7",
"chromatic": "^10.1.0",
"clean-webpack-plugin": "^3.0.0",
"copy-webpack-plugin": "^11.0.0",
"cordova-plugin-contacts-x": "^2.0.3",
"css-minimizer-webpack-plugin": "^3.4.1",
"css-minimizer-webpack-plugin": "^5.0.1",
"eslint": "^7.24.0",
"eslint-config-airbnb": "^18.2.1",
"eslint-plugin-import": "^2.22.1",
Expand All @@ -89,14 +89,12 @@
"express": "^4.17.1",
"file-loader": "^6.2.0",
"html-webpack-plugin": "^5.3.1",
"jsdom": "^16.5.3",
"jsdom": "^23.0.1",
"mini-css-extract-plugin": "^2.7.1",
"mocha": "^9.2.2",
"mocha": "^10.2.0",
"moment-locales-webpack-plugin": "^1.2.0",
"npm-check-updates": "^16.10.9",
"pre-commit": "^1.2.2",
"react-hot-loader": "^4.13.1",
"remove-files-webpack-plugin": "^1.5.0",
"storybook": "^7.6.3",
"terser-webpack-plugin": "^5.1.2",
"unused-webpack-plugin": "^2.4.0",
Expand Down Expand Up @@ -131,15 +129,15 @@
"gapi-script": "github:wevote/gapi-script",
"glob": "^9.0.0",
"iframe-resizer-react": "^1.1.0",
"jquery": "^3.6.0",
"jquery": "^3.7.1",
"keymirror": "~0.1.1",
"lodash-es": "^4.17.21",
"moment": "^2.29.4",
"mui-file-dropzone": "^4.0.1",
"object-assign": "~4.1.1",
"process": "^0.11.10",
"prop-types": "~15.7.2",
"puppeteer": "^19.7.3",
"puppeteer": "^21.6.1",
"react": "~17.0.2",
"react-bootstrap": "^1.6.4",
"react-copy-to-clipboard": "^5.0.3",
Expand All @@ -153,7 +151,8 @@
"react-helmet-async": "^1.3.0",
"react-phone-number-input": "^3.1.11",
"react-player": "^2.9.0",
"react-router-dom": "~5.2.0",
"react-router-dom": "^5.3.4",
"react-router-dom-v5-compat": "^6.21.1",
"react-share": "^4.4.1",
"react-slick": "^0.28.1",
"react-svg": "^14.1.9",
Expand Down
2 changes: 1 addition & 1 deletion src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ class App extends Component {
if (showReadyLight) {
return <ReadyLight showReadyHeavy={this.setShowReadyHeavy} />;
} else {
return <Redirect to="/ready" />;
return <Route render={() => <Redirect to="/ready" />} />;
}
}}
</Route>
Expand Down
11 changes: 7 additions & 4 deletions src/index.jsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import React from 'react';
import ReactDOM from 'react-dom';
import { HelmetProvider } from 'react-helmet-async';
import { CompatRouter } from 'react-router-dom-v5-compat';
import App from './App';
import ErrorBoundary from './js/common/components/Widgets/ErrorBoundary';
import WeVoteRouter from './js/common/components/Widgets/WeVoteRouter';
import App from './App';
import { isAndroid } from './js/common/utils/cordovaUtils';
// importStartCordovaToken -- Do not remove this line!

Expand Down Expand Up @@ -38,9 +39,11 @@ function startReact () {
ReactDOM.render(
<ErrorBoundary>
<WeVoteRouter>
<HelmetProvider>
<App />
</HelmetProvider>
<CompatRouter>
<HelmetProvider>
<App />
</HelmetProvider>
</CompatRouter>
</WeVoteRouter>
</ErrorBoundary>,
document.getElementById('app'),
Expand Down
5 changes: 3 additions & 2 deletions src/js/common/utils/historyPush.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ import webAppConfig from '../../config';
// See v5: https://reactrouter.com/native/api/Hooks/usehistory
// IMPORTANT: The HTML5 window.history, is very different from the react-router V5 history, don't use window.history!
// removePriorPathname determines whether the route should be pushed or replace the previous entry in the history stack.
export default function historyPush (route, removePriorPathname = false) {
if (route !== global.weVoteGlobalHistory.location.pathname) {
// doNotPushHistory tells whether the history needs to be updated or not.
export default function historyPush (route, removePriorPathname = false, doNotPushToHistory = false) {
if (route !== global.weVoteGlobalHistory.location.pathname && !doNotPushToHistory) {
if (removePriorPathname) {
global.weVoteGlobalHistory.replace(route);
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/js/components/Share/ShareButtonDesktopTablet.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ class ShareButtonDesktopTablet extends Component {
if (!stringContains('/modal/share', pathname) && isWebApp()) {
const pathnameWithModalShare = `${pathname}${pathname.endsWith('/') ? '' : '/'}modal/share`;
// console.log('Navigation ShareButtonDesktopTablet openShareModal ', pathnameWithModalShare)
historyPush(pathnameWithModalShare);
historyPush(pathnameWithModalShare, false, true);
}
}

Expand Down
15 changes: 1 addition & 14 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const CssMinimizerPlugin = require('css-minimizer-webpack-plugin');
const ESLintPlugin = require('eslint-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const MomentLocalesPlugin = require('moment-locales-webpack-plugin');
const RemovePlugin = require('remove-files-webpack-plugin');
// const RemovePlugin = require('remove-files-webpack-plugin'); removed due to outdated dependencies 1/3/2023
const SourceMapDevToolPlugin = require('webpack/lib/SourceMapDevToolPlugin');
const TerserPlugin = require('terser-webpack-plugin');
const UnusedWebpackPlugin = require('unused-webpack-plugin');
Expand Down Expand Up @@ -158,19 +158,6 @@ module.exports = (env, argv) => ({
exclude: [/node_modules/, /css/],
}),
]),
...(isWebApp ? [
new RemovePlugin({
before: {
include: [
'./srcCordova',
],
log: true,
logWarning: false,
// logError: true,
// logDebug: true,
},
}),
] : []),
],
devServer: {
allowedHosts: 'all',
Expand Down

0 comments on commit b3f64c3

Please sign in to comment.