Skip to content

Commit

Permalink
Merge branch 'test' into tcc-coherence-opacity
Browse files Browse the repository at this point in the history
  • Loading branch information
tylercchase authored Sep 5, 2023
2 parents 4956441 + 6e21a72 commit 53a8387
Show file tree
Hide file tree
Showing 25 changed files with 280 additions and 222 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/prod-request-merged.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Merged to Production

on:
pull_request:
types: [closed]
branches:
- prod

jobs:
OpenRequest:
runs-on: ubuntu-latest
# If a merge request triggered the push, and that request DOESN'T contain the 'bumpless' label.
# (Need to check all three, instead of 'not bumpless', because if and admin overrides the tests,
# it might not have ANY labels at that point.).
if: >
github.event.pull_request.merged &&
(
contains(github.event.pull_request.labels.*.name, 'patch') ||
contains(github.event.pull_request.labels.*.name, 'minor') ||
contains(github.event.pull_request.labels.*.name, 'major')
)
steps:
- uses: actions/checkout@v2

- name: Save version type
# Whichever one return's true, will let their 'echo' statement run:
# Must wrap in "(*) || true" to prevent it from exiting on failure, until
# 'allow-failure' is finished getting added: https://github.com/actions/toolkit/issues/399
run: |
(${{ contains(github.event.pull_request.labels.*.name, 'patch') }} && echo "version_type=patch" >> $GITHUB_ENV) || true
(${{ contains(github.event.pull_request.labels.*.name, 'minor') }} && echo "version_type=minor" >> $GITHUB_ENV) || true
(${{ contains(github.event.pull_request.labels.*.name, 'major') }} && echo "version_type=major" >> $GITHUB_ENV) || true
- name: Create a Release
uses: zendesk/action-create-release@v1
env:
# NOT built in token, so this can trigger other actions:
GITHUB_TOKEN: ${{ secrets.DISCO_GITHUB_MACHINE_USER }}
with:
# version_type populated with the last job just above ^^
auto_increment_type: "${{ env.version_type }}"
tag_schema: semantic
draft: false
prerelease: false
body: "${{ github.event.pull_request.body }}"
24 changes: 13 additions & 11 deletions src/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import {Component, OnInit, OnDestroy, AfterViewChecked, ViewChild, Inject} from '@angular/core';
import {Component, OnInit, OnDestroy, AfterViewInit, ViewChild, Inject } from '@angular/core';
import { TranslateService } from '@ngx-translate/core';
import { MatSidenav } from '@angular/material/sidenav';
import { MatIconRegistry } from '@angular/material/icon';
import {DomSanitizer, Title} from '@angular/platform-browser';
import { DomSanitizer, Title } from '@angular/platform-browser';
import { MatDialog } from '@angular/material/dialog';
import { SubSink } from 'subsink';
import { QueueComponent } from '@components/header/queue';
Expand Down Expand Up @@ -30,8 +30,8 @@ import * as filtersStore from '@store/filters';
import * as services from '@services';
import * as models from './models';
import { SearchType } from './models';
import {DateAdapter, MAT_DATE_FORMATS, MAT_DATE_LOCALE, NativeDateAdapter} from "@angular/material/core";
import {MAT_MOMENT_DATE_FORMATS} from "@angular/material-moment-adapter";
import { DateAdapter, MAT_DATE_FORMATS, MAT_DATE_LOCALE, NativeDateAdapter } from "@angular/material/core";
import { MAT_MOMENT_DATE_FORMATS } from "@angular/material-moment-adapter";

@Component({
selector : 'app-root',
Expand All @@ -46,7 +46,7 @@ import {MAT_MOMENT_DATE_FORMATS} from "@angular/material-moment-adapter";
{provide: MAT_DATE_LOCALE, useValue: 'en'},
]
})
export class AppComponent implements OnInit, OnDestroy, AfterViewChecked {
export class AppComponent implements OnInit, OnDestroy, AfterViewInit {
@ViewChild('sidenav', {static: true}) sidenav: MatSidenav;

private queueStateKey = 'asf-queue-state-v1';
Expand Down Expand Up @@ -344,9 +344,9 @@ export class AppComponent implements OnInit, OnDestroy, AfterViewChecked {
);

this.subs.add(
combineLatest(
combineLatest([
this.store$.select(queueStore.getQueuedJobs),
this.store$.select(hyp3Store.getProcessingOptions)
this.store$.select(hyp3Store.getProcessingOptions)]
).subscribe(
([jobs, options]) => localStorage.setItem(
this.customProductsQueueStateKey, JSON.stringify({jobs, options})
Expand Down Expand Up @@ -428,6 +428,12 @@ export class AppComponent implements OnInit, OnDestroy, AfterViewChecked {
});
}

public ngAfterViewInit(): void {
this.subs.add(this.translate.get('ASF_DATA_SEARCH_TITLE').subscribe(title => {
this.titleService.setTitle(title);
}));
}

public onLoadUrlState(): void {
this.urlStateService.load();
}
Expand All @@ -445,10 +451,6 @@ export class AppComponent implements OnInit, OnDestroy, AfterViewChecked {
this.store$.dispatch(new uiStore.CloseSidebar());
}

public ngAfterViewChecked(): void {
this.titleService.setTitle( this.translate.instant('ASF_DATA_SEARCH_TITLE') );
}

private isEmptySearch(searchState): boolean {
if (searchState.searchType === models.SearchType.LIST) {
return searchState.filters.list.length < 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,15 +109,15 @@ export class ListFiltersComponent implements OnInit, OnDestroy {
);

this.subs.add(
combineLatest(
combineLatest([
this.actions$.pipe(
ofType(
searchStore.SearchActionType.SET_SEARCH_TYPE_AFTER_SAVE,
searchStore.SearchActionType.MAKE_SEARCH,
filtersStore.FiltersActionType.RESTORE_FILTERS
),
withLatestFrom(this.store$.select(filtersStore.getSearchList).pipe(map(list => list.join('\n')))),
)).subscribe(([[_, listStr]]) => this.searchList = listStr
)]).subscribe(([[_, listStr]]) => this.searchList = listStr
)
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export class ProcessingQueueJobsComponent implements OnInit {
// change detection keeps updating the view when it shouldn't causing flickering.
// this observable ensures we only update the dispalyed processing queue list when the values actually change
// or when the user changes the sorting order.
jobsfiltered$ = combineLatest(this.jobs$.pipe(distinctUntilChanged()), this.sortChange$).pipe(
jobsfiltered$ = combineLatest([this.jobs$.pipe(distinctUntilChanged()), this.sortChange$]).pipe(
map(([jobs, _]) => jobs),
filter(jobs => !!jobs),
map(jobs => this.sortJobQueue(jobs)));
Expand Down
12 changes: 6 additions & 6 deletions src/app/components/map/map.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ export class MapComponent implements OnInit, OnDestroy {
private subs = new SubSink();
private gridlinesActive$ = this.store$.select(mapStore.getAreGridlinesActive);
private isMapInitialized$ = this.store$.select(mapStore.getIsMapInitialization);
private viewType$ = combineLatest(
private viewType$ = combineLatest([
this.store$.select(mapStore.getMapView),
this.store$.select(mapStore.getMapLayerType),
this.store$.select(mapStore.getMapLayerType),]
);

private sarviewsEvents: SarviewsEvent[];
Expand Down Expand Up @@ -131,9 +131,9 @@ export class MapComponent implements OnInit, OnDestroy {
);

this.subs.add(
combineLatest(
combineLatest([
this.store$.select(uiStore.getIsResultsMenuOpen),
this.mapService.searchPolygon$
this.mapService.searchPolygon$]
).pipe(
filter(_ => !!this.overlay),
map(([isResultsMenuOpen, polygon]) => !isResultsMenuOpen && !!polygon),
Expand Down Expand Up @@ -186,10 +186,10 @@ export class MapComponent implements OnInit, OnDestroy {
);

this.subs.add(
combineLatest(
combineLatest([
this.mapService.isDrawing$,
this.drawMode$,
this.interactionMode$
this.interactionMode$]
).pipe(
map(([isDrawing, drawMode, interactionMode]) => {
if (interactionMode === models.MapInteractionModeType.DRAW) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ export class BaselineResultsMenuComponent implements OnInit, OnDestroy {

ngOnInit(): void {
this.subs.add(
combineLatest(
combineLatest([
this.scenesService.products$(),
this.pairService.pairs$()
this.pairService.pairs$]
).subscribe(
([products, {pairs, custom}]) => {
this.products = products;
Expand All @@ -97,7 +97,7 @@ export class BaselineResultsMenuComponent implements OnInit, OnDestroy {
);

this.subs.add(
this.pairService.productsFromPairs$().subscribe(
this.pairService.productsFromPairs$.subscribe(
products => this.sbasProducts = products
)
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ export class FileContentsComponent implements OnInit, OnDestroy {

ngOnInit(): void {
this.subs.add(
combineLatest(
combineLatest([
this.store$.select(scenesStore.getUnzippedProducts),
this.store$.select(scenesStore.getOpenUnzippedProduct)
this.store$.select(scenesStore.getOpenUnzippedProduct)]
).pipe(
tap(([_, product]) => this.product = product),
map(([unzipped, product]) => unzipped[product ? product.id : null]),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,10 @@ export class SceneFilesComponent implements OnInit, OnDestroy, AfterContentInit

ngOnInit() {
this.subs.add(
combineLatest(
combineLatest([
this.store$.select(scenesStore.getSelectedSceneProducts),
this.store$.select(scenesStore.getOpenUnzippedProduct),
this.store$.select(scenesStore.getUnzippedProducts)
this.store$.select(scenesStore.getUnzippedProducts)]
).pipe(debounceTime(0))
.subscribe(
([products, unzipped, unzippedFiles]) => {
Expand Down
Loading

0 comments on commit 53a8387

Please sign in to comment.