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

Site Prototype Merge #550

Merged
merged 142 commits into from
Oct 19, 2023
Merged
Changes from all commits
Commits
Show all changes
142 commits
Select commit Hold shift + click to select a range
f766813
Add generated nextjs project, no app router
acoard-aot Sep 11, 2023
0690aae
Add basics of site search
acoard-aot Sep 12, 2023
120d1d5
Scaffold out site search and header, have nonfunctioning components t…
acoard-aot Sep 12, 2023
6e50014
Header dropdown to navigate to stubbed out advanced search page
acoard-aot Sep 12, 2023
aa8a110
Fixed header styling
acoard-aot Sep 12, 2023
aa8afa8
Adding vite alternative for pure SPA, copying files
acoard-aot Sep 12, 2023
ea4d549
Creating search results page prior to fake data generation, will stub…
acoard-aot Sep 12, 2023
232c89a
Adding faker.js, still need to tidy up dirs.
acoard-aot Sep 12, 2023
e025771
Have basics of fake data loading and refreshing on page load, but sea…
acoard-aot Sep 12, 2023
e1caeda
Have numerous sites generating, need to filter and search on them now
acoard-aot Sep 12, 2023
3fb06d8
Add basic frontend searching on siteID
acoard-aot Sep 12, 2023
b4abf5a
Updated to Pavel's latest designs, have view buttons styled and click…
acoard-aot Sep 13, 2023
a1d5cfa
Update dummy data with regions and show per designs
acoard-aot Sep 14, 2023
eb78f01
Add search choices, had some issues with them, but having default sea…
acoard-aot Sep 14, 2023
86a2e3c
Move site search to new folder
acoard-aot Sep 14, 2023
ed9b886
Delete old nextjs attempt
acoard-aot Sep 14, 2023
5c82f2f
Delete old nextjs attempt - mk2
acoard-aot Sep 14, 2023
167a203
Added fadeOut/fadeIn
acoard-aot Sep 14, 2023
a2bed6b
Add conditional highlighting for search query
acoard-aot Sep 14, 2023
b461894
Highlighting bug fix showing 'undefined'
acoard-aot Sep 14, 2023
c3763e3
Fix jankiness with delay of display after render
acoard-aot Sep 14, 2023
a5814f2
Move to `frontend/site-search-frontend/`
acoard-aot Sep 14, 2023
0a3c444
Stub out map and site details page
acoard-aot Sep 14, 2023
6f9dc75
Scaffold out map page basics
acoard-aot Sep 18, 2023
6da75a8
Map styling
acoard-aot Sep 18, 2023
6a54c92
Pass through from search > map page
acoard-aot Sep 18, 2023
7a337d6
Remove logs
acoard-aot Sep 19, 2023
3265592
Conditional highlighting depending on search queries
acoard-aot Sep 19, 2023
8673b4b
Fix search toggles working immediately bug, no longer showing old dat…
acoard-aot Sep 19, 2023
34086b3
Fix site search buttons, clean up logs
acoard-aot Sep 19, 2023
8a0fbd8
Search by address toggle working
acoard-aot Sep 19, 2023
307b712
Fix mistakenly highlighting other fields when searching by address
acoard-aot Sep 19, 2023
a8ed2a8
Formatting and searchOptions into simple search results
acoard-aot Sep 19, 2023
69cbb69
Add nullcheck to route on map page on redirect, stops app crash
acoard-aot Sep 19, 2023
c33bc9c
Add spinner onto page
acoard-aot Sep 19, 2023
0aca06a
Add two new search toggles, and change search toggle styling to match…
acoard-aot Sep 19, 2023
f5d8662
Lat/Lng dummy data restricted to bc
acoard-aot Sep 19, 2023
de46e17
Putting map makers based on dummy data
acoard-aot Sep 19, 2023
d92cba9
Scaffold out map details pane
acoard-aot Sep 19, 2023
bc63134
Increase dummy data to 250 records, tweak lat/lng
acoard-aot Sep 19, 2023
19e8bd7
Update map details pane with real dynamic data
acoard-aot Sep 19, 2023
663c0e0
Animate map details page on open/close
acoard-aot Sep 19, 2023
efec17f
Fix CSS for hidden panel blocking click
acoard-aot Sep 19, 2023
1e1a192
Fix erroneous highlighting of lat/lng when searching siteID
acoard-aot Sep 19, 2023
ee84852
Midway through fixing build issues
acoard-aot Sep 22, 2023
4750c48
Fix tsc build issues
acoard-aot Sep 22, 2023
a6948f1
Solve Docker and npm build issues, add map types
acoard-aot Sep 22, 2023
720dd18
"View On Map" button working, basic selection from search>map page
acoard-aot Sep 25, 2023
18ac83f
Statically generate dummy data
acoard-aot Sep 25, 2023
2052aef
Fixed dummy data and properly instantiating site objects
acoard-aot Sep 25, 2023
b056258
Begin creating site details page content
acoard-aot Sep 25, 2023
efe49d2
Added more fields to dummy data
acoard-aot Sep 25, 2023
5b5089b
Site details rows
acoard-aot Sep 25, 2023
61c2196
Basic css styling of site details top part of page working, non respo…
acoard-aot Sep 25, 2023
08da721
Fix npm build issues
acoard-aot Sep 25, 2023
0ee80b3
Add child site details pages and nested router
acoard-aot Sep 25, 2023
7321c34
Add map panel opening on default selection
acoard-aot Sep 25, 2023
0011e67
Site details back button basics
acoard-aot Sep 25, 2023
6dfd7b4
fix: Loading map view directly caused null error
acoard-aot Sep 25, 2023
24f2bd2
Add @types/node to fix docker build issues
acoard-aot Sep 26, 2023
3c856a3
Refactor to use SiteGridItem
acoard-aot Sep 26, 2023
37193ba
Stub out all site details sub pages
acoard-aot Sep 26, 2023
f86249f
Summary routing working
acoard-aot Sep 26, 2023
996a3f9
Site details styling
acoard-aot Sep 26, 2023
81e7ac2
Fix map layer bug by restoring transparent layer
acoard-aot Sep 26, 2023
f30c0e9
Load map on summary details page
acoard-aot Sep 27, 2023
3f6cd83
Readonly styling of SiteGridItem
acoard-aot Sep 27, 2023
61a413a
Attempt to fix marker issue
acoard-aot Sep 27, 2023
550ff13
Add notations sub component
acoard-aot Sep 27, 2023
8a5d68e
Delete internal notes
acoard-aot Sep 27, 2023
78accb8
Dummy data generation for notations
acoard-aot Sep 27, 2023
8e88267
Generate new dummy data with notations
acoard-aot Sep 27, 2023
7a1cb21
Fix consumption of notation dummy data
acoard-aot Sep 27, 2023
10e0a66
Pavel feedback
acoard-aot Sep 28, 2023
1c0431b
Moved edit/user state to Redux
acoard-aot Sep 28, 2023
fe377f6
Notation participants table
acoard-aot Sep 28, 2023
275bce2
Conditionally hiding columns on editMode
acoard-aot Sep 28, 2023
19c7cd5
Hiding other controls based on edit mode
acoard-aot Sep 28, 2023
f81d8b4
Fix default active key
acoard-aot Sep 28, 2023
990510b
Have adding notations working by replacing entire site instance in redux
acoard-aot Sep 28, 2023
99159c8
Add new notation participant working in redux
acoard-aot Sep 28, 2023
6078ca3
Site registry icon and buttons
acoard-aot Sep 28, 2023
b173999
Site registry controls
acoard-aot Sep 28, 2023
0d44005
Made form tables editable, hid buttons behind editMode
acoard-aot Sep 29, 2023
01cd89d
Fix nav pill stylings
acoard-aot Sep 29, 2023
41d20dc
Tidy up notations file
acoard-aot Sep 29, 2023
3daf90e
Add link on summary, can remove if needed, but a nav back
acoard-aot Sep 29, 2023
3e4f2bf
Attempt to fix marker broken on prod by setting prototype image directly
acoard-aot Sep 29, 2023
fa1cc98
Another attempt at fixing map marker icons on prod
acoard-aot Sep 29, 2023
1195477
Creating sub search module
acoard-aot Sep 29, 2023
ff8ce74
Create re-usable SiteDetails table
acoard-aot Sep 29, 2023
80246af
Have Notations page using SiteDetailsTable too now, including state u…
acoard-aot Sep 29, 2023
946dc41
Adjust styling for ministry contact in edit mode per Pavel
acoard-aot Sep 29, 2023
683ea33
Made table SR eye icon clickable per Pavel
acoard-aot Sep 29, 2023
c13ee19
Fix redux storing instances, by removing dates from JSON and only sto…
acoard-aot Sep 29, 2023
3aef9d8
Format json
acoard-aot Sep 29, 2023
78a0ba6
Participants loading data, table label setup
acoard-aot Sep 29, 2023
afde35a
Have checkmarks working in site details table
acoard-aot Sep 29, 2023
4d918e9
Toggle disable field visibility
acoard-aot Sep 29, 2023
45d4662
Site registry icon bulk update on table working
acoard-aot Oct 10, 2023
e3dfb4d
Associated sites table working, but site hyperlinks not working yet
acoard-aot Oct 10, 2023
c4642f0
Create dummy data for all sections beside Documents
acoard-aot Oct 10, 2023
a2144f5
Added ParcelDescription dummy data, was missed previously
acoard-aot Oct 10, 2023
7e3eff6
Have adding and deleting working on participant view
acoard-aot Oct 10, 2023
3d3c0e8
Deleting on notations table, although isn't deleting correct record
acoard-aot Oct 10, 2023
970b3e9
Fix summary highlighting on map link
acoard-aot Oct 10, 2023
53873d6
Start site profile
acoard-aot Oct 10, 2023
9b950fc
Update label per Pavel's new revisions
acoard-aot Oct 10, 2023
e2993e2
Summary items work
acoard-aot Oct 11, 2023
bbe4253
Refactor grid CSS to be reused, improve notation section logic
acoard-aot Oct 11, 2023
76b8990
Site Registry Icon is now clickable and works in table, both features…
acoard-aot Oct 11, 2023
89b1bd9
Read-only location description field
acoard-aot Oct 11, 2023
168abcb
Convert LatLng to d/m/s
acoard-aot Oct 11, 2023
e8ba2d1
Add degree/minute/second lat/lng throught app
acoard-aot Oct 11, 2023
f0fd570
Fix state deletions and key attr
acoard-aot Oct 11, 2023
1f80388
Notations deletions working, added UUID to every record
acoard-aot Oct 11, 2023
15016b4
FormatLatLng on search
acoard-aot Oct 11, 2023
3d9bb03
Deletions working better on site details table
acoard-aot Oct 11, 2023
959a7d3
Auto header check
acoard-aot Oct 11, 2023
cfa9437
Site profile grid formatting
acoard-aot Oct 12, 2023
b49b01b
Activity Log page
acoard-aot Oct 12, 2023
0f75911
Notation SR button functionality
acoard-aot Oct 12, 2023
ed4594b
Add/Remove table working with state updates on parcel and land use
acoard-aot Oct 12, 2023
68d1cf3
Fix minor build issues with vars
acoard-aot Oct 12, 2023
be1dbd2
Added new Documents data and page
acoard-aot Oct 16, 2023
4ba7884
Associated Site creation
acoard-aot Oct 16, 2023
c7dffc9
Text formatting / capitalization
acoard-aot Oct 16, 2023
c603f55
Added more site detail grid rows
acoard-aot Oct 16, 2023
04754bb
Add 'isMinistry' toggle
acoard-aot Oct 16, 2023
b68bff3
Create clickable Associated Sites section, textarea in site disclosure
acoard-aot Oct 17, 2023
d70fc96
Ministry mode formatting on site details
acoard-aot Oct 17, 2023
91522b3
Scroll to notation page, disable scroll on map summary
acoard-aot Oct 17, 2023
6dde686
Fix typing of user slice
acoard-aot Oct 17, 2023
5aae3b5
Create SiteGridParent for re-usable children components for datepicker
acoard-aot Oct 17, 2023
d17ef45
Create and use datepicker on Notation page
acoard-aot Oct 17, 2023
84efec8
CSS styling
acoard-aot Oct 17, 2023
640513d
DateControl into tables
acoard-aot Oct 17, 2023
d599aaf
Subsearch responsive improvements
acoard-aot Oct 17, 2023
1ff9d58
Fix build issue due to unused var
acoard-aot Oct 17, 2023
6434d77
Remove log
acoard-aot Oct 17, 2023
d3e2dea
Delete empty folder
acoard-aot Oct 19, 2023
edc8cbd
Rename frontend/site-search-frontend to frontend/site-search
acoard-aot Oct 19, 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
18 changes: 18 additions & 0 deletions frontend/site-search/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
module.exports = {
root: true,
env: { browser: true, es2020: true },
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react-hooks/recommended',
],
ignorePatterns: ['dist', '.eslintrc.cjs'],
parser: '@typescript-eslint/parser',
plugins: ['react-refresh'],
rules: {
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
},
}
25 changes: 25 additions & 0 deletions frontend/site-search/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
*.private.*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
32 changes: 32 additions & 0 deletions frontend/site-search/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# "build-stage", based on Node.js, to build and compile the frontend
# pull official base image
FROM node:19 as build-stage
# FROM node:20 as build-stage

# set working directory
WORKDIR /app

# add `/app/node_modules/.bin` to $PATH
ENV PATH /app/node_modules/.bin:$PATH

# install app dependencies
COPY package.json ./
COPY package-lock.json ./

RUN npm install
# RUN npm install react-scripts@3.4.1 -g --silent

# create and set user permissions to app folder
RUN mkdir -p node_modules/.cache && chmod -R 777 node_modules/.cache

# add app files
COPY . ./

RUN npm run build

# Stage 1, based on Nginx, to have only the compiled app, ready for production with Nginx
FROM nginx:1.17 as production-stage
RUN mkdir /app
COPY --from=build-stage /app/dist /usr/share/nginx/html
COPY nginx.conf /etc/nginx/nginx.conf
CMD ["nginx", "-g", "daemon off;"]
27 changes: 27 additions & 0 deletions frontend/site-search/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# React + TypeScript + Vite

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

Currently, two official plugins are available:

- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh

## Expanding the ESLint configuration

If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:

- Configure the top-level `parserOptions` property like this:

```js
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
project: ['./tsconfig.json', './tsconfig.node.json'],
tsconfigRootDir: __dirname,
},
```

- Replace `plugin:@typescript-eslint/recommended` to `plugin:@typescript-eslint/recommended-type-checked` or `plugin:@typescript-eslint/strict-type-checked`
- Optionally add `plugin:@typescript-eslint/stylistic-type-checked`
- Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and add `plugin:react/recommended` & `plugin:react/jsx-runtime` to the `extends` list
13 changes: 13 additions & 0 deletions frontend/site-search/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + React + TS</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
59 changes: 59 additions & 0 deletions frontend/site-search/nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# nginx.conf
worker_processes auto;
error_log /var/log/nginx/error.log;

pid /tmp/nginx.pid;

events {
worker_connections 4096;
}

http {
include /etc/nginx/mime.types;
client_body_temp_path /tmp/client_temp;
proxy_temp_path /tmp/proxy_temp_path;
fastcgi_temp_path /tmp/fastcgi_temp;
uwsgi_temp_path /tmp/uwsgi_temp;
scgi_temp_path /tmp/scgi_temp;
default_type application/octet-stream;
server_tokens off;
underscores_in_headers on;

# Use a w3c standard log format
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';

access_log /var/log/nginx/access.log main;


server {

# add in most common security headers
add_header Content-Security-Policy "default-src * data: blob: filesystem: 'unsafe-inline' 'unsafe-eval'; frame-ancestors 'self' https://*.apps.silver.devops.gov.bc.ca";
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains";
add_header X-Content-Type-Options "nosniff";
add_header X-XSS-Protection 1;
add_header X-Frame-Options SAMEORIGIN;

listen 8080;
server_name _;

index index.html;
error_log /dev/stdout info;
access_log /dev/stdout;

# frontend
location / {
root /usr/share/nginx/html;
index index.html index.htm;
try_files $uri $uri/ /index.html;
}

error_page 500 502 503 504 /50x.html;

location = /50x.html {
root /usr/share/nginx/html;
}
}
}
Loading