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

Start Mapping & More #306

Draft
wants to merge 69 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 62 commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
f020501
chore: housekeeping
jeafreezy Nov 23, 2024
8cf3bd8
chore: map layers refactoring + completed start mapping logics
jeafreezy Nov 24, 2024
1a8ef6f
chore: prettier
jeafreezy Nov 24, 2024
a2a192e
fix: fixed bug in updating predicted features in state
jeafreezy Nov 24, 2024
7206fef
merging with model-creation
jeafreezy Nov 25, 2024
9f9bbf7
chore: fixed bug
jeafreezy Nov 25, 2024
ac59649
chore: removed intersection check from un interacted predictions
jeafreezy Nov 25, 2024
b124720
chore: removed disabled state in download button
jeafreezy Nov 25, 2024
3b6015d
chore: fixes
jeafreezy Nov 25, 2024
f573b92
chore: fixes
jeafreezy Nov 25, 2024
27eb1ec
chore: merging with origin
jeafreezy Nov 27, 2024
005ea98
chore: merged with start-mapping
jeafreezy Nov 27, 2024
c01952e
chore: fixed zoom level rounded bug + optimized map component
jeafreezy Nov 27, 2024
8445ccc
chore: added tile boundaries to map
jeafreezy Nov 27, 2024
0f68062
chore: incremental revamping
jeafreezy Nov 27, 2024
a565def
chore: fixed prediction model extension
jeafreezy Nov 27, 2024
6091d27
feat: mobile responsiveness and revamping of start mapping page
jeafreezy Nov 28, 2024
b58f375
chore: fixed back button bug
jeafreezy Nov 28, 2024
a7256c6
chore: added zoom functionality to model graph
jeafreezy Nov 28, 2024
46e25d3
chore: optimized assets
jeafreezy Nov 28, 2024
82dbc60
chore: fixed vulnerabilities
jeafreezy Nov 28, 2024
1ef38a1
chore: model creation mobile responsiveness
jeafreezy Nov 28, 2024
988731c
chore: changed training area aoi color
jeafreezy Nov 28, 2024
27b3d67
chore: wip
jeafreezy Nov 28, 2024
b0dfe2c
chore: xml conversion
jeafreezy Nov 28, 2024
563aae1
feat: finalized feedback popup logic:
jeafreezy Nov 28, 2024
6ab145c
moved bbox out
jeafreezy Dec 2, 2024
6a9ea33
feat: completed learn page
jeafreezy Dec 5, 2024
8bb61e5
chore: enabled model enhancement button
jeafreezy Dec 5, 2024
54cefdf
chore: made model enhancement open to all users
jeafreezy Dec 5, 2024
b03e761
chore: adjusted training details dialog style
jeafreezy Dec 5, 2024
47b7911
chore: moved batch size beside epoch
jeafreezy Dec 5, 2024
c43e8bc
chore: housekeeping
jeafreezy Dec 5, 2024
00a8401
chore: fixed map not showing bug
jeafreezy Dec 5, 2024
d91fd1a
chore: fixed zoom level bug
jeafreezy Dec 5, 2024
512254e
chore: fixed zoom level bug
jeafreezy Dec 5, 2024
df147d9
chore: fixed zoom level bug in tile boundaries
jeafreezy Dec 5, 2024
bf21d66
chore: fixed conflation bug
jeafreezy Dec 5, 2024
63bb943
wip: geojson to osm xml
jeafreezy Dec 5, 2024
bdc179a
wip: geojson2osm
jeafreezy Dec 5, 2024
e1a8996
chore: enhanced conflation logic
jeafreezy Dec 5, 2024
22e1de7
feat: added users models page
jeafreezy Dec 5, 2024
4868012
feat: added status filter
jeafreezy Dec 5, 2024
fbe39f9
chore: fixed bug in model details
jeafreezy Dec 6, 2024
541237c
chore: enabled enhancement for all authenticated users
jeafreezy Dec 6, 2024
94e064d
feat: enabled navigation with progress bar during enhancement
jeafreezy Dec 6, 2024
a80c619
chore: prettier formatting
jeafreezy Dec 6, 2024
6f98ad9
chore: reduced padding in large screen + some housekeeping
jeafreezy Dec 12, 2024
6962b65
chore: made padding consistent
jeafreezy Dec 12, 2024
cf0cde8
chore: removed status filter on my-models page + added badge to model…
jeafreezy Dec 12, 2024
494681e
chore: fixed bg image bug
jeafreezy Dec 12, 2024
750ffb1
chore: changed models-map cluster circle color
jeafreezy Dec 12, 2024
7ee6fc5
chore: fixed overflow styling
jeafreezy Dec 12, 2024
8c3f64b
wip: immersive experience for start-mapping page
jeafreezy Dec 12, 2024
f5f58ed
chore: wip
jeafreezy Dec 12, 2024
24d657b
fix: fixed bug:
jeafreezy Dec 12, 2024
8bc9657
feat: completed about page
jeafreezy Dec 12, 2024
f2858d9
chore: switched icons to named exports
jeafreezy Dec 17, 2024
5e85fe5
chore: added 15 minutes refetch interval for kpi stats + updated envs
jeafreezy Dec 17, 2024
d65ced2
wip: content clearnups
jeafreezy Dec 17, 2024
f315b9c
feat: finalized training area map
jeafreezy Dec 17, 2024
658c69f
chore: fixed directory url
jeafreezy Dec 17, 2024
d139c29
optimization wip: moved mapinstance to hook
jeafreezy Dec 18, 2024
528afb3
chore: reduced font size for confidence level
jeafreezy Dec 18, 2024
243b577
chore: bug fixes
jeafreezy Dec 18, 2024
8a4b703
feat: completed resources page
jeafreezy Dec 18, 2024
ad4fe14
chore: fixed josm bbox bug + updated envs
jeafreezy Dec 18, 2024
feb21c0
chore: revert padding to landing page
jeafreezy Dec 18, 2024
2dd01c5
chore: wip
jeafreezy Dec 18, 2024
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
135 changes: 100 additions & 35 deletions frontend/.env.sample
Original file line number Diff line number Diff line change
@@ -1,46 +1,111 @@
VITE_BASE_API_URL = 'http://localhost:8000/api/v1/' # backend api url
# The backend api endpoint url.
# Data type: String (e.g., http://localhost:8000/api/v1/).
# Default value: http://localhost:8000/api/v1/.
# Note: Ensure CORs is enabled in the backend and access if given to your port.
VITE_BASE_API_URL = 'http://localhost:8000/api/v1/'

# The matomo application ID.
# Data type: Positive Integer (e.g., 0).
# Default value: 0.
VITE_MATOMO_ID = 0

# The matomo application domain.
# Data type: String (e.g., subdomain.hotosm.org).
# Default value: subdomain.hotosm.org.
VITE_MATOMO_APP_DOMAIN = "subdomain.hotosm.org"

# The maximum allowed area size (in square meters) for training areas.
# Data type: Positive Integer e.g 500000
MAX_TRAINING_AREA_SIZE =
# The cache duration for polling the backend for updated statistics, in seconds.
# Data type: Positive Integer (e.g., 900).
# Default value: 900 seconds (15 minutes).
# Note: If this value changes on the backend, please update it here to avoid unnecessary polling.
VITE_KPI_STATS_CACHE_TIME = 900

# The minimum allowed area size (in square meters) for training areas.
# Data type: Positive Integer e.g 500000
MIN_TRAINING_AREA_SIZE =
# The maximum allowed area size for training areas, measured in square meters.
# Data type: Positive Integer (e.g., 5000000).
# Default value: 5000000 square meters (5 square kilometers).
VITE_MAX_TRAINING_AREA_SIZE = 5000000

# The maximum file size (in bytes) allowed for training area upload.
# Data type: Positive Integer e.g 500000
MAX_TRAINING_AREA_UPLOAD_FILE_SIZE =
# The minumum allowed area size for training areas, measured in square meters.
# Data type: Positive Integer (e.g., 5797).
# Default value: 5797 square meters.
VITE_MIN_TRAINING_AREA_SIZE = 5797

# The maximum file size allowed for training area upload, measure in bytes.
# Data type: Positive Integer (e.g., 500000).
# Default value: 5242880 bytes (5 MB).
VITE_MAX_TRAINING_AREA_UPLOAD_FILE_SIZE = 5242880

# The current version of the application.
# This is used in the OSM redirect callback when a training area is opened in OSM.
# Data type: String e.g 'v1.1'
FAIR_VERSION =

# Comma separated hashtags to add to the OSM ID Editor redirection
# Data type: String e.g '#HOT-fAIr, #AI-Assited-Mapping'
OSM_HASHTAGS =
# Data type: String (e.g., v1.1).
# Default value: "v0.1".
VITE_FAIR_VERSION = "v0.1"

# Comma separated hashtags to add to the OSM ID Editor redirection.
# Data type: String (e.g., '#HOT-fAIr, #AI-Assited-Mapping').
# Default value: `FAIR_VERSION`.
VITE_OSM_HASHTAGS =

# The maximum zoom level for the map.
# Data type: Positive Integer e.g 22. Must be between 0 - 24
MAX_ZOOM_LEVEL =

# The minimum zoom level to show the training area labels.
# Data type: Positive Integer e.g 18. Must be between 0 - 24
TRAINING_LABELS_MIN_ZOOM_LEVEL =

# Training area and labels styles.
# Opacities are between 0 and 1 . E.g 0.5
# Widths must be Positive Integers e.g 1, 2 etc.
# Colors must be hex codes or valid colors. E.g 'red', 'green', '#fff'
TRAINING_AREAS_AOI_FILL_COLOR =
TRAINING_AREAS_AOI_OUTLINE_COLOR =
TRAINING_AREAS_AOI_OUTLINE_WIDTH =
TRAINING_AREAS_AOI_FILL_OPACITY =
TRAINING_AREAS_AOI_LABELS_FILL_OPACITY =
TRAINING_AREAS_AOI_LABELS_OUTLINE_WIDTH =
TRAINING_AREAS_AOI_LABELS_FILL_COLOR =
TRAINING_AREAS_AOI_LABELS_OUTLINE_COLOR =
# Data type: Positive Integer (e.g., 22).
# Note: Value must be between 0 - 24.
# Default value: 22.
VITE_MAX_ZOOM_LEVEL = 22

# The minimum zoom level before enabling the prediction button and other functionalities in the start mapping page.
# Data type: Positive Integer (e.g., 22).
# Note: Value must be between 0 - 24.
# Default value: 19.
VITE_MIN_ZOOM_LEVEL_FOR_START_MAPPING_PREDICTION = 19

# The minimum zoom level before enabling the training area labels in the training area map.
# Data type: Positive Integer (e.g., 22).
# Note: Value must be between 0 - 24.
# Default value: 18.
VITE_MIN_ZOOM_LEVEL_FOR_TRAINING_AREA_LABELS = 18

# The fill color for the training area AOI rectangles.
# Data type: String (e.g., "#247DCACC").
# Note: Colors must be hex codes or valid colors. e.g 'red', 'green', '#fff'.
# Default value: #247DCACC.
VITE_TRAINING_AREAS_AOI_FILL_COLOR = "#247DCACC"

# The outline color for the training area AOI rectangles.
# Data type: String (e.g., "#247DCACC").
# Note: Colors must be hex codes or valid colors. e.g 'red', 'green', '#fff'.
# Default value: #247DCACC.
VITE_TRAINING_AREAS_AOI_OUTLINE_COLOR = "#247DCACC"

# The outline width for the training area AOI rectangles.
# Data type: Positive Integer (e.g., 3).
# Default value: 4.
VITE_TRAINING_AREAS_AOI_OUTLINE_WIDTH = 4

# The fill opacity for the training area AOI rectangles.
# Data type: Float (e.g., 0.4).
# Note: Value must be between 0 and 1.
# Default value: 0.4.
VITE_TRAINING_AREAS_AOI_FILL_OPACITY = 0.4

# The fill opacity for the training area AOI labels.
# Data type: Float (e.g., 0.4).
# Note: Value must be between 0 and 1.
# Default value: 0.3.
VITE_TRAINING_AREAS_AOI_LABELS_FILL_OPACITY = 0.3

# The outline width for the training area AOI labels.
# Data type: Positive Integer (e.g., 3).
# Default value: 2.
VITE_TRAINING_AREAS_AOI_LABELS_OUTLINE_WIDTH = 2

# The fill color for the training area AOI labels.
# Data type: String (e.g., "#247DCACC").
# Note: Colors must be hex codes or valid colors. e.g 'red', 'green', '#fff'.
# Default value: #D73434.
VITE_TRAINING_AREAS_AOI_LABELS_FILL_COLOR = "#D73434"

# The outline color for the training area AOI labels.
# Data type: String (e.g., "#247DCACC").
# Note: Colors must be hex codes or valid colors. e.g 'red', 'green', '#fff'.
# Default value: #D73434.
VITE_TRAINING_AREAS_AOI_LABELS_OUTLINE_COLOR = "#D73434"
12 changes: 11 additions & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,26 @@
"@terraformer/wkt": "^2.2.1",
"@turf/area": "^7.1.0",
"@turf/bbox": "^7.1.0",
"@turf/boolean-intersects": "^7.1.0",
"axios": "^1.7.7",
"clsx": "^2.1.1",
"framer-motion": "^11.5.4",
"geojson": "^0.5.0",
"maplibre-gl": "^4.7.1",
"pmtiles": "^4.1.0",
"react": "^18.3.1",
"react-confetti-explosion": "^2.1.2",
"react-dom": "^18.3.1",
"react-dropzone": "^14.2.10",
"react-error-boundary": "^4.0.13",
"react-helmet-async": "^2.0.5",
"react-markdown": "^9.0.1",
"react-medium-image-zoom": "^5.2.11",
"react-router-dom": "^6.26.2",
"remark-gfm": "^4.0.0",
"tailwind-merge": "^2.5.2",
"terra-draw": "1.0.0-beta.8"
"terra-draw": "1.0.0-beta.8",
"xmlbuilder2": "^3.1.1"
},
"devDependencies": {
"@eslint/js": "^9.9.0",
Expand All @@ -57,5 +61,11 @@
"typescript-eslint": "^8.0.1",
"vite": "^5.4.1",
"vite-tsconfig-paths": "^5.0.1"
},
"pnpm": {
"overrides": {
"cross-spawn@>=7.0.0 <7.0.5": ">=7.0.5",
"@eslint/plugin-kit@<0.2.3": ">=0.2.3"
}
}
}
Loading