From 496ba24de32fd521834b1c3170b288e2ae906e94 Mon Sep 17 00:00:00 2001 From: Lucas Li Date: Tue, 12 Dec 2023 23:53:31 -0800 Subject: [PATCH 01/11] use 20px if safe-area-inset not detectable --- .../src/main/angular/src/app/app.component.scss | 10 +++++----- .../active-wildfire-map.component.scss | 6 +++--- .../draggable-panel/draggable-panel.component.scss | 2 +- .../report-of-fire/report-of-fire.component.scss | 6 +++--- .../notification-map/notification-map.component.scss | 4 ++-- .../wfnews-war/src/main/angular/src/styles/_base.scss | 4 ++-- .../wfnews-war/src/main/angular/src/styles/main.scss | 2 +- 7 files changed, 17 insertions(+), 17 deletions(-) diff --git a/client/wfnews-war/src/main/angular/src/app/app.component.scss b/client/wfnews-war/src/main/angular/src/app/app.component.scss index 943961cde6..0cb91af5a6 100644 --- a/client/wfnews-war/src/main/angular/src/app/app.component.scss +++ b/client/wfnews-war/src/main/angular/src/app/app.component.scss @@ -6,8 +6,8 @@ right: 0; bottom: 0; background-color: #f2f2f2; - padding-top: env(safe-area-inset-top); - padding-bottom: env(safe-area-inset-bottom); + padding-top: env(safe-area-inset-top, 20px); + padding-bottom: env(safe-area-inset-bottom, 20px); padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); } @@ -269,14 +269,14 @@ right: 0; bottom: 0; background-color: white; - padding-top: env(safe-area-inset-top); - padding-bottom: env(safe-area-inset-bottom); + padding-top: env(safe-area-inset-top, 20px); + padding-bottom: env(safe-area-inset-bottom, 20px); padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); } .mobile-navigation-bar{ position: fixed; - bottom: env(safe-area-inset-bottom); + bottom: env(safe-area-inset-bottom, 20px); z-index: 1000000; width: 100%; background-color: #FCFCFC; diff --git a/client/wfnews-war/src/main/angular/src/app/components/active-wildfire-map/active-wildfire-map.component.scss b/client/wfnews-war/src/main/angular/src/app/components/active-wildfire-map/active-wildfire-map.component.scss index 19c182e04c..5129774dbd 100644 --- a/client/wfnews-war/src/main/angular/src/app/components/active-wildfire-map/active-wildfire-map.component.scss +++ b/client/wfnews-war/src/main/angular/src/app/components/active-wildfire-map/active-wildfire-map.component.scss @@ -213,7 +213,7 @@ mat-panel-title { } .container { - height: calc(100vh - env(safe-area-inset-bottom) - env(safe-area-inset-top)) !important; + height: calc(100vh - env(safe-area-inset-bottom, 20px) - env(safe-area-inset-top, 20px)) !important; overflow: hidden; } @@ -305,7 +305,7 @@ mat-panel-title { // One value must always be a fixed value! // additionally, this is a vh calc, not a height%, otherwise heights will be different across // devices - height: calc(100vh - env(safe-area-inset-bottom) - env(safe-area-inset-top) - 90px) !important; + height: calc(100vh - env(safe-area-inset-bottom, 20px) - env(safe-area-inset-top, 20px) - 90px) !important; .identify-panel { height: 100% !important; @@ -480,7 +480,7 @@ mat-panel-title { } .drawer-footer { - margin-bottom: calc(24px + env(safe-area-inset-bottom)); + margin-bottom: calc(24px + env(safe-area-inset-bottom, 20px)); direction: rtl; button { diff --git a/client/wfnews-war/src/main/angular/src/app/components/draggable-panel/draggable-panel.component.scss b/client/wfnews-war/src/main/angular/src/app/components/draggable-panel/draggable-panel.component.scss index 2e0a018c07..59545103b2 100644 --- a/client/wfnews-war/src/main/angular/src/app/components/draggable-panel/draggable-panel.component.scss +++ b/client/wfnews-war/src/main/angular/src/app/components/draggable-panel/draggable-panel.component.scss @@ -1,6 +1,6 @@ .draggable-panel { background-color: #ffffff; - height: calc(40vh - env(safe-area-inset-bottom) - env(safe-area-inset-top) - 56px) !important; + height: calc(40vh - env(safe-area-inset-bottom, 20px) - env(safe-area-inset-top, 20px) - 56px) !important; min-height: 320px; width: 100%; position: absolute; diff --git a/client/wfnews-war/src/main/angular/src/app/components/report-of-fire/report-of-fire.component.scss b/client/wfnews-war/src/main/angular/src/app/components/report-of-fire/report-of-fire.component.scss index 653a7b3b05..a2bc9dbd83 100644 --- a/client/wfnews-war/src/main/angular/src/app/components/report-of-fire/report-of-fire.component.scss +++ b/client/wfnews-war/src/main/angular/src/app/components/report-of-fire/report-of-fire.component.scss @@ -109,7 +109,7 @@ margin: 0 auto; padding-top: 0em; padding-right: 0; - padding-bottom: calc(1em + env(safe-area-inset-bottom)); + padding-bottom: calc(1em + env(safe-area-inset-bottom, 20px)); padding-left: 0; list-style: none; display: flex; @@ -147,10 +147,10 @@ padding: 8px 0px; align-items: center; width: calc(100% - 64px); - bottom: calc(3em + env(safe-area-inset-bottom)); + bottom: calc(3em + env(safe-area-inset-bottom, 20px)); position: fixed; @media (max-height: 699px){ - bottom: calc(2em + env(safe-area-inset-bottom)); + bottom: calc(2em + env(safe-area-inset-bottom, 20px)); } .rof-button { padding:0 32px; diff --git a/client/wfnews-war/src/main/angular/src/app/components/saved/add-saved-location/notification-map/notification-map.component.scss b/client/wfnews-war/src/main/angular/src/app/components/saved/add-saved-location/notification-map/notification-map.component.scss index 7d268c57d0..ce5f090b91 100644 --- a/client/wfnews-war/src/main/angular/src/app/components/saved/add-saved-location/notification-map/notification-map.component.scss +++ b/client/wfnews-war/src/main/angular/src/app/components/saved/add-saved-location/notification-map/notification-map.component.scss @@ -1,6 +1,6 @@ .content{ - padding-top: env(safe-area-inset-top); - padding-bottom: env(safe-area-inset-bottom); + padding-top: env(safe-area-inset-top, 20px); + padding-bottom: env(safe-area-inset-bottom, 20px); padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); } diff --git a/client/wfnews-war/src/main/angular/src/styles/_base.scss b/client/wfnews-war/src/main/angular/src/styles/_base.scss index e7e3634c99..e1c3a02a02 100644 --- a/client/wfnews-war/src/main/angular/src/styles/_base.scss +++ b/client/wfnews-war/src/main/angular/src/styles/_base.scss @@ -7,9 +7,9 @@ body { } :root { - --sat: env(safe-area-inset-top); + --sat: env(safe-area-inset-top, 20px); --sar: env(safe-area-inset-right); - --sab: env(safe-area-inset-bottom); + --sab: env(safe-area-inset-bottom, 20px); --sal: env(safe-area-inset-left); } diff --git a/client/wfnews-war/src/main/angular/src/styles/main.scss b/client/wfnews-war/src/main/angular/src/styles/main.scss index eff8c1e2c0..dd599d2af4 100644 --- a/client/wfnews-war/src/main/angular/src/styles/main.scss +++ b/client/wfnews-war/src/main/angular/src/styles/main.scss @@ -686,7 +686,7 @@ wf-admin-incident-desktop{ mat-snack-bar-container{ height: 100%; @media (max-width: 768px) { - margin-bottom: calc(12vh + env(safe-area-inset-bottom)) !important + margin-bottom: calc(12vh + env(safe-area-inset-bottom, 20px)) !important } .mdc-snackbar__surface { box-shadow: none !important; From ca02ca91793233c3c850dad97b4e9cc35d1478c3 Mon Sep 17 00:00:00 2001 From: Lucas Li Date: Wed, 13 Dec 2023 09:18:00 -0800 Subject: [PATCH 02/11] typo on notification title --- .../api/v1/impl/WildfirePushNotificationServiceV2Impl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/wfone-notification-push-api/wfone-notification-push-service-api/src/main/java/ca/bc/gov/nrs/wfone/notification/push/service/api/v1/impl/WildfirePushNotificationServiceV2Impl.java b/server/wfone-notification-push-api/wfone-notification-push-service-api/src/main/java/ca/bc/gov/nrs/wfone/notification/push/service/api/v1/impl/WildfirePushNotificationServiceV2Impl.java index fdf68016a3..dd57989252 100644 --- a/server/wfone-notification-push-api/wfone-notification-push-service-api/src/main/java/ca/bc/gov/nrs/wfone/notification/push/service/api/v1/impl/WildfirePushNotificationServiceV2Impl.java +++ b/server/wfone-notification-push-api/wfone-notification-push-service-api/src/main/java/ca/bc/gov/nrs/wfone/notification/push/service/api/v1/impl/WildfirePushNotificationServiceV2Impl.java @@ -78,7 +78,7 @@ private static class ProcessingCount { result.put(NotificationTopics.BRITISH_COLUMBIA_BANS_AND_PROHIBITION_AREAS, "There is a new burn prohibition in [%s] Fire Centre near your saved location [%s]. Tap for more info."); result.put(NotificationTopics.EVACUATION_ORDERS_AND_ALERTS, "There is a new evacuation order or alert issued by [%s] near your saved location [%s]. Tap for more info."); result.put(NotificationTopics.BRITISH_COLUMBIA_AREA_RESTRICTIONS, "There is a new area restriction for [%s] near your saved location [%s]. Tap for more info."); - result.put(NotificationTopics.BCWF_ACTIVEFIRES_PUBLIVIEW, "There is a new wildfire [%s]) near your saved location [%s]. Tap for more info."); + result.put(NotificationTopics.BCWF_ACTIVEFIRES_PUBLIVIEW, "There is a new wildfire [%s] near your saved location [%s]. Tap for more info."); TOPIC_MESSAGE_BODIES = Collections.unmodifiableMap(result); } From 9492550a8831021c729ee628eddd905efa7d63f0 Mon Sep 17 00:00:00 2001 From: Lucas Li Date: Wed, 13 Dec 2023 10:20:40 -0800 Subject: [PATCH 03/11] commented out in-app notification section --- .../add-saved-location/add-saved-location.component.html | 8 ++++---- .../add-saved-location/add-saved-location.component.scss | 8 ++++++++ 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/client/wfnews-war/src/main/angular/src/app/components/saved/add-saved-location/add-saved-location.component.html b/client/wfnews-war/src/main/angular/src/app/components/saved/add-saved-location/add-saved-location.component.html index 4b00582b42..54044884f4 100644 --- a/client/wfnews-war/src/main/angular/src/app/components/saved/add-saved-location/add-saved-location.component.html +++ b/client/wfnews-war/src/main/angular/src/app/components/saved/add-saved-location/add-saved-location.component.html @@ -68,12 +68,12 @@
-
+
Notification Settings
-
+
Push notifications
@@ -88,7 +88,7 @@
-
+
diff --git a/client/wfnews-war/src/main/angular/src/app/components/saved/add-saved-location/add-saved-location.component.scss b/client/wfnews-war/src/main/angular/src/app/components/saved/add-saved-location/add-saved-location.component.scss index dad5f8afcc..e0bafe1c37 100644 --- a/client/wfnews-war/src/main/angular/src/app/components/saved/add-saved-location/add-saved-location.component.scss +++ b/client/wfnews-war/src/main/angular/src/app/components/saved/add-saved-location/add-saved-location.component.scss @@ -218,6 +218,14 @@ width: -webkit-fill-available; } +.divider-with-margin{ + background: #DEDEDE; + height: 1px; + width: -webkit-fill-available; + margin-top: 16px; + margin-bottom: 32px; +} + .large-divider{ background: #F1F1F1; height: 8px; From bfaecc8942330fcae725ef6eaadcf22bf2378a7f Mon Sep 17 00:00:00 2001 From: Lucas Li Date: Wed, 13 Dec 2023 10:29:56 -0800 Subject: [PATCH 04/11] remove bracket from notifiation message body --- .../v1/impl/WildfirePushNotificationServiceV2Impl.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/server/wfone-notification-push-api/wfone-notification-push-service-api/src/main/java/ca/bc/gov/nrs/wfone/notification/push/service/api/v1/impl/WildfirePushNotificationServiceV2Impl.java b/server/wfone-notification-push-api/wfone-notification-push-service-api/src/main/java/ca/bc/gov/nrs/wfone/notification/push/service/api/v1/impl/WildfirePushNotificationServiceV2Impl.java index dd57989252..232812e074 100644 --- a/server/wfone-notification-push-api/wfone-notification-push-service-api/src/main/java/ca/bc/gov/nrs/wfone/notification/push/service/api/v1/impl/WildfirePushNotificationServiceV2Impl.java +++ b/server/wfone-notification-push-api/wfone-notification-push-service-api/src/main/java/ca/bc/gov/nrs/wfone/notification/push/service/api/v1/impl/WildfirePushNotificationServiceV2Impl.java @@ -75,10 +75,10 @@ private static class ProcessingCount { static { Map result = new HashMap<>(); - result.put(NotificationTopics.BRITISH_COLUMBIA_BANS_AND_PROHIBITION_AREAS, "There is a new burn prohibition in [%s] Fire Centre near your saved location [%s]. Tap for more info."); - result.put(NotificationTopics.EVACUATION_ORDERS_AND_ALERTS, "There is a new evacuation order or alert issued by [%s] near your saved location [%s]. Tap for more info."); - result.put(NotificationTopics.BRITISH_COLUMBIA_AREA_RESTRICTIONS, "There is a new area restriction for [%s] near your saved location [%s]. Tap for more info."); - result.put(NotificationTopics.BCWF_ACTIVEFIRES_PUBLIVIEW, "There is a new wildfire [%s] near your saved location [%s]. Tap for more info."); + result.put(NotificationTopics.BRITISH_COLUMBIA_BANS_AND_PROHIBITION_AREAS, "There is a new burn prohibition in %s Fire Centre near your saved location %s. Tap for more info."); + result.put(NotificationTopics.EVACUATION_ORDERS_AND_ALERTS, "There is a new evacuation order or alert issued by %s near your saved location %s. Tap for more info."); + result.put(NotificationTopics.BRITISH_COLUMBIA_AREA_RESTRICTIONS, "There is a new area restriction for %s near your saved location %s. Tap for more info."); + result.put(NotificationTopics.BCWF_ACTIVEFIRES_PUBLIVIEW, "There is a new wildfire %s near your saved location %s. Tap for more info."); TOPIC_MESSAGE_BODIES = Collections.unmodifiableMap(result); } From 743302c23bcc030fb61494ac2480ae4ecdc052b3 Mon Sep 17 00:00:00 2001 From: Lucas Li Date: Wed, 13 Dec 2023 13:26:34 -0800 Subject: [PATCH 05/11] try out --- .../active-wildfire-map.component.html | 8 ++++++++ .../active-wildfire-map.component.scss | 2 +- .../active-wildfire-map.component.ts | 10 +++++++++- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/client/wfnews-war/src/main/angular/src/app/components/active-wildfire-map/active-wildfire-map.component.html b/client/wfnews-war/src/main/angular/src/app/components/active-wildfire-map/active-wildfire-map.component.html index 0fbc7547e6..0c403d6f08 100644 --- a/client/wfnews-war/src/main/angular/src/app/components/active-wildfire-map/active-wildfire-map.component.html +++ b/client/wfnews-war/src/main/angular/src/app/components/active-wildfire-map/active-wildfire-map.component.html @@ -4,6 +4,14 @@
+
+
+ Value of safe-area-inset-bottom: {{ safeAreaInsetBottomValue }} +
+
+ Value of safe-area-inset-top: {{ safeAreaInsetTopValue }} +
+