Skip to content

Commit

Permalink
feat(noah): create staging for new feature boundaries and updated log…
Browse files Browse the repository at this point in the history
…in feature (#367)

* create staging for new feature

* feat(noah): add new feature for Barangay boundaries (#366)

* Added github actions workflow for aut deployment to .72 server.

* Added github action for S3 deployment.

* Changed to staging. Created branch for staging.

* Retrigger deployment workflow.

* fix(studio): zoom in on ios (#192)

# Summary 

- Fixes #186
- The `load` event isn't firing on NOAH Studio. As such, the `centerListener()` method isn't called which is responsible for the zooming in to the selected place. However, `style.load` do get called. The fix implemented here is to also use the event `style.load` to call the methods that were previously called by upon the firing of the `load` event but only listen to `style.load` once.
  - We need to further investigate **why** `load` doesn't work on Studio in iOS but works in KYH
- Confirming that only the NOAH Studio is affected by this issue.
 
# Demo

![Kapture 2021-10-05 at 22 49 45](https://user-images.githubusercontent.com/11599005/136047077-d0da7a85-9157-4d01-bae9-07a6039fd9c1.gif)

* ci(netlify): add _redirects file

* S3 Deployment Validation (#198)

* Added if condition to run workflow only on successful PR merge. (#195)

* Checking proper automation workflow. Will revert this small change upon validation. (#196)

* Change deployment trigger. Revert small biblio change. (#199)

* Checking proper automation workflow. Will revert this small change upon validation.

* Changed trigger for deployment workflow. Revert small change to bibliography.

* Cascade dev changes on workflow to prod (#202)

* Added AWS deployment workflow

* remove 24hour lapse contour

* update modal service

* add boundaries component

* update noah-playground-store to contain boundaries state

* update noah playground service to accommodate boundaries setters and getters

* add ui and ux function for boundaries

* display boundaries in map

* displaying barangay boundaries all over the philippines using mapbox link

* fixed bug cliclable area when still hide the boundaries

* remove some comments

* fixed bug for popup show and hide

* update comment

---------

Co-authored-by: pfgoting <pfgoting@gmail.com>
Co-authored-by: Jadurani Davalos <jadurani.davalos@gmail.com>
Co-authored-by: kennethbeoliporada <kennethbeoliporada@gmail.com>
Co-authored-by: kennethliporada <62271587+kennethliporada@users.noreply.github.com>
Co-authored-by: upri <upri@Bon-MacBook-Pro.local>

* feat(login): IoT login and logout (#365)

* Added github actions workflow for aut deployment to .72 server.

* Added github action for S3 deployment.

* Changed to staging. Created branch for staging.

* Retrigger deployment workflow.

* fix(studio): zoom in on ios (#192)

# Summary 

- Fixes #186
- The `load` event isn't firing on NOAH Studio. As such, the `centerListener()` method isn't called which is responsible for the zooming in to the selected place. However, `style.load` do get called. The fix implemented here is to also use the event `style.load` to call the methods that were previously called by upon the firing of the `load` event but only listen to `style.load` once.
  - We need to further investigate **why** `load` doesn't work on Studio in iOS but works in KYH
- Confirming that only the NOAH Studio is affected by this issue.
 
# Demo

![Kapture 2021-10-05 at 22 49 45](https://user-images.githubusercontent.com/11599005/136047077-d0da7a85-9157-4d01-bae9-07a6039fd9c1.gif)

* ci(netlify): add _redirects file

* S3 Deployment Validation (#198)

* Added if condition to run workflow only on successful PR merge. (#195)

* Checking proper automation workflow. Will revert this small change upon validation. (#196)

* Change deployment trigger. Revert small biblio change. (#199)

* Checking proper automation workflow. Will revert this small change upon validation.

* Changed trigger for deployment workflow. Revert small change to bibliography.

* Cascade dev changes on workflow to prod (#202)

* Added AWS deployment workflow

* WIP: login logout for IoT and there function like zoom, download charts

* noah login when click the dot from the playground

* changing username when user logging in

---------

Co-authored-by: pfgoting <pfgoting@gmail.com>
Co-authored-by: Jadurani Davalos <jadurani.davalos@gmail.com>
Co-authored-by: kennethbeoliporada <kennethbeoliporada@gmail.com>

* feat(login): toggle boundaries and devs account (#369)

* Added github actions workflow for aut deployment to .72 server.

* Added github action for S3 deployment.

* Changed to staging. Created branch for staging.

* Retrigger deployment workflow.

* fix(studio): zoom in on ios (#192)

# Summary 

- Fixes #186
- The `load` event isn't firing on NOAH Studio. As such, the `centerListener()` method isn't called which is responsible for the zooming in to the selected place. However, `style.load` do get called. The fix implemented here is to also use the event `style.load` to call the methods that were previously called by upon the firing of the `load` event but only listen to `style.load` once.
  - We need to further investigate **why** `load` doesn't work on Studio in iOS but works in KYH
- Confirming that only the NOAH Studio is affected by this issue.
 
# Demo

![Kapture 2021-10-05 at 22 49 45](https://user-images.githubusercontent.com/11599005/136047077-d0da7a85-9157-4d01-bae9-07a6039fd9c1.gif)

* ci(netlify): add _redirects file

* S3 Deployment Validation (#198)

* Added if condition to run workflow only on successful PR merge. (#195)

* Checking proper automation workflow. Will revert this small change upon validation. (#196)

* Change deployment trigger. Revert small biblio change. (#199)

* Checking proper automation workflow. Will revert this small change upon validation.

* Changed trigger for deployment workflow. Revert small change to bibliography.

* Cascade dev changes on workflow to prod (#202)

* Added AWS deployment workflow

* WIP: login logout for IoT and there function like zoom, download charts

* noah login when click the dot from the playground

* changing username when user logging in

* toggle boundaries only for accounts and devs download both qc and laguna

---------

Co-authored-by: pfgoting <pfgoting@gmail.com>
Co-authored-by: Jadurani Davalos <jadurani.davalos@gmail.com>
Co-authored-by: kennethbeoliporada <kennethbeoliporada@gmail.com>

* feat(noah): add municipal and provincial boundaries  (#370)

* Added github actions workflow for aut deployment to .72 server.

* Added github action for S3 deployment.

* Changed to staging. Created branch for staging.

* Retrigger deployment workflow.

* fix(studio): zoom in on ios (#192)

# Summary 

- Fixes #186
- The `load` event isn't firing on NOAH Studio. As such, the `centerListener()` method isn't called which is responsible for the zooming in to the selected place. However, `style.load` do get called. The fix implemented here is to also use the event `style.load` to call the methods that were previously called by upon the firing of the `load` event but only listen to `style.load` once.
  - We need to further investigate **why** `load` doesn't work on Studio in iOS but works in KYH
- Confirming that only the NOAH Studio is affected by this issue.
 
# Demo

![Kapture 2021-10-05 at 22 49 45](https://user-images.githubusercontent.com/11599005/136047077-d0da7a85-9157-4d01-bae9-07a6039fd9c1.gif)

* ci(netlify): add _redirects file

* S3 Deployment Validation (#198)

* Added if condition to run workflow only on successful PR merge. (#195)

* Checking proper automation workflow. Will revert this small change upon validation. (#196)

* Change deployment trigger. Revert small biblio change. (#199)

* Checking proper automation workflow. Will revert this small change upon validation.

* Changed trigger for deployment workflow. Revert small change to bibliography.

* Cascade dev changes on workflow to prod (#202)

* Added AWS deployment workflow

* WIP: login logout for IoT and there function like zoom, download charts

* noah login when click the dot from the playground

* changing username when user logging in

* add municipal and provincial in noah playground store

* add source layer

* displaying 3 boundaries and color each of that

---------

Co-authored-by: pfgoting <pfgoting@gmail.com>
Co-authored-by: Jadurani Davalos <jadurani.davalos@gmail.com>
Co-authored-by: kennethbeoliporada <kennethbeoliporada@gmail.com>
Co-authored-by: kennethliporada <62271587+kennethliporada@users.noreply.github.com>
Co-authored-by: upri <upri@Bon-MacBook-Pro.local>

* change api base url

* fix(noah): administrative boundaries popup and legend (#372)

* Added github actions workflow for aut deployment to .72 server.

* Added github action for S3 deployment.

* Changed to staging. Created branch for staging.

* Retrigger deployment workflow.

* fix(studio): zoom in on ios (#192)

# Summary 

- Fixes #186
- The `load` event isn't firing on NOAH Studio. As such, the `centerListener()` method isn't called which is responsible for the zooming in to the selected place. However, `style.load` do get called. The fix implemented here is to also use the event `style.load` to call the methods that were previously called by upon the firing of the `load` event but only listen to `style.load` once.
  - We need to further investigate **why** `load` doesn't work on Studio in iOS but works in KYH
- Confirming that only the NOAH Studio is affected by this issue.
 
# Demo

![Kapture 2021-10-05 at 22 49 45](https://user-images.githubusercontent.com/11599005/136047077-d0da7a85-9157-4d01-bae9-07a6039fd9c1.gif)

* ci(netlify): add _redirects file

* S3 Deployment Validation (#198)

* Added if condition to run workflow only on successful PR merge. (#195)

* Checking proper automation workflow. Will revert this small change upon validation. (#196)

* Change deployment trigger. Revert small biblio change. (#199)

* Checking proper automation workflow. Will revert this small change upon validation.

* Changed trigger for deployment workflow. Revert small change to bibliography.

* Cascade dev changes on workflow to prod (#202)

* Added AWS deployment workflow

* WIP: login logout for IoT and there function like zoom, download charts

* noah login when click the dot from the playground

* changing username when user logging in

* changed sidebar name boundaries to administrative boundaries and added disclaimer and source

* changing legend and displaying names for prov and muni

* added remove popup when sidebar unchecked

---------

Co-authored-by: pfgoting <pfgoting@gmail.com>
Co-authored-by: Jadurani Davalos <jadurani.davalos@gmail.com>
Co-authored-by: kennethbeoliporada <kennethbeoliporada@gmail.com>

* remove boundary name in barangay

---------

Co-authored-by: upri <upri@Bon-MacBook-Pro.local>
Co-authored-by: pfgoting <pfgoting@gmail.com>
Co-authored-by: Jadurani Davalos <jadurani.davalos@gmail.com>
Co-authored-by: kennethbeoliporada <kennethbeoliporada@gmail.com>
Co-authored-by: kennethliporada <62271587+kennethliporada@users.noreply.github.com>
  • Loading branch information
6 people authored May 22, 2024
1 parent ed83af1 commit d63c1f8
Show file tree
Hide file tree
Showing 24 changed files with 908 additions and 339 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
<div class="p-5 w-full bg-sidebar shadow-md hover:shodow-lg rounded-lg mt-6">
<div class="flex cursor-pointer select-none" (click)="toggleExpanded($event)">
<label class="inline-flex items-center checkbox">
<input
type="checkbox"
class="checkbox h-5 w-5 text-blue-600"
[checked]="shown$ | async"
(click)="toggleShown($event)"
/>
</label>
<div class="ml-3 text-lg leading-none font-bold flex items-center">
Administrative Boundaries
</div>
<div class="ml-auto">
<button
class="
w-6
h-6
focus:outline-none
flex
items-center
justify-center
rounded-full
"
>
<svg
[ngClass]="(expanded$ | async) ? ' hidden ' : ' '"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 1000 1000"
width="18"
height="12"
>
<path
d="M283.7 10l-58.4 58.4L656 500 225.3 931.6l58.4 58.4 491-490-491-490z"
/>
</svg>
<svg
[ngClass]="(expanded$ | async) ? ' ' : ' hidden '"
xmlns="http://www.w3.org/2000/svg"
width="12"
height="12"
viewBox="0 0 18 12"
fill="none"
>
<path
d="M9.00002 4.73399L2.40001 11.334L0.514683 9.44865L9.00002 0.963319L17.4854 9.44865L15.6 11.334L9.00002 4.73399Z"
fill="#4A5568"
></path>
</svg>
</button>
</div>
</div>
<div [ngClass]="(expanded$ | async) ? ' pt-5 ' : ' hidden '">
<hr class="pb-4" />
<div class="pl-6">
<div class="items-center">
<div>
<p class="text-xs italic ml-4">
Disclaimer: Calibration and validation of sensor datasets are still
in progress
</p>
</div>
<div>
<p class="text-xs italic mt-4 ml-4">
Source: Philippine Statistics Authority
</p>
</div>
<noah-boundaries-solo
*ngFor="let boundariesType of boundariesTypeList"
[boundariesType]="boundariesType"
></noah-boundaries-solo>
<hr class="p-2" />
</div>
</div>
</div>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';

import { BoundariesGroupComponent } from './boundaries-group.component';

describe('BoundariesGroupComponent', () => {
let component: BoundariesGroupComponent;
let fixture: ComponentFixture<BoundariesGroupComponent>;

beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [BoundariesGroupComponent],
}).compileComponents();
});

beforeEach(() => {
fixture = TestBed.createComponent(BoundariesGroupComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import { Component, OnInit } from '@angular/core';
import { NoahPlaygroundService } from '@features/noah-playground/services/noah-playground.service';
import { BoundariesType } from '@features/noah-playground/store/noah-playground.store';
import { Observable } from 'rxjs';
import { shareReplay } from 'rxjs/operators';

@Component({
selector: 'noah-boundaries-group',
templateUrl: './boundaries-group.component.html',
styleUrls: ['./boundaries-group.component.scss'],
})
export class BoundariesGroupComponent implements OnInit {
boundariesTypeList: BoundariesType[] = [
'barangay',
'municipal',
'provincial',
];

expanded$: Observable<boolean>;
shown$: Observable<boolean>;

constructor(private pgService: NoahPlaygroundService) {}

ngOnInit(): void {
this.expanded$ = this.pgService.boundariesGroupExpanded$.pipe(
shareReplay(1)
);
this.shown$ = this.pgService.boundariesGroupShown$.pipe(shareReplay(1));
}

toggleExpanded(event: Event) {
event.stopPropagation();
event.stopImmediatePropagation();

this.pgService.toggleBoundariesGroupProperty('expanded');
}

toggleShown(event: Event) {
event.stopPropagation();
event.stopImmediatePropagation();

this.pgService.toggleBoundariesGroupProperty('shown');
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<div class="text-m f-f-r py-2 pl-4">
<div class="flex items-center">
<div class="inline-flex items-center checkbox {{ boundariesType }}">
<input
type="checkbox"
class="h-5 w-5 text-blue-600"
[checked]="shown"
(click)="toggleShown()"
name="input-{{ boundariesType }}"
/>
</div>
<div class="flex flex-col ml-3">
<div class="text-lg f-f-r capitalize">
{{ boundariesType | replace: '-':' ' | titlecase }}
</div>
</div>
</div>

<div class="flex items-center pt-4">
<noah-slider
label="Opacity"
[initialValue]="initialOpacityValue"
(valueChange)="changeOpacity($event)"
></noah-slider>
</div>
<div class="flex items-center pt-4">
<div class="flex flex-col ml-8">
<div class="text-lg f-f-r mb-2">Legend</div>
<div class="flex items-center mb-1">
<label class="inline-flex items-center">
<!-- <img src="if legend is img" /> -->
</label>
<div class="items-center justify-between w-12">
<div class="w-12 items-start rounded bg-transparent">
<div
class="
w-12
h-5
dark:bg-gray-800
border-2
{{
boundariesType === 'barangay'
? 'border-dashed border-purple-700'
: boundariesType === 'municipal'
? 'border-solid border-purple-700'
: boundariesType === 'provincial'
? 'border-solid border-black'
: ''
}}
rounded
"
></div>
</div>
</div>
<!-- <div class="flex flex-col ml-3">
<div class="text-m leading-none capitalize">{{ displayName }}</div>
</div> -->
</div>
</div>
</div>
</div>
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';

import { BoundariesSoloComponent } from './boundaries-solo.component';

describe('BoundariesSoloComponent', () => {
let component: BoundariesSoloComponent;
let fixture: ComponentFixture<BoundariesSoloComponent>;

beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [BoundariesSoloComponent],
}).compileComponents();
});

beforeEach(() => {
fixture = TestBed.createComponent(BoundariesSoloComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import { Component, Input, OnInit } from '@angular/core';
import { NoahPlaygroundService } from '@features/noah-playground/services/noah-playground.service';
import { BoundariesType } from '@features/noah-playground/store/noah-playground.store';
import { first } from 'rxjs/operators';

@Component({
selector: 'noah-boundaries-solo',
templateUrl: './boundaries-solo.component.html',
styleUrls: ['./boundaries-solo.component.scss'],
})
export class BoundariesSoloComponent implements OnInit {
@Input() boundariesType: BoundariesType;

initialOpacityValue: number = 80;
shown = false;

get displayName(): string {
return this.boundariesType.replace('-', ' ');
}

constructor(private pgService: NoahPlaygroundService) {}

ngOnInit(): void {
this.pgService
.getBoundaries$(this.boundariesType)
.pipe(first())
.subscribe(({ shown, opacity }) => {
this.shown = shown;
this.initialOpacityValue = opacity;
});
}

changeOpacity(opacity: number) {
this.pgService.setBoundariesSoloOpacity(opacity, this.boundariesType);
}

toggleShown() {
this.shown = !this.shown;
this.pgService.setBoundariesSoloShown(this.shown, this.boundariesType);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
</div>
</div>

<div class="top-72 absolute z-10 right-0 pl-2 h-16 w-16 flex flex-row py-4">
<div class="top-72 absolute z-10 right-0 pl-2 h-16 w-16 flex flex-row py-1.5">
<div class="p-2">
<div class="dropdown inline-block relative">
<button
Expand Down
Loading

0 comments on commit d63c1f8

Please sign in to comment.