Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🚀 Prep Tasks for Framework Migration #974

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
f4346d0
add react-native-web
JGreenlee Mar 31, 2023
b295399
create angular-react-helper
JGreenlee Apr 3, 2023
33d6839
add prop-types as dependency
JGreenlee Apr 3, 2023
ef4ff2b
refactor composite trip unpacking
JGreenlee May 15, 2023
2b676b5
unpack 'sections' and 'stops' of composite trips
JGreenlee May 15, 2023
da1801d
display sections + %'s on label screen maps
JGreenlee May 17, 2023
210614d
allow date selection on label screen
JGreenlee May 18, 2023
d0205b4
add sections, pcts, & chart to label detail screen
JGreenlee May 19, 2023
689cff0
handle sections=undefined on label screen details
JGreenlee May 20, 2023
73089d7
add wrappers around filter-select and date-input
JGreenlee May 20, 2023
9a4fff3
have filters show the number of trips in HTML
JGreenlee May 20, 2023
230116d
tweak styles
JGreenlee May 20, 2023
67a37a3
init date picker wrt the timespan of loaded trips
JGreenlee May 20, 2023
73965eb
Merge branch 'master_for_platform' of https://github.com/e-mission/e-…
JGreenlee May 22, 2023
67f40f2
implement draft trips on label screen
JGreenlee May 23, 2023
2cba0c2
rename trip2Geojson, as it doesn't do that anymore
JGreenlee May 23, 2023
ce9b2aa
remove unused code
JGreenlee May 23, 2023
9f6125c
adjust draft trip properties
JGreenlee May 23, 2023
7796bf5
styling tweaks
JGreenlee May 23, 2023
a4a7177
remove unused functions in services.js
JGreenlee May 23, 2023
821dd2c
remove diary screen
JGreenlee May 23, 2023
0161d28
remove more diary screen code
JGreenlee May 23, 2023
7e4d7f9
remove nz/tour, goals, common, posttrip, heatmap
JGreenlee May 23, 2023
4c0f97b
remove unused templates & html <script> tags
JGreenlee May 23, 2023
3c9075f
remove remaining walkthrough references
JGreenlee May 23, 2023
6df260e
remove more unused templates
JGreenlee May 23, 2023
ca6a9ec
remove 'recent' and 'current'
JGreenlee May 23, 2023
2398a63
remove current.html
JGreenlee May 24, 2023
2e2ac8e
remove unused styles
JGreenlee May 24, 2023
7b998e8
remove angularjs-slider
JGreenlee May 24, 2023
84e5e93
remove bower; add webpack and react
JGreenlee May 24, 2023
2a58b9b
experiment with Leaflet wrapped in WebView
JGreenlee May 25, 2023
c924ac9
add LeafletView, remove ui-leaflet
JGreenlee May 25, 2023
df6d3d6
remove package-lock.json
JGreenlee May 25, 2023
4ca207d
fix maps scrolling issue
JGreenlee May 25, 2023
14e8a67
use i18next instead of angular translate
JGreenlee May 26, 2023
d325626
fix spanish error creating Date() from 'LLL'
JGreenlee May 26, 2023
4a230c4
tidy up i18next initialization
JGreenlee May 26, 2023
2332197
remove unused/unmaintained control settings
JGreenlee May 26, 2023
85f8347
reinstate "Check Log", "Check Sensed" controls
JGreenlee May 26, 2023
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ app-settings.json
*.apk
*.app.zip
*.ipa
www/dist/
www/js/control/collect-settings.js
www/js/control/sync-settings.js
www/js/control/transition-notify-settings.js
Expand Down
34 changes: 0 additions & 34 deletions bower.json

This file was deleted.

1 change: 1 addition & 0 deletions config.serve.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
</author>
<content src="index.html" />
<access origin="*" />
<allow-navigation href="*" />
JGreenlee marked this conversation as resolved.
Show resolved Hide resolved
<hook src="hooks/before_prepare/download_translation.js" type="before_prepare" />
<preference name="webviewbounce" value="false" />
<preference name="UIWebViewBounce" value="false" />
Expand Down
53 changes: 0 additions & 53 deletions gulpfile.js.unused

This file was deleted.

76 changes: 0 additions & 76 deletions my.conf.js

This file was deleted.

65 changes: 61 additions & 4 deletions package.serve.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,74 @@
},
"scripts": {
"setup-serve": "./bin/download_settings_controls.js && ./bin/setup_autodeploy.js",
"serve": "phonegap --verbose serve"
"serve": "webpack && concurrently -k \"phonegap --verbose serve\" \"webpack --watch\"",
"serve-only": "phonegap --verbose serve"
},
"devDependencies": {
"phonegap": "9.0.0+cordova.9.0.0",
"cordova": "^11.1.0",
"@babel/core": "^7.21.3",
"@babel/plugin-proposal-class-properties": "^7.18.6",
"@babel/plugin-proposal-object-rest-spread": "^7.20.7",
"@babel/preset-env": "^7.21.4",
"@babel/preset-flow": "^7.21.4",
"@babel/preset-react": "^7.18.6",
"@babel/preset-typescript": "^7.21.4",
"@ionic/cli": "6.20.8",
"bower": "1.8.14"
"babel-loader": "^9.1.2",
"babel-plugin-optional-require": "^0.3.1",
"concurrently": "^8.0.1",
"cordova": "^11.1.0",
"css-loader": "^6.7.4",
"exports-loader": "^4.0.0",
"expose-loader": "^4.1.0",
"file-loader": "^6.2.0",
"phonegap": "9.0.0+cordova.9.0.0",
"process": "^0.11.10",
"style-loader": "^3.3.3",
"ts-loader": "^9.4.2",
"typescript": "^5.0.3",
"url-loader": "^4.1.1",
"webpack": "^5.0.1",
"webpack-cli": "^5.0.1"
},
"dependencies": {
"angular": "1.6.7",
"angular-animate": "1.6.7",
"angular-local-storage": "^0.7.1",
"angular-nvd3": "^1.0.7",
"angular-qrcode": "https://github.com/sebastianbarry/angular-qrcode.git#v7.3.0",
"angular-sanitize": "1.6.7",
"angular-simple-logger": "^0.1.7",
"angular-translate": "^2.18.1",
"angular-translate-loader-static-files": "^2.18.1",
"angular-ui-router": "0.2.13",
"animate.css": "^3.5.2",
"bottleneck": "^2.19.5",
"core-js": "^2.5.7",
"fs-extra": "^9.0.1",
"i18next": "^22.5.0",
"install": "^0.13.0",
"ionic-datepicker": "1.2.1",
"ionic-toast": "^0.4.1",
"jquery": "^3.1.0",
"jquery-xml2json": "^0.0.8",
"klaw-sync": "^6.0.0",
"leaflet": "^0.7.7",
"leaflet-plugins": "^3.0.0",
"leaflet.awesome-markers": "^2.0.5",
"messageformat": "^2.3.0",
"moment": "^2.29.4",
"moment-timezone": "^0.5.43",
"ng-i18next": "^1.0.7",
shankari marked this conversation as resolved.
Show resolved Hide resolved
"npm": "^9.6.3",
"nvd3": "^1.8.6",
shankari marked this conversation as resolved.
Show resolved Hide resolved
"prop-types": "^15.8.1",
"react": "^18.2.*",
"react-dom": "^18.2.*",
"react-native-paper": "^5.8.0",
"react-native-safe-area-context": "^4.5.3",
"react-native-vector-icons": "^9.2.0",
"react-native-web": "^0.19.*",
"react-native-web-webview": "^1.0.2",
"shelljs": "^0.8.5"
},
"cordova": {
Expand Down
3 changes: 0 additions & 3 deletions setup/setup_serve.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,5 @@ echo "Configuring the repo for UI development"
echo "Setting up all npm packages"
npm install

echo "Updating bower"
npx bower update --allow-root

echo "Pulling the plugin-specific UIs"
npm run setup-serve
3 changes: 0 additions & 3 deletions setup/setup_shared_native.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ cp setup/google-services.fake.for_ci.json google-services.json
echo "Setting up all npm packages"
npm install

echo "Updating bower"
npx bower update

# By default, node doesn't fail if any of the steps fail. This makes it hard to
# use in a CI environment, and leads to people reporting the node error rather
# than the underlying error. One solution is to pass in a command line argument to node
Expand Down
96 changes: 96 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
const path = require('path')
const glob = require('glob')
const webpack = require('webpack')

module.exports = {
mode: 'development',
entry: './www/index.js',
devtool: 'inline-source-map',
output: {
path: path.resolve(__dirname, 'www/dist'),
filename: 'bundle.js',
shankari marked this conversation as resolved.
Show resolved Hide resolved
},
module: {
rules: [
// to load CSS
{
test: /\.css$/,
use: ['style-loader', 'css-loader'],
},
// to resolve url() in CSS
{
test: /\.(png|jpg)$/,
loader: 'url-loader'
},
// necessary for react-native-web to bundle JSX
{
test: /\.jsx$/,
exclude: /node_modules\/(?!()\/).*/,
use: {
loader: 'babel-loader',
options: {
presets: ['@babel/preset-env', '@babel/preset-react'],
},
},
},
// necessary for react-native-paper to load images, fonts, and vector graphics
{
test: /\.(jpg|png|woff|woff2|eot|ttf|svg)$/,
type: 'asset/resource',
},
// necessary for react-native-paper to load icons
{
test: /\.js$/,
exclude: /node_modules[/\\](?!react-native-vector-icons)/,
use: {
loader: 'babel-loader',
options: {
// Disable reading babel configuration
babelrc: false,
configFile: false,

// The configuration for compilation
presets: [
['@babel/preset-env', { useBuiltIns: 'usage' }],
'@babel/preset-react',
'@babel/preset-flow',
"@babel/preset-typescript"
],
plugins: [
'@babel/plugin-proposal-class-properties',
'@babel/plugin-proposal-object-rest-spread'
],
},
},
},
// necessary to load html files
{
test: /\.html$/i,
loader: 'file-loader'
}
],
},
plugins: [
// to load jQuery and moment globally
new webpack.ProvidePlugin({
$: 'jquery',
moment: 'moment',
L: 'leaflet',
})
],
devServer: {
historyApiFallback: true,
contentBase: './',
hot: true,
},
// "react-native" must be aliased to "react-native-web"
// https://necolas.github.io/react-native-web/docs/setup/#package-aliasing
resolve: {
alias: {
'react-native$': 'react-native-web',
'react-native-webview': 'react-native-web-webview',
'react-native-vector-icons': false
},
extensions: ['.web.js', '.jsx', '.tsx', '.ts', '.js'],
},
}
Loading