Skip to content
Merged

v2.26.2 #2787

Show file tree
Hide file tree
Changes from all commits
Commits
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
7 changes: 0 additions & 7 deletions e2e/geographic/flight-directions.spec.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
import { test, expect } from 'e2e/fixtures';
import { sentinel1Page } from 'e2e/helpers';

test('No direction selections available', async ({ page }) => {
await sentinel1Page(page);
await page.getByRole('button', { name: 'Sentinel-' }).click();
await page.getByRole('menuitem', { name: 'AIRSAR This dataset' }).click();
await page.getByRole('button', { name: 'Filters', exact: true }).click();
await expect(page.getByText('No flight directions to select')).toBeVisible();
});
test('Two Directions available', async ({ page }) => {
await sentinel1Page(page);

Expand Down
4 changes: 0 additions & 4 deletions e2e/geographic/full-search.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ import { waitForASFAPIResponse, sentinel1Page } from 'e2e/helpers';
{ menuSelector: 'ARIA S1 GUNW', expected: 'ARIA S1 GUNW' },
{ menuSelector: 'SMAP', expected: 'SMAP' },
{ menuSelector: 'UAVSAR', expected: 'UAVSAR' },
{ menuSelector: 'RADARSAT-1', expected: 'RADARSAT-1' },
{ menuSelector: 'ERS This dataset', expected: 'ERS' },
{ menuSelector: 'JERS-1', expected: 'JERS' },
{ menuSelector: 'AIRSAR', expected: 'AIRSAR' },
{ menuSelector: 'SEASAT', expected: 'SEASAT' },
].forEach(({ menuSelector, expected }) => {
test(`Validate available dataset: ${expected}`, async ({ page }) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,11 @@
[expandedHeight]="customExpandedHeight"
>
<mat-panel-title>
{{ 'CAMPAIGN_SELECTOR' | translate }}
@if (actualDataset() | isRelevant: p.SITE_DESCRIPTION) {
{{ 'SITE_DESCRIPTION' | translate }}
} @else {
{{ 'CAMPAIGN_SELECTOR' | translate }}
}
</mat-panel-title>
</mat-expansion-panel-header>
<app-mission-selector></app-mission-selector>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,13 @@ export class DatasetSelectorComponent {
}

public onSelectionChange(dataset: string): void {
const isDeprecated = this.datasets()
?.find((d) => d.id === dataset)
?.properties.includes(models.Props.DEPRECATED);
if (isDeprecated) {
return;
}

window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
event: 'dataset-selected',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,19 @@

<br />
{{ 'EMAIL' | translate }}
<a class="link" href="mailto:uso@alaska.edu"
>uso&#64;alaska.edu
<a class="link" href="mailto:uso@asf.alaska.edu"
>uso&#64;asf.alaska.edu
</a>
{{ 'FOR_MORE_INFO' | translate }}
<a
class="link"
href="https://www.earthdata.nasa.gov/news/selected-historical-asf-datasets-moving-request-only-access"
target="_blank"
[attr.aria-label]="'DATASET_DEPRECATION_LINK_ARIA' | translate"
(click)="$event.stopPropagation()"
>
{{ 'DATASET_DEPRECATION_LINK_TEXT' | translate }}
</a>
</div>
}
</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
}

.dataset-deprecated {
cursor: default;

@include themify($themes) {
background: color.adjust(themed('warn'), $lightness: 20%) !important;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,44 +1,56 @@
<form [formGroup]="stateForm">
@if (dataset() | isRelevant: p.SITE_DESCRIPTION) {
<mat-form-field>
<mat-label>{{ 'FILTER_CAMPAIGN' | translate }}</mat-label>
<input type="text" matInput formControlName="missionFilter" />
<mat-label>{{ 'SITE_DESCRIPTION' | translate }}</mat-label>
<input
type="text"
matInput
[value]="selectedMission() ?? ''"
(change)="onSiteDescriptionChange($event)"
/>
</mat-form-field>
</form>
} @else {
<form [formGroup]="stateForm">
<mat-form-field>
<mat-label>{{ 'FILTER_CAMPAIGN' | translate }}</mat-label>
<input type="text" matInput formControlName="missionFilter" />
</mat-form-field>
</form>

@if (!!selectedMission()) {
<div class="selected">
<div class="selected-row">
<div>
<span class="v-mid selected-label">
<b>{{ 'SELECTED' | translate }}</b> <span> • </span>
{{ selectedMission() }}
</span>
</div>
<div>
<mat-icon
(click)="setMission(null)"
class="clickable v-mid clear-mission-icon"
mat-list-icon
[matTooltip]="'CLEAR_SELECTED_MISSION' | translate"
>clear</mat-icon
>
@if (!!selectedMission()) {
<div class="selected">
<div class="selected-row">
<div>
<span class="v-mid selected-label">
<b>{{ 'SELECTED' | translate }}</b> <span> • </span>
{{ selectedMission() }}
</span>
</div>
<div>
<mat-icon
(click)="setMission(null)"
class="clickable v-mid clear-mission-icon"
mat-list-icon
[matTooltip]="'CLEAR_SELECTED_MISSION' | translate"
>clear</mat-icon
>
</div>
</div>
<mat-divider class="selected-divider" [inset]="true"></mat-divider>
</div>
<mat-divider class="selected-divider" [inset]="true"></mat-divider>
</div>
}
}

<cdk-virtual-scroll-viewport
class="mission-list-viewport"
minBufferPx="500"
maxBufferPx="600"
itemSize="48"
>
<mat-nav-list role="list">
<div *cdkVirtualFor="let mission of filteredMissions">
<a (click)="setMission(mission)" mat-list-item role="listitem">
{{ mission }}
</a>
</div>
</mat-nav-list>
</cdk-virtual-scroll-viewport>
<cdk-virtual-scroll-viewport
class="mission-list-viewport"
minBufferPx="500"
maxBufferPx="600"
itemSize="48"
>
<mat-nav-list role="list">
<div *cdkVirtualFor="let mission of filteredMissions">
<a (click)="setMission(mission)" mat-list-item role="listitem">
{{ mission }}
</a>
</div>
</mat-nav-list>
</cdk-virtual-scroll-viewport>
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import { startWith, map, tap } from 'rxjs/operators';
import { SubSink } from 'subsink';

import * as models from '@models';
import { IsRelevantPipe } from '@pipes/relevant.pipe';
import { AppState } from '@store';
import * as filtersStore from '@store/filters';

Expand Down Expand Up @@ -54,6 +55,7 @@ export const _filter = (opt: string[], value: string): string[] => {
MatNavList,
CdkVirtualForOf,
MatListItem,
IsRelevantPipe,
TranslateModule,
],
})
Expand All @@ -62,6 +64,8 @@ export class MissionSelectorComponent implements OnInit, OnDestroy {
private fb = inject(UntypedFormBuilder);

public dataset$ = this.store$.select(filtersStore.getSelectedDataset);
public dataset = this.store$.selectSignal(filtersStore.getSelectedDataset);
public p = models.Props;

public missionsByDataset = this.store$.selectSignal(
filtersStore.getMissionsByDataset,
Expand Down Expand Up @@ -138,6 +142,11 @@ export class MissionSelectorComponent implements OnInit, OnDestroy {
this.store$.dispatch(new filtersStore.SelectMission(mission));
}

public onSiteDescriptionChange(event: Event): void {
const siteDescription = (event.target as HTMLInputElement).value.trim();
this.setMission(siteDescription || null);
}

ngOnDestroy() {
this.subs.unsubscribe();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,10 +185,21 @@

<br />
{{ 'EMAIL' | translate }}
<a class="link" href="mailto:uso@alaska.edu"
>uso&#64;alaska.edu
<a class="link" href="mailto:uso@asf.alaska.edu"
>uso&#64;asf.alaska.edu
</a>
{{ 'FOR_MORE_INFO' | translate }}
<a
class="link"
href="https://www.earthdata.nasa.gov/news/selected-historical-asf-datasets-moving-request-only-access"
target="_blank"
[attr.aria-label]="
'DATASET_DEPRECATION_LINK_ARIA' | translate
"
(click)="$event.stopPropagation()"
>
{{ 'DATASET_DEPRECATION_LINK_TEXT' | translate }}
</a>
</div>
}
<div
Expand All @@ -213,6 +224,7 @@
onOpenDerivedDataset(dataset.download_url, dataset.name)
"
mat-button
[disabled]="dataset.deprecated"
>
{{ 'DOWNLOAD' | translate }}
</button>
Expand Down
6 changes: 4 additions & 2 deletions src/assets/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,10 @@
"DATA_FILTERS": "Date Filters",
"DATA_TYPE": "Data Type",
"DATASET": "Dataset",
"DATASET_DEPRECATION_NOTICE": "This dataset is scheduled to be removed from searchable interfaces.",
"DATASET_DEPRECATION_NOTICE_TEMP": "This dataset is scheduled to be temporarily removed from searchable interfaces.",
"DATASET_DEPRECATION_LINK_ARIA": "Learn more about legacy dataset access (opens in new tab)",
"DATASET_DEPRECATION_LINK_TEXT": "Read the announcement",
"DATASET_DEPRECATION_NOTICE": "This dataset has been removed from searchable interfaces.",
"DATASET_DEPRECATION_NOTICE_TEMP": "This dataset has been temporarily removed from searchable interfaces.",
"DATASET_INFO": "Dataset Info",
"DATASET_LINKED": "dataset_linked",
"DATASETS": "Datasets",
Expand Down
6 changes: 4 additions & 2 deletions src/assets/i18n/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,10 @@
"DATA_FILTERS": "Filtros de Fecha",
"DATA_TYPE": "Tipo de Dato",
"DATASET": "Conjunto de Datos",
"DATASET_DEPRECATION_NOTICE": "Este conjunto de datos está programado para ser eliminado de las interfaces de búsqueda.",
"DATASET_DEPRECATION_NOTICE_TEMP": "This dataset is scheduled to be temporarily removed from searchable interfaces.",
"DATASET_DEPRECATION_LINK_ARIA": "Más información sobre el acceso a conjuntos de datos heredados (se abre en una pestaña nueva)",
"DATASET_DEPRECATION_LINK_TEXT": "Leer el anuncio",
"DATASET_DEPRECATION_NOTICE": "Este conjunto de datos fue eliminado de las interfaces de búsqueda.",
"DATASET_DEPRECATION_NOTICE_TEMP": "Este conjunto de datos fue eliminado temporalmente de las interfaces de búsqueda.",
"DATASET_INFO": "Información del conjunto de datos",
"DATASET_LINKED": "conjunto_de_datos_vinculado",
"DATASETS": "Conjuntos de datos",
Expand Down
Loading