Commit graph

37 commits

Author SHA1 Message Date
bc778bfd97 deps: react-leaflet 1.8 -> 4.2 (+ leaflet 1.9) — the last legacy react-* lib
Ground-up hooks rewrite of the app's core map. Removes the final batch of
React-19-blocking warnings (legacy context on Map/LayersControl/TileLayer/
Marker/CircleMarker/Circle/Tooltip + ReactDOM.render from the old controls).

Core: <Map> -> <MapContainer>; .leafletElement refs (6 files) -> the map/
layer instances directly, via a <MapReady> child (useMap) + plain refs on
Marker/Circle/GeoJSON; controlled viewport (onViewportChanged + state.center/
zoom) -> <MapEvents> (useMapEvents moveend/zoomend) + imperative setView;
onClick -> eventHandlers={{click}}; Path styling -> pathOptions/style;
subsUnion takes the L.Map directly.

The 4 v1-only plugins reimplemented (new in-repo helpers under Maps/):
- react-leaflet-control -> MapControl (L.Control + createPortal)
- react-leaflet-google  -> GoogleMutantLayer (createLayerComponent +
  leaflet.gridlayer.googlemutant; Google Maps API already loaded by Gkeys)
- react-leaflet-fullscreen -> createControlComponent + leaflet.fullscreen
- leaflet-sleep / leaflet-graphicscale kept as vanilla (work on leaflet 1.9)

Browser-verified: /fires (tiles, OSM+Google layer switch, custom control,
fullscreen, graphic scale, pan/zoom -> re-fetch, no NaN), fire detail
(GeoJSON rect + fitBounds), home (3 maps coexist; SelectionMap draggable
marker -> updatePosition + distance circle). Console now shows 0 React
warnings on home/fires. REST smoke byte-identical.
2026-07-21 18:45:15 +02:00
229b2cb233 cleanup: UNSAFE_componentWillReceiveProps -> modern lifecycles (React 19)
The 4 class components on UNSAFE_componentWillReceiveProps converted:
- FromNow, FireStats: state is a pure mirror of props -> getDerivedStateFromProps
- Fires: split the derived state (getDerivedStateFromProps) from the URL-
  canonicalization side effect (componentDidUpdate, guarded by prevProps) so
  the side effect never runs inside the pure gDSFP
- SelectionMap: marker is also locally draggable, so gDSFP would clobber a
  drag -> componentDidUpdate guarded on a real center/distance value change
  (no clobber, no setState loop), merged with the existing fit()

Browser-verified: /fires count, fire detail + FromNow, active-fire URL
canonicalizes to /fire/archive/:id, home SelectionMap renders stably (no
render loop). No UNSAFE_ warnings remain from our code. REST smoke
byte-identical.
2026-07-21 14:03:44 +02:00
a1a1b9a801 deps: react-bootstrap 0.31 -> 2 (Bootstrap 5 CSS deferred as debt)
Removes the largest batch of React-19-blocking warnings: the 0.31
components (Grid, FormGroup, ControlLabel, Navbar.Header/Brand, Checkbox,
SafeAnchor) all leaned on legacy context / defaultProps.

29 files converted: Grid->Container, FormGroup/ControlLabel/FormControl/
HelpBlock -> Form.Group/Label/Control/Text, Checkbox -> Form.Check (label
as prop), bsStyle->variant (default->secondary), bsSize->size,
pull-right->float-end. Custom Col.js now re-exports v2's Col; custom
NavItem.js rewritten self-contained (no SafeAnchor/createChainedFunction);
Navigation.js drops react-bootstrap Navbar (raw markup anyway).

CSS stays on Bootstrap 4 (alexwine:bootstrap-4) for now: the BS4->5 jump
is entangled with the jQuery carousel/swipe + navbar-collapse and is
tracked as separate debt in UPGRADE.md. Only .form-label needed a shim
(forms.scss). Browser-verified home carousel+navbar, signup form + terms
checkbox, login form; REST smoke byte-identical.
2026-07-21 12:44:46 +02:00
12bdbe8fed deps: i18next 10 -> 23, react-i18next 7 -> 14
Modernizes the whole i18n stack:
- 48 translate([], {wait:true}) / translate() HOCs -> withTranslation()
- react.wait:true -> react.useSuspense:false
- whitelist -> supportedLngs; added compatibilityJSON: 'v3' so our
  natural-language keys + v3 _plural layout keep working (custom
  separators ss/eth/dj preserved)
- backends: xhr -> i18next-http-backend (client), sync-fs ->
  i18next-fs-backend (server); dropped i18next-localstorage-cache
  (was enabled:false); languagedetector 2 -> 8
- ReSendEmail: <Interpolate> (removed in v10) -> <Trans values={{email}}/>,
  dropped the removed bare t export
- saveMissing handler signature (lngs, ns, key, fallbackValue)

Silences the per-component Translate/I18n legacy-context warnings.
Browser-verified es/en switch and <Trans> interpolation on /fires;
REST smoke byte-identical.
2026-07-18 06:28:41 +02:00
a997aa7cae cleanup: silence our own React dev-console warnings
UNSAFE_ rename of our 4 componentWillReceiveProps (FireStats, Fires, FromNow,
SelectionMap) and Authenticated/Public component propType func -> elementType.
Rest of the console noise is legacy react-* dev-mode warnings, absent in prod.
2026-07-18 05:47:44 +02:00
vjrj
2e09100bdc Cancel btn in SelectionMap only in subscriptions. Added title 2018-03-04 10:55:14 +01:00
vjrj
38b4769806 Added subscriptions cancel 2018-03-02 12:53:03 +01:00
vjrj
3ce7d65bb8 Disable btn on action in Subscriptions 2018-03-02 09:22:55 +01:00
vjrj
91c67f0b5f Don't fit subsunion when adding 2018-03-02 07:22:19 +01:00
vjrj
dc92574bc3 Full screen on maps 2018-02-27 11:37:54 +01:00
vjrj
7ce9317876 Maps colors improved 2018-02-20 13:39:05 +01:00
vjrj
58c54e5b94 Telegram auth (wip) 2018-01-26 12:49:53 +01:00
vjrj
5cf985aada Disable map sleep in chrome 2018-01-25 15:54:27 +01:00
vjrj
ce18aab493 Style improvements in home, navigation, and footer 2018-01-25 12:54:01 +01:00
vjrj
f76abc7c89 Fix layout in SelectionMap 2018-01-24 21:41:43 +01:00
vjrj
3a85cfacf2 Fix home style issues 2018-01-24 20:21:42 +01:00
vjrj
952431d296 Pages (terms/tos/privacy), comments improvements, etc 2018-01-21 20:53:21 +01:00
vjrj
cd16f45d8e Style improvements for mobile 2018-01-19 11:04:14 +01:00
vjrj
4227389a67 Login/Auth and pariticipate. Telegram auth (wip) 2017-12-22 09:33:37 +01:00
vjrj
e3eddd6b85 Many improvements in SelectionMap 2017-12-21 10:57:00 +01:00
vjrj
9e5fc1baba Added area removing 2017-12-20 01:31:39 +01:00
vjrj
05966afd65 Added action to SelectionMap 2017-12-20 00:40:20 +01:00
vjrj
62c0ba4f01 Added Layers to SelectionMap. Fixes in index and more 2017-12-20 00:23:47 +01:00
vjrj
1742cd4913 Improvement in Subs and FireMap Union 2017-12-19 20:02:14 +01:00
vjrj
497724443f More work with subscriptions 2017-12-18 03:16:06 +01:00
vjrj
918103a17b More work with subscriptions 2017-12-17 02:00:53 +01:00
vjrj
316e14f0ea Added subs management (wip) 2017-12-16 18:47:08 +01:00
vjrj
f6453c77d7 Refactorization of FiresMap 2017-12-12 15:20:03 +01:00
vjrj
29f9a2d476 Improved SelectionMap 2017-12-11 18:23:24 +01:00
vjrj
2ef2fee802 Update map components 2017-12-11 16:12:33 +01:00
vjrj
b1c9aad0ea More work in home 2017-12-11 12:30:35 +01:00
vjrj
9fd889f77f Improved home page 2017-12-11 11:08:52 +01:00
vjrj
b6b8f893e3 Gkey improved. New pages. Home improved based in startbootstrap 2017-12-10 03:32:12 +01:00
vjrj
a0e5dc4723 i18n in server. Some fixes 2017-12-09 17:54:18 +01:00
vjrj
3dc8edb4a8 CenterInMyPosition and refactor 2017-12-06 19:24:42 +01:00
vjrj
93d9ca43f1 Improved subs form 2017-12-06 17:10:47 +01:00
vjrj
df96b6e51e Subs form (wip) 2017-12-06 11:04:34 +01:00