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

trying to fix my branch to be up to date #1

Merged
merged 107 commits into from
Jun 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
107 commits
Select commit Hold shift + click to select a range
397b76a
:bug: port over fix for the backwards compat code
shankari Jun 8, 2023
23e982e
:bug: :poop: Temporarily comment out the error while retrieving the n…
shankari Jun 8, 2023
5b3dc29
:children_crossing: Make the "Fix" and "Refresh" buttons look like bu…
shankari Jun 8, 2023
e518109
Merge pull request #987 from shankari/minor_casr_fixes
shankari Jun 8, 2023
17d81f7
adding link to dev app
Jun 8, 2023
78e0db4
added mention of releases
Jun 9, 2023
b587a23
Merge pull request #988 from Abby-Wheelis/master_for_platform
shankari Jun 9, 2023
5dce0d9
fix 'serve' deployment setup script
JGreenlee Jun 12, 2023
4a21c61
Merge pull request #991 from JGreenlee/fix-serve-deployment
shankari Jun 12, 2023
7bd2ad2
create TimestampBadge component
JGreenlee Jun 13, 2023
4ce4090
add react-i18next
JGreenlee Jun 14, 2023
1aa1877
replace multilabel-ui with MultiLabelButtonGroup
JGreenlee Jun 14, 2023
6578d8a
allow the use of React Native icons
JGreenlee Jun 15, 2023
dbc896d
finish MultiLabelButtonGroup functionality
JGreenlee Jun 15, 2023
050b21d
remove multilabel directive
JGreenlee Jun 15, 2023
a83e3cd
remove ModeSelectMenu.jsx
JGreenlee Jun 15, 2023
f105d83
adjust theme colors
JGreenlee Jun 15, 2023
395e600
remove checkOtherOption
JGreenlee Jun 15, 2023
b843160
rename .jsx files to .tsx
JGreenlee Jun 15, 2023
613ea29
add typescript; tidy webpack config
JGreenlee Jun 15, 2023
595b405
exclude manual_lib and dist from tsconfig
JGreenlee Jun 15, 2023
ac1d7e1
remove explicit 'children' props from components
JGreenlee Jun 15, 2023
0349eeb
enable esModuleInterop
JGreenlee Jun 15, 2023
5b943f2
make the multilabel checkmark bold
JGreenlee Jun 16, 2023
02e7a44
fix margins and borders of ionic popover
JGreenlee Jun 16, 2023
d71eb5f
remove "one click button"
JGreenlee Jun 16, 2023
4e8ec6e
create AddNoteButton.tsx
JGreenlee Jun 17, 2023
91d8ea0
display icons correctly on DiaryButton
JGreenlee Jun 17, 2023
57d39c5
only show MultilabelButtonGroup if in elementTag
JGreenlee Jun 17, 2023
1d0871c
remove enketoAddNoteButton directive
JGreenlee Jun 17, 2023
96506b5
add UserInputButton.jsx
JGreenlee Jun 17, 2023
9a4cba7
add description in AddNoteButton.jsx
JGreenlee Jun 17, 2023
4bdd630
create AddedNotesList.tsx
JGreenlee Jun 17, 2023
6cdcff0
tidy AddedNotesList.tsx
JGreenlee Jun 17, 2023
9123f3f
add appTheme.ts
JGreenlee Jun 19, 2023
960d134
add DiaryCard.tsx
JGreenlee Jun 19, 2023
7aee500
add useAppConfig hook
JGreenlee Jun 19, 2023
eaae2c3
make TimestampBadge accept otherProps
JGreenlee Jun 19, 2023
3ae5406
make LeafletView accept otherProps & add CSS
JGreenlee Jun 19, 2023
93e73b9
useEffect to set label in AddNoteButton
JGreenlee Jun 19, 2023
9441ec5
add TripCard, PlaceCard, and UntrackedTimeCard
JGreenlee Jun 19, 2023
a443365
DiaryButton: use colors from theme, not hardcoded
JGreenlee Jun 19, 2023
43054a2
remove the old infscroll list_item directives
JGreenlee Jun 19, 2023
63bbaf1
tweak style of TimestampBadge
JGreenlee Jun 19, 2023
b2bbd52
tweak DiaryButton style
JGreenlee Jun 19, 2023
344936b
extract filter select and date input to components
JGreenlee Jun 20, 2023
4a8db52
add LoadMoreButton
JGreenlee Jun 20, 2023
6fa9626
add TimelineScrollList
JGreenlee Jun 21, 2023
b657a28
fix conflicting header bars of Ionic and RN Paper
JGreenlee Jun 21, 2023
cffed38
remove infinite_scroll_list.html
JGreenlee Jun 21, 2023
85838f4
fix background color
JGreenlee Jun 21, 2023
606dfbd
adjust margin of DiaryCard
JGreenlee Jun 21, 2023
c733b83
remove unused props of MultiLabelButtonGroup
JGreenlee Jun 21, 2023
16ac7fb
add back some dependencies of infinite_scroll_list
JGreenlee Jun 21, 2023
fb9da34
refactor TimelineScrollList
JGreenlee Jun 21, 2023
910262a
TimelineScrollList: increase elevation of header
JGreenlee Jun 21, 2023
aaae7c0
TimelineScrollList: more refactoring/simplifying
JGreenlee Jun 21, 2023
87a9f94
remove unneeded FlashList props
JGreenlee Jun 21, 2023
a3ebc3a
allow LoadMoreButton to accept otherProps
JGreenlee Jun 21, 2023
7027002
switch DateSelect to use loadSpecificWeek
JGreenlee Jun 21, 2023
b306c7d
TimelineScrollList: fix refresh button
JGreenlee Jun 21, 2023
57342d7
add loading spinner to TimelineScrollList
JGreenlee Jun 21, 2023
84bf748
fix Multilabel update on label
JGreenlee Jun 21, 2023
4c02c6b
fix "replaced mode" popover
JGreenlee Jun 21, 2023
fece489
remove unused param in fetchTripsInRange
JGreenlee Jun 21, 2023
f1faa0a
TimelineScrollList: setIsLoading on refresh
JGreenlee Jun 21, 2023
5c884d9
iOS: adjust header bar dimensions
JGreenlee Jun 21, 2023
1736207
don't use trip-specific 'key' in multilabel
JGreenlee Jun 21, 2023
11fc98c
reorganize webpack config to allow build
JGreenlee Jun 21, 2023
e96cdcd
take explicit 'name' arg in angularize()
JGreenlee Jun 21, 2023
fb6cceb
explicit annotation in angular-react-helper.tsx
JGreenlee Jun 21, 2023
cb78608
apply .fill-container to both uses of <qr-code>
JGreenlee Jun 22, 2023
7aff0d6
extract LeafletView and QrCode to /components
JGreenlee Jun 22, 2023
025bb8c
extract trip/place/untracked cards to /diary/cards
JGreenlee Jun 22, 2023
e2dd6f1
extract labelscreen list components to /diary/list
JGreenlee Jun 22, 2023
76756d5
fix leaflet attribution covering map
JGreenlee Jun 22, 2023
77b1bdb
rename TimelineScrollList to LabelTab
JGreenlee Jun 22, 2023
2a08d02
Merge branch 'master' of https://github.com/e-mission/e-mission-phone…
shankari Jun 22, 2023
e91c8d0
Merge branch 'master_for_platform' of https://github.com/e-mission/e-…
shankari Jun 22, 2023
16e2efd
Merge branch 'framework_migration_prep' of https://github.com/e-missi…
shankari Jun 22, 2023
4242b1f
organize list of LabelTab into TimelineScrollList
JGreenlee Jun 23, 2023
e52b751
move LabelTab out of js/diary/list
JGreenlee Jun 23, 2023
3ee6263
implement React Navigation
JGreenlee Jun 23, 2023
aafe00f
fix useAppConfig to wait for $ionicPlatform too
JGreenlee Jun 23, 2023
2e9b315
fix ionic viewable area height
JGreenlee Jun 23, 2023
8217a99
navigate to details by passing trip object
JGreenlee Jun 23, 2023
269f725
wait for $ionicPlatform BEFORE DynamicConfig
JGreenlee Jun 23, 2023
30146f0
cleanup unused code in LabelTab
JGreenlee Jun 23, 2023
1519b18
update names of context vars from LabelTab
JGreenlee Jun 23, 2023
ee1d290
add surveyOpt to LabelTabContext
JGreenlee Jun 23, 2023
92063a3
create UI of LabelDetailsScreen
JGreenlee Jun 23, 2023
8f56fdc
delete infinite_scroll_detail.js
JGreenlee Jun 23, 2023
8eff214
remove deleted style in LabelDetailsScreen
JGreenlee Jun 23, 2023
89c119e
join page: fix 'welcome' translation
JGreenlee Jun 25, 2023
5bb0eee
➕ 📌 Copy over all the npm dependencies to the cordovabuild as well
shankari Jun 25, 2023
b9bff4d
update MotionTypes in DiaryHelper
JGreenlee Jun 26, 2023
dba6b23
update LabelDetailsScreen
JGreenlee Jun 26, 2023
e929f32
add 'mode percents' indicator to TripCard
JGreenlee Jun 26, 2023
110267c
update package.cordovabuild.json
JGreenlee Jun 26, 2023
8c7d6e6
fix OSM tiles not loading in built application
JGreenlee Jun 26, 2023
c350764
don't detach main view on navigate to LabelDetails
JGreenlee Jun 26, 2023
9551fd2
Merge branch 'framework_migration_prep' into label-screen-react-migra…
JGreenlee Jun 26, 2023
c0cf400
fix versioning in package.cordovabuild.json
JGreenlee Jun 28, 2023
c724ac1
Merge pull request #993 from JGreenlee/label-screen-react-migration
shankari Jun 28, 2023
f125321
Merge branch 'framework_migration_prep' into framework_migration_prep
Abby-Wheelis Jun 28, 2023
a3097ac
adding additional argument to angularize call
Jun 28, 2023
ffd2bc2
fixing merge conflicts
Jun 28, 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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Updating the UI only
---
[![osx-serve-install](https://github.com/e-mission/e-mission-phone/workflows/osx-serve-install/badge.svg)](https://github.com/e-mission/e-mission-phone/actions?query=workflow%3Aosx-serve-install)

If you want to make only UI changes, (as opposed to modifying the existing plugins, adding new plugins, etc), you can use the **new and improved** (as of June 2018) e-mission dev app.
If you want to make only UI changes, (as opposed to modifying the existing plugins, adding new plugins, etc), you can use the **new and improved** (as of June 2018) [e-mission dev app](https://github.com/e-mission/e-mission-devapp/) and install the most recent version from [releases](https://github.com/e-mission/e-mission-devapp/releases).

### Installing (one-time)

Expand Down
74 changes: 71 additions & 3 deletions package.cordovabuild.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,37 @@
"type": "git",
"url": "git+https://github.com/e-mission/e-mission-phone.git"
},
"scripts": {
"build": "npx webpack --config webpack.prod.js && npx cordova build"
},
"devDependencies": {
"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-angularjs-annotate": "^0.10.0",
"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",
"sass": "^1.62.1",
"sass-loader": "^13.3.1",
"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"
},
"cordova": {
"platforms": [
Expand Down Expand Up @@ -66,6 +93,21 @@
}
},
"dependencies": {
"@havesource/cordova-plugin-push": "git+https://github.com/havesource/cordova-plugin-push.git#4.0.0-dev.0",
"@react-navigation/native": "^6.1.7",
"@react-navigation/stack": "^6.3.17",
"@shopify/flash-list": "^1.3.1",
"angular": "1.6.7",
"angular-animate": "1.6.7",
"angular-local-storage": "^0.7.1",
"angular-nvd3": "^1.0.7",
"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",
"cordova-android": "11.0.0",
"cordova-ios": "6.2.0",
"cordova-plugin-advanced-http": "3.3.1",
Expand All @@ -87,9 +129,35 @@
"cordova-plugin-ionic-webview": "5.0.0",
"cordova-plugin-local-notification-12": "github:e-mission/cordova-plugin-local-notification-12#v0.1.4-fix-android-action",
"cordova-plugin-x-socialsharing": "6.0.4",
"core-js": "^2.5.7",
"enketo-core": "^6.1.7",
"fast-xml-parser": "^4.2.2",
"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",
"klaw-sync": "^6.0.0",
"leaflet": "^1.9.4",
"messageformat": "^2.3.0",
"moment": "^2.29.4",
"moment-timezone": "^0.5.43",
"ng-i18next": "^1.0.7",
"npm": "^9.6.3",
"nvd3": "^1.8.6",
"phonegap-plugin-barcodescanner": "git+https://github.com/phonegap/phonegap-plugin-barcodescanner#v8.1.0",
"@havesource/cordova-plugin-push": "git+https://github.com/havesource/cordova-plugin-push.git#4.0.0-dev.0"
"prop-types": "^15.8.1",
"react": "^18.2.*",
"react-dom": "^18.2.*",
"react-i18next": "^12.3.1",
"react-native-paper": "^5.8.0",
"react-native-safe-area-context": "^4.6.3",
"react-native-screens": "^3.22.0",
"react-native-vector-icons": "^9.2.0",
"react-native-web": "^0.18.10",
"react-native-web-webview": "^1.0.2",
"react-qr-code": "^2.0.11",
"shelljs": "^0.8.5"
}
}
10 changes: 7 additions & 3 deletions package.serve.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"scripts": {
"setup-serve": "./bin/download_settings_controls.js && ./bin/setup_autodeploy.js",
"serve": "webpack && concurrently -k \"phonegap --verbose serve\" \"webpack --watch\"",
"serve": "webpack --config webpack.dev.js && concurrently -k \"phonegap --verbose serve\" \"webpack --config webpack.dev.js --watch\"",
"serve-only": "phonegap --verbose serve"
},
"devDependencies": {
Expand Down Expand Up @@ -41,6 +41,9 @@
"webpack-cli": "^5.0.1"
},
"dependencies": {
"@react-navigation/native": "^6.1.7",
"@react-navigation/stack": "^6.3.17",
"@shopify/flash-list": "^1.3.1",
"angular": "1.6.7",
"angular-animate": "1.6.7",
"angular-local-storage": "^0.7.1",
Expand Down Expand Up @@ -74,9 +77,10 @@
"react-dom": "^18.2.*",
"react-i18next": "^12.3.1",
"react-native-paper": "^5.8.0",
"react-native-safe-area-context": "^4.5.3",
"react-native-safe-area-context": "^4.6.3",
"react-native-screens": "^3.22.0",
"react-native-vector-icons": "^9.2.0",
"react-native-web": "^0.19.*",
"react-native-web": "^0.18.10",
"react-native-web-webview": "^1.0.2",
"react-qr-code": "^2.0.11",
"shelljs": "^0.8.5"
Expand Down
2 changes: 2 additions & 0 deletions setup/setup_serve.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ npm install

echo "Pulling the plugin-specific UIs"
npm run setup-serve

npx cordova prepare
14 changes: 14 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"compilerOptions": {
"outDir": "./dist/",
"sourceMap": true,
"module": "es6",
"target": "es5",
"esModuleInterop": true,
"jsx": "react",
"allowJs": true,
"moduleResolution": "node"
},
"include": ["www/**/*"],
"exclude": ["**/www/manual_lib/*", "**/node_modules/*", "**/dist/*"],
}
54 changes: 32 additions & 22 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
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',
Expand All @@ -15,34 +12,47 @@ module.exports = {
// to load CSS and SCSS (enketo-core only supplies SCSS)
{
test: /\.(scss|css)$/,
include: [path.resolve(__dirname, 'www/css'),
path.resolve(__dirname, 'www/manual_lib'),
path.resolve(__dirname, 'node_modules/enketo-core'),
path.resolve(__dirname, 'node_modules/leaflet')],
use: ['style-loader', 'css-loader', 'sass-loader'],
},
// to resolve url() in CSS
{
test: /\.(png|jpg)$/,
loader: 'url-loader'
include: [path.resolve(__dirname, 'www/css'),
path.resolve(__dirname, 'node_modules/react-native-paper'),
path.resolve(__dirname, 'node_modules/@react-navigation/elements')],
use: 'url-loader',
},
// necessary for react-native-web to bundle JSX
{
test: /\.(js|jsx)$/,
exclude: /node_modules[/\\](?!react-native-vector-icons)/,
use: {
loader: 'babel-loader',
options: {
presets: ['@babel/preset-env', '@babel/preset-react'],
},
test: /\.(js|jsx|ts|tsx)$/,
include: [path.resolve(__dirname, 'www'),
path.resolve(__dirname, 'node_modules/react-native-vector-icons')],
loader: 'babel-loader',
options: {
presets: ['@babel/preset-env', '@babel/preset-react', '@babel/preset-typescript'],
},
},
// necessary to load TypeScript files
{
test: /\.(ts|tsx)?$/,
include: path.resolve(__dirname, 'www'),
loader: 'ts-loader',
options: {
transpileOnly: true,
experimentalWatchApi: true,
},
},
// necessary for react-native-paper to load images, fonts, and vector graphics
{
test: /\.(jpg|png|woff|woff2|eot|ttf|svg)$/,
include: [path.resolve(__dirname, 'www'),
path.resolve(__dirname, 'node_modules/react-native-vector-icons')],
type: 'asset/resource',
},
// necessary to load html files
{
test: /\.html$/i,
loader: 'file-loader'
}
],
},
plugins: [
Expand All @@ -52,13 +62,13 @@ module.exports = {
jQuery: 'jquery',
moment: 'moment',
L: 'leaflet',
})
}),
new webpack.DefinePlugin({
// __DEV__ is needed by FlashList; it's set false for production so that certain debugging
// checks can be skipped and performance can be improved
__DEV__: process.env.NODE_ENV !== 'production' || true,
}),
],
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: {
Expand Down
12 changes: 12 additions & 0 deletions webpack.dev.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
const { merge } = require('webpack-merge');
const common = require('./webpack.config.js');

module.exports = merge(common, {
mode: 'development',
devtool: 'inline-source-map',
devServer: {
historyApiFallback: true,
contentBase: './',
hot: true,
},
});
29 changes: 29 additions & 0 deletions webpack.prod.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
const path = require('path')
const common = require('./webpack.config.js');
const { merge } = require('webpack-merge');

module.exports = merge(common, {
mode: 'production',
devtool: 'source-map',
module: {
rules: [
/* In production, Webpack minifies JS files and randomizes variable names.
This causes problems with AngularJS unless you use explicit annotations,
which we don't.
https://docs.angularjs.org/error/$injector/strictdi
(The syntax we use is like the 'bad' example: implicit annotations)
So rather than change every file in our codebase, I'm adding this
babel plugin which basically preprocesses our 'bad' code into 'good' code.
Only needed on production because minification doesn't happen on dev. */
{
test: /\.(js)$/,
include: path.resolve(__dirname, 'www'),
loader: 'babel-loader',
options: {
presets: ['@babel/preset-env'],
plugins: ["angularjs-annotate"],
},
},
],
},
});
46 changes: 6 additions & 40 deletions www/css/main.diary.css
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,12 @@ a.item-content {
width: 230px;
}

.popover .scroll-content {
height: auto;
margin: 0 !important;
border-radius: 0 0 10px 10px !important;
}

.big-popover {
height: 40%;
width: 75%;
Expand Down Expand Up @@ -549,43 +555,3 @@ div.labelfilterlist {
border-top-right-radius: 5px;
border-bottom-right-radius: 5px;
}

enketo-notes-list, .notes-list {
width: 100%;
margin-bottom: 0px;
}

.notes-list {
padding: 0 12px 5px 12px;
text-align: center;
}

.notes-list-grid {
display: grid;
grid-template-columns: auto auto min-content;
grid-auto-rows: 30px;
align-items: center;
gap: 0 8px;
font-size: 12px;
}

.notes-list-grid > li {
display: contents;
}

/* the trash can should appear a bit larger */
.notes-list-grid .icon {
font-size: 22px;
}

/* the note's label will be left-aligned */
.notes-list-grid b {
text-align: left;
margin-left: 5px;
}

.notes-list-grid p {
font-size: inherit;
color: inherit;
margin: 0;
}
Loading