From 7ae1be76d460ea92159665558b81553dbd337e1c Mon Sep 17 00:00:00 2001 From: Romuald Caplier Date: Tue, 23 Jul 2024 09:47:58 +0200 Subject: [PATCH] code review fix --- .../page-selector.component.css | 0 .../page-selector.component.html | 2 +- .../page-selector.component.spec.ts | 20 +++++-- .../page-selector.component.ts | 2 +- .../src/app/edit/edit-page.component.spec.ts | 10 ++-- .../src/app/edit/edit-page.component.ts | 4 +- apps/metadata-editor/tsconfig.json | 3 +- assets-common/css/default-fonts.css | 8 --- assets-common/fonts/Petrona-Regular.woff2 | Bin 21296 -> 0 bytes libs/common/fixtures/src/index.ts | 2 + .../src/lib/editor}/editor.fixtures.ts | 34 ++++++------ .../fixtures/src/lib/editor}/index.ts | 0 libs/feature/editor/src/index.ts | 1 - .../src/lib/+state/editor.effects.spec.ts | 3 +- .../src/lib/+state/editor.selectors.spec.ts | 50 +++++++++++------- libs/feature/editor/tsconfig.json | 3 +- libs/feature/editor/tsconfig.lib.json | 3 +- tailwind.base.config.js | 1 - 18 files changed, 77 insertions(+), 69 deletions(-) rename apps/metadata-editor/src/app/edit/components/{breadcrumbs => page-selector}/page-selector.component.css (100%) rename apps/metadata-editor/src/app/edit/components/{breadcrumbs => page-selector}/page-selector.component.html (97%) rename apps/metadata-editor/src/app/edit/components/{breadcrumbs => page-selector}/page-selector.component.spec.ts (59%) rename apps/metadata-editor/src/app/edit/components/{breadcrumbs => page-selector}/page-selector.component.ts (94%) delete mode 100644 assets-common/fonts/Petrona-Regular.woff2 rename libs/{feature/editor/src/lib/fixtures => common/fixtures/src/lib/editor}/editor.fixtures.ts (72%) rename libs/{feature/editor/src/lib/fixtures => common/fixtures/src/lib/editor}/index.ts (100%) diff --git a/apps/metadata-editor/src/app/edit/components/breadcrumbs/page-selector.component.css b/apps/metadata-editor/src/app/edit/components/page-selector/page-selector.component.css similarity index 100% rename from apps/metadata-editor/src/app/edit/components/breadcrumbs/page-selector.component.css rename to apps/metadata-editor/src/app/edit/components/page-selector/page-selector.component.css diff --git a/apps/metadata-editor/src/app/edit/components/breadcrumbs/page-selector.component.html b/apps/metadata-editor/src/app/edit/components/page-selector/page-selector.component.html similarity index 97% rename from apps/metadata-editor/src/app/edit/components/breadcrumbs/page-selector.component.html rename to apps/metadata-editor/src/app/edit/components/page-selector/page-selector.component.html index 3085adc2f5..279daf25d9 100644 --- a/apps/metadata-editor/src/app/edit/components/breadcrumbs/page-selector.component.html +++ b/apps/metadata-editor/src/app/edit/components/page-selector/page-selector.component.html @@ -20,7 +20,7 @@ : 'bg-gray-200' " > - {{ index }} + {{ index + 1 }}
{ +class EditorFacadeMock { + editorConfig$ = new BehaviorSubject(EDITOR_CONFIG()) + setCurrentPage = jest.fn() +} + +describe('PageSelectorComponent', () => { let component: PageSelectorComponent let fixture: ComponentFixture beforeEach(async () => { await TestBed.configureTestingModule({ imports: [TranslateModule.forRoot()], - providers: [], + providers: [ + { + provide: EditorFacade, + useClass: EditorFacadeMock, + }, + ], }).compileComponents() fixture = TestBed.createComponent(PageSelectorComponent) component = fixture.componentInstance - component.pages = EDITOR_CONFIG().pages - component.selectedPage = 0 fixture.detectChanges() }) diff --git a/apps/metadata-editor/src/app/edit/components/breadcrumbs/page-selector.component.ts b/apps/metadata-editor/src/app/edit/components/page-selector/page-selector.component.ts similarity index 94% rename from apps/metadata-editor/src/app/edit/components/breadcrumbs/page-selector.component.ts rename to apps/metadata-editor/src/app/edit/components/page-selector/page-selector.component.ts index 0cb4d03769..0170944011 100644 --- a/apps/metadata-editor/src/app/edit/components/breadcrumbs/page-selector.component.ts +++ b/apps/metadata-editor/src/app/edit/components/page-selector/page-selector.component.ts @@ -19,6 +19,6 @@ export class PageSelectorComponent { constructor(public facade: EditorFacade) {} pageSectionClickHandler(index: number) { - this.facade.setCurrentPage(index) // TODO + this.facade.setCurrentPage(index) } } diff --git a/apps/metadata-editor/src/app/edit/edit-page.component.spec.ts b/apps/metadata-editor/src/app/edit/edit-page.component.spec.ts index 36fc290d2d..4889c0822c 100644 --- a/apps/metadata-editor/src/app/edit/edit-page.component.spec.ts +++ b/apps/metadata-editor/src/app/edit/edit-page.component.spec.ts @@ -1,14 +1,13 @@ import { ComponentFixture, TestBed } from '@angular/core/testing' import { EditPageComponent } from './edit-page.component' import { ActivatedRoute, Router } from '@angular/router' -import { EDITOR_CONFIG, EditorFacade } from '@geonetwork-ui/feature/editor' import { NO_ERRORS_SCHEMA } from '@angular/core' -import { DATASET_RECORDS } from '@geonetwork-ui/common/fixtures' +import { DATASET_RECORDS, EDITOR_CONFIG } from '@geonetwork-ui/common/fixtures' import { BehaviorSubject, Subject } from 'rxjs' import { NotificationsService } from '@geonetwork-ui/feature/notifications' import { TranslateModule } from '@ngx-translate/core' -import { FindPipe } from '../pipes/filter.pipe' -import { PageSelectorComponent } from './components/breadcrumbs/page-selector.component' +import { PageSelectorComponent } from './components/page-selector/page-selector.component' +import { EditorFacade } from '@geonetwork-ui/feature/editor' const getRoute = () => ({ snapshot: { @@ -27,11 +26,11 @@ class RouterMock { class EditorFacadeMock { record$ = new BehaviorSubject(DATASET_RECORDS[0]) - recordFields$ = new BehaviorSubject(EDITOR_CONFIG()) openRecord = jest.fn() saveError$ = new Subject() saveSuccess$ = new Subject() draftSaveSuccess$ = new Subject() + editorConfig$ = new BehaviorSubject(EDITOR_CONFIG()) } class NotificationsServiceMock { showNotification = jest.fn() @@ -48,7 +47,6 @@ describe('EditPageComponent', () => { imports: [ EditPageComponent, TranslateModule.forRoot(), - FindPipe, PageSelectorComponent, ], schemas: [NO_ERRORS_SCHEMA], diff --git a/apps/metadata-editor/src/app/edit/edit-page.component.ts b/apps/metadata-editor/src/app/edit/edit-page.component.ts index 16d2ecc7d3..5c7a54a539 100644 --- a/apps/metadata-editor/src/app/edit/edit-page.component.ts +++ b/apps/metadata-editor/src/app/edit/edit-page.component.ts @@ -15,7 +15,7 @@ import { } from '@geonetwork-ui/feature/notifications' import { TranslateModule, TranslateService } from '@ngx-translate/core' import { filter, firstValueFrom, Subscription, take } from 'rxjs' -import { PageSelectorComponent } from './components/breadcrumbs/page-selector.component' +import { PageSelectorComponent } from './components/page-selector/page-selector.component' import { marker } from '@biesbjerg/ngx-translate-extract-marker' import { map } from 'rxjs/operators' @@ -130,7 +130,7 @@ export class EditPageComponent implements OnInit, OnDestroy { if (currentPage === 0) { this.router.navigate(['catalog', 'search']) } else { - this.facade.setCurrentPage(currentPage - 1) // TODO + this.facade.setCurrentPage(currentPage - 1) } } diff --git a/apps/metadata-editor/tsconfig.json b/apps/metadata-editor/tsconfig.json index 54f2b40f0e..099e2430b3 100644 --- a/apps/metadata-editor/tsconfig.json +++ b/apps/metadata-editor/tsconfig.json @@ -19,8 +19,7 @@ "noImplicitReturns": true, "noFallthroughCasesInSwitch": true, "target": "es2020", - "lib": ["dom", "es2020", "dom.iterable"], - "downlevelIteration": true + "lib": ["dom", "es2020", "dom.iterable"] }, "angularCompilerOptions": { "strictInjectionParameters": true, diff --git a/assets-common/css/default-fonts.css b/assets-common/css/default-fonts.css index 34941cbd8c..fc8d76c604 100644 --- a/assets-common/css/default-fonts.css +++ b/assets-common/css/default-fonts.css @@ -1,11 +1,3 @@ -/* Petrona */ -@font-face { - font-family: 'Petrona'; - font-style: normal; - font-weight: 400; - font-display: swap; - src: url(../fonts/Petrona-Regular.woff2) format('woff2'); -} /* arabic */ @font-face { font-family: 'Readex Pro'; diff --git a/assets-common/fonts/Petrona-Regular.woff2 b/assets-common/fonts/Petrona-Regular.woff2 deleted file mode 100644 index bac09590b6045853dd96334768991328183a94b7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 21296 zcmY&;V~`+Cv}J4BHm7adwr$(CZQGo-ZQHhO+r2a2d$AjPeq=@DkGyq}_nfROS6LAT z06>7hP^1HZ`}+Xo)B*rdnEs!+fAjx8ctu2%q_HviumX0lvGG9l0779Az#;vo;Qg~P zpn|9X09k;DfWwqP@P3t3gM}h%GULe)aOvtfkwVC;H_wPpi3sI!ZdwZAzeGT9LdsAa zT>kuI;fN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*e(>NQwUQaiFO;ZqOXi|58x}35$7i#jTust>8Tv7X6tacWyHp`)tjbsEkjAhowfgry+<63E z_^>2u_pvk7xv6M6j}=5Km$W)Xtm8C`s%gdA>7aAh&b%GkbJ#Bp#*sf9o|@KN^>t1- zj>_qU_fNgJ_DKBD(fkkBG+2jcr~)o${^RZu;VXTR+xJnK8!(h_Rwxqp*nyTtZB{p( zy@87RC`S3)>5EL(Rh^&V<@zxs0uB@Qt>IY|e|G`U-l1431S{)!G5PgV|FHzMPKQoM z4SA-^LVZ@+Y$BLmv)U~So>2=z=yuBAnOSAhCm+ojx6K9TY-f~Vu}l|bId8^Qmt1zm zbJ=dX=DHnnytTv~x7?QNf3Nh&m#09HLdDi7F;A&7ZR8Xx$B`vcG~5!{~Y$jQybj#ulxS=mk0jvkL8(XGE~QfJDhOC)1Qrz_{NNSW4)zT*l3XfgAOK$ zFrwJTZmja=Jef=;yPosjrr)7e7^P8daTP@uS~YT`FiPWSRL03T8yDlc&3lJj_Ldw8 z^yfrodU@{gc7;Jzt2{DRZvwQj>ioy2E+P3 NtxT>8=|*}0005{qHc ({ +export const EDITOR_CONFIG = () => ({ pages: [ { labelKey: 'Resource description', @@ -20,7 +18,7 @@ export const EDITOR_CONFIG = (): EditorConfig => ({ ], }) -export const EDITOR_SECTION_ABOUT = (): EditorSection => ({ +export const EDITOR_SECTION_ABOUT = () => ({ labelKey: 'About the resource', descriptionKey: 'This section describes the resource.', hidden: false, @@ -34,28 +32,28 @@ export const EDITOR_SECTION_ABOUT = (): EditorSection => ({ ], }) -export const EDITOR_SECTION_DATA_MANAGER = (): EditorSection => ({ +export const EDITOR_SECTION_DATA_MANAGER = () => ({ labelKey: 'Data manager', descriptionKey: '', hidden: false, fields: [], }) -export const EDITOR_SECTION_USE_AND_ACCESS_CONDITIONS = (): EditorSection => ({ +export const EDITOR_SECTION_USE_AND_ACCESS_CONDITIONS = () => ({ labelKey: 'Data manager', descriptionKey: '', hidden: false, fields: [EDITOR_FIELD_LICENSE()], }) -export const EDITOR_SECTION_CLASSIFICATION = (): EditorSection => ({ +export const EDITOR_SECTION_CLASSIFICATION = () => ({ labelKey: 'Classification', descriptionKey: 'The classification has an impact on the access to the data.', hidden: false, fields: [EDITOR_FIELD_KEYWORDS(), EDITOR_FIELD_UNIQUE_IDENTIFIER()], }) -export const EDITOR_FIELD_TITLE = (): EditorField => ({ +export const EDITOR_FIELD_TITLE = () => ({ model: 'title', hidden: false, value: 'Accroches vélos MEL', @@ -64,7 +62,7 @@ export const EDITOR_FIELD_TITLE = (): EditorField => ({ }, }) -export const EDITOR_FIELD_ABSTRACT = (): EditorField => ({ +export const EDITOR_FIELD_ABSTRACT = () => ({ model: 'abstract', hidden: false, value: 'Abstract', @@ -73,7 +71,7 @@ export const EDITOR_FIELD_ABSTRACT = (): EditorField => ({ }, }) -export const EDITOR_FIELD_RESOURCE_UPDATED = (): EditorField => ({ +export const EDITOR_FIELD_RESOURCE_UPDATED = () => ({ model: 'resourceUpdated', hidden: false, formFieldConfig: { @@ -81,7 +79,7 @@ export const EDITOR_FIELD_RESOURCE_UPDATED = (): EditorField => ({ }, }) -export const EDITOR_FIELD_RECORD_UPDATED = (): EditorField => ({ +export const EDITOR_FIELD_RECORD_UPDATED = () => ({ model: 'recordUpdated', hidden: false, formFieldConfig: { @@ -92,7 +90,7 @@ export const EDITOR_FIELD_RECORD_UPDATED = (): EditorField => ({ onSaveProcess: '${dateNow()}', }) -export const EDITOR_FIELD_UPDATE_FREQUENCY = (): EditorField => ({ +export const EDITOR_FIELD_UPDATE_FREQUENCY = () => ({ model: 'updateFrequency', hidden: false, formFieldConfig: { @@ -101,7 +99,7 @@ export const EDITOR_FIELD_UPDATE_FREQUENCY = (): EditorField => ({ value: 'unknown', }) -export const EDITOR_FIELD_TEMPORAL_EXTENTS = (): EditorField => ({ +export const EDITOR_FIELD_TEMPORAL_EXTENTS = () => ({ model: 'temporalExtents', hidden: false, formFieldConfig: { @@ -110,7 +108,7 @@ export const EDITOR_FIELD_TEMPORAL_EXTENTS = (): EditorField => ({ value: [], }) -export const EDITOR_FIELD_SPATIAL_EXTENTS = (): EditorField => ({ +export const EDITOR_FIELD_SPATIAL_EXTENTS = () => ({ model: 'spatialExtents', hidden: false, formFieldConfig: { @@ -118,7 +116,7 @@ export const EDITOR_FIELD_SPATIAL_EXTENTS = (): EditorField => ({ }, }) -export const EDITOR_FIELD_KEYWORDS = (): EditorField => ({ +export const EDITOR_FIELD_KEYWORDS = () => ({ model: 'keywords', hidden: false, formFieldConfig: { @@ -126,7 +124,7 @@ export const EDITOR_FIELD_KEYWORDS = (): EditorField => ({ }, }) -export const EDITOR_FIELD_UNIQUE_IDENTIFIER = (): EditorField => ({ +export const EDITOR_FIELD_UNIQUE_IDENTIFIER = () => ({ model: 'uniqueIdentifier', hidden: false, formFieldConfig: { @@ -136,7 +134,7 @@ export const EDITOR_FIELD_UNIQUE_IDENTIFIER = (): EditorField => ({ value: 'accroche_velos', }) -export const EDITOR_FIELD_LICENSE = (): EditorField => ({ +export const EDITOR_FIELD_LICENSE = () => ({ model: 'licenses', hidden: false, formFieldConfig: { @@ -145,7 +143,7 @@ export const EDITOR_FIELD_LICENSE = (): EditorField => ({ }, }) -export const EDITOR_FIELDS = (): EditorField[] => [ +export const EDITOR_FIELDS = () => [ EDITOR_FIELD_TITLE(), EDITOR_FIELD_ABSTRACT(), EDITOR_FIELD_RESOURCE_UPDATED(), diff --git a/libs/feature/editor/src/lib/fixtures/index.ts b/libs/common/fixtures/src/lib/editor/index.ts similarity index 100% rename from libs/feature/editor/src/lib/fixtures/index.ts rename to libs/common/fixtures/src/lib/editor/index.ts diff --git a/libs/feature/editor/src/index.ts b/libs/feature/editor/src/index.ts index c95afdefd4..5e6dd85211 100644 --- a/libs/feature/editor/src/index.ts +++ b/libs/feature/editor/src/index.ts @@ -9,4 +9,3 @@ export * from './lib/components/record-form/record-form.component' export * from './lib/components/wizard/wizard.component' export * from './lib/components/wizard-field/wizard-field.component' export * from './lib/components/wizard-summarize/wizard-summarize.component' -export * from './lib/fixtures' diff --git a/libs/feature/editor/src/lib/+state/editor.effects.spec.ts b/libs/feature/editor/src/lib/+state/editor.effects.spec.ts index 7ec73663fe..49bdb73887 100644 --- a/libs/feature/editor/src/lib/+state/editor.effects.spec.ts +++ b/libs/feature/editor/src/lib/+state/editor.effects.spec.ts @@ -26,7 +26,8 @@ const initialEditorState = { saveError: null, changedSinceSave: false, alreadySavedOnce: true, - fieldsConfig: [], + editorConfig: [], + currentPage: 0, } describe('EditorEffects', () => { diff --git a/libs/feature/editor/src/lib/+state/editor.selectors.spec.ts b/libs/feature/editor/src/lib/+state/editor.selectors.spec.ts index 1b94e59ca0..58053095e6 100644 --- a/libs/feature/editor/src/lib/+state/editor.selectors.spec.ts +++ b/libs/feature/editor/src/lib/+state/editor.selectors.spec.ts @@ -1,7 +1,12 @@ -import { EditorPartialState, initialEditorState } from './editor.reducer' +import { + EDITOR_FEATURE_KEY, + EditorPartialState, + initialEditorState, +} from './editor.reducer' import * as EditorSelectors from './editor.selectors' import { DATASET_RECORDS } from '@geonetwork-ui/common/fixtures' import { DEFAULT_FIELDS } from '../fields.config' +import { EditorSectionWithValues } from './editor.models' describe('Editor Selectors', () => { let state: EditorPartialState @@ -56,22 +61,27 @@ describe('Editor Selectors', () => { }) describe('selectRecordFields', () => { - it('should return the config and value for each field', () => { - const result = EditorSelectors.selectRecordSections(state) - - const actualSections = result.pages.map((page) => page.sections).flat() - - const expectedSections = DEFAULT_FIELDS.pages - .map((page) => page.sections) - .flat() - - expect(actualSections).toEqual(expectedSections) - - const actualFields = actualSections + it('should return the config and value for specified page', () => { + const recordSections = EditorSelectors.selectRecordSections(state) + + const expectedResult = DEFAULT_FIELDS.pages[0].sections.map( + (section) => ({ + ...section, + fieldsWithValues: section.fields.map((fieldConfig) => ({ + config: fieldConfig, + value: + state[EDITOR_FEATURE_KEY].record?.[fieldConfig.model] ?? null, + })), + }) + ) as EditorSectionWithValues[] + + expect(recordSections).toEqual(expectedResult) + + const actualFields = recordSections .map((section) => section.fields) .flat() - const expectedFields = expectedSections + const expectedFields = expectedResult .map((section) => section.fields) .flat() @@ -91,15 +101,17 @@ describe('Editor Selectors', () => { }, }) - const resultFields = result.pages - .flatMap((page) => page.sections) - .flatMap((section) => section.fields) + const resultFields = result.flatMap( + (section) => section.fieldsWithValues + ) const abstractField = resultFields.find( - (field) => field.model === 'abstract' + (field) => field.config.model === 'abstract' ) - const titleField = resultFields.find((field) => field.model === 'title') + const titleField = resultFields.find( + (field) => field.config.model === 'title' + ) expect(abstractField.value).toEqual('') expect(titleField.value).toEqual('') diff --git a/libs/feature/editor/tsconfig.json b/libs/feature/editor/tsconfig.json index 9e29358f76..5879bfb75c 100644 --- a/libs/feature/editor/tsconfig.json +++ b/libs/feature/editor/tsconfig.json @@ -16,8 +16,7 @@ "noImplicitReturns": true, "noFallthroughCasesInSwitch": true, "target": "es2020", - "lib": ["dom", "es2020", "dom.iterable"], - "downlevelIteration": true + "lib": ["dom", "es2020", "dom.iterable"] }, "angularCompilerOptions": { "strictInjectionParameters": true, diff --git a/libs/feature/editor/tsconfig.lib.json b/libs/feature/editor/tsconfig.lib.json index 2a4c9a5e36..02d129fa3b 100644 --- a/libs/feature/editor/tsconfig.lib.json +++ b/libs/feature/editor/tsconfig.lib.json @@ -7,8 +7,7 @@ "declarationMap": true, "inlineSources": true, "types": [], - "lib": ["dom", "es2020", "dom.iterable"], - "downlevelIteration": true + "lib": ["dom", "es2020", "dom.iterable"] }, "exclude": [ "src/test-setup.ts", diff --git a/tailwind.base.config.js b/tailwind.base.config.js index 6464667647..faea732f64 100644 --- a/tailwind.base.config.js +++ b/tailwind.base.config.js @@ -51,7 +51,6 @@ module.exports = { title: 'var(--font-family-title, ui-serif, Georgia, Cambria, "Times New Roman", Times, serif)', // alias for serif mono: 'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace', - petrona: ['Petrona', 'serif'], }, fontSize: { 13: '13px',