Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Secondary entry points to allow better dead-code elimination #4628

Merged
merged 75 commits into from
Feb 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
b5104b2
refactor(panels): Create sidebar panel buttons from outside of the co…
FilipLeitner Dec 4, 2023
c030174
refactor: Main panel visiblity
FilipLeitner Dec 6, 2023
2bf7dcb
refactor: Use panelBaseComponent method to set width of panels
FilipLeitner Dec 6, 2023
91ffff1
refactor: GUI components visibility
FilipLeitner Dec 6, 2023
ad0f376
refactor: Add tripPlaner button to sidebarDefs, fix decoupling app, f…
FilipLeitner Dec 7, 2023
fb371b7
refator: Create panel components
FilipLeitner Dec 11, 2023
38f423e
refactor: Align panel,componentm folder and config names for panel co…
FilipLeitner Dec 11, 2023
3df9197
fix: Minisidebar visiblity
FilipLeitner Dec 11, 2023
f3e8cf2
fix(sensors): Adjust to changes
FilipLeitner Dec 11, 2023
c45a414
refactor(styler): Align naming of folder and component
FilipLeitner Dec 11, 2023
631d190
fix:Decoupling test app
FilipLeitner Dec 11, 2023
cae8bcf
test: Fix tests
FilipLeitner Dec 12, 2023
5b494c7
build(decouplin-app): Optimize chunk number
FilipLeitner Dec 12, 2023
78d1f93
refactor(panel-constructor): Verbose approach for panel creating
FilipLeitner Dec 12, 2023
cc10157
perf(decoupling): Split panel chunks into smaller parts
FilipLeitner Dec 13, 2023
c392e72
refactor(overlay): Expose GUI overlay creation as a function
FilipLeitner Dec 13, 2023
d27610c
build(app): Use 'decoupling' method to build hslayers-app
FilipLeitner Dec 14, 2023
a82b32f
refactor: Move common, components and cofig out of src
FilipLeitner Dec 18, 2023
9bc64ce
refactor: Update imports among entrypoints
FilipLeitner Jan 3, 2024
1496507
feat: Add missing ng-package files
FilipLeitner Jan 3, 2024
faffb4d
build: Resolve common/layman circular
FilipLeitner Jan 3, 2024
65d6c91
fix: Shared imports
FilipLeitner Jan 3, 2024
8f648b5
build: More common and components/add-data circular dep fixes
FilipLeitner Jan 3, 2024
f22e3e4
build: More import and API updates
FilipLeitner Jan 4, 2024
8ea7009
build: Circular deps in common/layman
FilipLeitner Jan 4, 2024
e68cf06
build: Circular deps in components/save-map
FilipLeitner Jan 4, 2024
e12cc1a
build: Circular deps of map.service
FilipLeitner Jan 4, 2024
78cf057
build: Circular deps of saveMap.service
FilipLeitner Jan 4, 2024
d95ffa1
build: Circular deps in between share and save-map
FilipLeitner Jan 4, 2024
981952b
build: Return add-data and composition services to components entrypo…
FilipLeitner Jan 5, 2024
a5b98fc
build: Some query services to shared
FilipLeitner Jan 5, 2024
83530bb
build: Endpoint types to common/types
FilipLeitner Jan 5, 2024
5f7667e
build: add-data.service and dimensions descriptor
FilipLeitner Jan 5, 2024
3591de2
build: More language related code to shared
FilipLeitner Jan 5, 2024
fc0e2c0
build: Move add-data services to shared entrypoint
FilipLeitner Jan 5, 2024
34a3116
build: Panels services
FilipLeitner Jan 5, 2024
3bc15a5
build: More entrypoint adjustments: share, save-map, stlyer
FilipLeitner Jan 5, 2024
7da8a77
build: Circular - shared/map x shared/utils
FilipLeitner Jan 6, 2024
9607736
build: Pipes common entry
FilipLeitner Jan 6, 2024
088e13c
build: Rest of the circular deps
FilipLeitner Jan 8, 2024
15fe0fe
fix: prebuild
FilipLeitner Jan 9, 2024
0089f21
test: Isolate test files
FilipLeitner Jan 9, 2024
2654913
fix: Style and test-app imports
FilipLeitner Jan 9, 2024
8ff344a
sq
FilipLeitner Jan 9, 2024
3c674f7
build: Sidebar service to shared
FilipLeitner Jan 10, 2024
6c31d9a
build: Hslayers app
FilipLeitner Jan 10, 2024
20cade1
test: Add missing subject to layout mock and fix tests
FilipLeitner Jan 10, 2024
b4e5360
build: Sensors imports
FilipLeitner Jan 10, 2024
e16b5ce
build: Overlay constructor
FilipLeitner Jan 11, 2024
dad06d2
refactor: Remove layman interceptor
FilipLeitner Jan 11, 2024
19311cb
fix: Dialog container component
FilipLeitner Jan 11, 2024
528e71e
build: Decoupling app
FilipLeitner Jan 11, 2024
69d7976
build: Test-app
FilipLeitner Jan 11, 2024
571107f
fix: Close tag in add-data - merge mistake
FilipLeitner Jan 11, 2024
3981a3a
chore: Add decoupling test app build script
FilipLeitner Jan 12, 2024
973c4a9
build: Isolate query-popup
FilipLeitner Jan 12, 2024
0cc8057
fix: Register popUp on map
FilipLeitner Jan 12, 2024
f5fd17c
refactor: Depreacate components/layout in favor of hslayers component
FilipLeitner Jan 12, 2024
adf794f
refactor: hslayers-app
FilipLeitner Jan 12, 2024
5a6d6c5
refactor: Decoupling test app
FilipLeitner Jan 12, 2024
e149a10
test: Fix hslayers component test
FilipLeitner Jan 15, 2024
c51084d
build: hslayers-ng/types
FilipLeitner Jan 15, 2024
7329331
fix: Set permissions success callback
FilipLeitner Jan 15, 2024
07d44fa
fix: Import layer table into modules
FilipLeitner Jan 15, 2024
7300caf
fix: Set permissions success callback
FilipLeitner Jan 15, 2024
5e5c833
fix: Add missing standalone directive import
FilipLeitner Jan 15, 2024
7237aeb
fix: Panel-header viewchild value race condition
FilipLeitner Jan 15, 2024
bb8b838
refactor: Remove unused imports from hslayers component
FilipLeitner Jan 15, 2024
887d8bf
build: Deprecate angular material project
FilipLeitner Jan 15, 2024
ee33f26
build: Update imports in cesium
FilipLeitner Jan 15, 2024
253c5da
build:Remove jszip from initial vendor chunk using dynamic jszip import
FilipLeitner Jan 16, 2024
1c30d01
test: Fix e2e tests and issues connected with them
FilipLeitner Jan 17, 2024
e39cbda
chore: Correct typos
FilipLeitner Feb 13, 2024
cf51a24
refactor: Remove defers from print component as they are of no use atm
FilipLeitner Feb 13, 2024
64e871d
chore: Remove unused core module
FilipLeitner Feb 13, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 1 addition & 2 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
* @jmacura @FilipLeitner
**/package*.json @jmacura
./projects/hslayers-server/** @fzadrazil
./projects/hslayers-material/** @SLeitgeb
./projects/hslayers-material-app/** @SLeitgeb

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,5 @@ hslayers-server.db
projects/hslayers-server/data/hsl-share.db
cypress/videos
cypress/screenshots
cypress/downloads/*
cypress/tests/__image_snapshots__
156 changes: 4 additions & 152 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@
}
],
"optimization": true,
"sourceMap": true,
"namedChunks": false,
"sourceMap": false,
"namedChunks": true,
"extractLicenses": true,
"vendorChunk": true,
"buildOptimizer": true,
Expand Down Expand Up @@ -163,6 +163,7 @@
"sourceMap": true,
"vendorChunk": true,
"optimization": false,
"namedChunks": true,
"outputPath": "dist/test-app",
"index": "projects/test-app/src/index.html",
"main": "projects/test-app/src/main.ts",
Expand Down Expand Up @@ -362,7 +363,7 @@
"production": {
"optimization": true,
"sourceMap": true,
"namedChunks": false,
"namedChunks": true,
"extractLicenses": true,
"vendorChunk": true,
"buildOptimizer": true,
Expand Down Expand Up @@ -783,155 +784,6 @@
}
}
}
},
"hslayers-material": {
"projectType": "library",
"root": "projects/hslayers-material",
"sourceRoot": "projects/hslayers-material/src",
"prefix": "lib",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:ng-packagr",
"options": {
"tsConfig": "projects/hslayers-material/tsconfig.lib.json",
"project": "projects/hslayers-material/ng-package.json"
},
"configurations": {
"production": {
"tsConfig": "projects/hslayers-material/tsconfig.lib.prod.json"
}
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "projects/hslayers-material/src/test.ts",
"tsConfig": "projects/hslayers-material/tsconfig.spec.json",
"karmaConfig": "projects/hslayers-material/karma.conf.js"
}
},
"lint": {
"builder": "@angular-eslint/builder:lint",
"options": {
"lintFilePatterns": [
"projects/hslayers-material/**/*.ts",
"projects/hslayers-material/**/*.html"
]
}
}
}
},
"hslayers-material-app": {
"projectType": "application",
"schematics": {
"@schematics/angular:component": {
"style": "scss"
}
},
"root": "projects/hslayers-material-app",
"sourceRoot": "projects/hslayers-material-app/src",
"prefix": "app",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist/hslayers-material-app",
"index": "projects/hslayers-material-app/src/index.html",
"main": "projects/hslayers-material-app/src/main.ts",
"polyfills": "projects/hslayers-material-app/src/polyfills.ts",
"tsConfig": "projects/hslayers-material-app/tsconfig.app.json",
"assets": [
"projects/hslayers-material-app/src/favicon.ico",
"projects/hslayers-material-app/src/assets"
],
"styles": [
"./node_modules/@angular/material/prebuilt-themes/indigo-pink.css",
"projects/hslayers-material-app/src/styles.scss"
],
"scripts": [],
"vendorChunk": true,
"extractLicenses": false,
"buildOptimizer": false,
"sourceMap": true,
"optimization": false,
"namedChunks": true
},
"configurations": {
"production": {
"fileReplacements": [
{
"replace": "projects/hslayers-material-app/src/environments/environment.ts",
"with": "projects/hslayers-material-app/src/environments/environment.prod.ts"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"namedChunks": false,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"budgets": [
{
"type": "initial",
"maximumWarning": "2mb",
"maximumError": "5mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "200kb",
"maximumError": "300kb"
}
]
}
},
"defaultConfiguration": ""
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "hslayers-material-app:build"
},
"configurations": {
"production": {
"browserTarget": "hslayers-material-app:build:production"
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "hslayers-material-app:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "projects/hslayers-material-app/src/test.ts",
"polyfills": "projects/hslayers-material-app/src/polyfills.ts",
"tsConfig": "projects/hslayers-material-app/tsconfig.spec.json",
"karmaConfig": "projects/hslayers-material-app/karma.conf.js",
"assets": [
"projects/hslayers-material-app/src/favicon.ico",
"projects/hslayers-material-app/src/assets"
],
"styles": [
"./node_modules/@angular/material/prebuilt-themes/indigo-pink.css",
"projects/hslayers-material-app/src/styles.scss"
],
"scripts": []
}
},
"lint": {
"builder": "@angular-eslint/builder:lint",
"options": {
"lintFilePatterns": [
"projects/hslayers-material-app/**/*.ts",
"projects/hslayers-material-app/**/*.html"
]
}
}
}
}
},
"cli": {
Expand Down
27 changes: 22 additions & 5 deletions cypress/tests/add-data-catalogue.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,22 +70,39 @@ describe('Hslayers application', () => {
);
});

it('Should be possible to add layer as WMS', () => {
it('Should be possible to add layer', () => {
cy.wait(2000);
cy.get(
'hs-add-data-catalogue .list-group hs-catalogue-list-item:first',
).click();
cy.get('.hs-catalogue-item-body a:first span:not(.hs-loader)')
cy.get('.hs-catalogue-item-body div div.btn-group span:not(.hs-loader)')
.should('have.html', 'Add to map')
.click();
//Should switch to Layermanager
cy.get(
'.hs-main-panel:not([hidden]) hs-panel-header[name*="layerManager"]',
).should('exist');
});

it('Should be possible to add layer as WMST/WMTS/WFS', () => {
cy.wait(2000);
cy.get(
'hs-add-data-catalogue .list-group hs-catalogue-list-item:first',
).click();
cy.get('.hs-catalogue-item-body div div button.dropdown-toggle').click();

cy.get('[title*="What does it mean?"]:first').should('exist').click();
cy.get('hs-catalogue-list-item div[data-toggle="buttons"] label').should(
'have.length',
3,
);
cy.get(
'hs-catalogue-list-item div[data-toggle="buttons"]:first label:first',
'hs-catalogue-list-item div[data-toggle="buttons"] label:first',
).click();

//Should switch to Layermanager
// //Should switch to Layermanager
cy.get(
'.hs-main-panel:not([hidden]) hs-panel-header[name*="layermanager"]',
'.hs-main-panel:not([hidden]) hs-panel-header[name*="layerManager"]',
).should('exist');
});
});
33 changes: 9 additions & 24 deletions cypress/tests/add-data-url.cy.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
function checkIfLayerAdded(layerName) {
cy.get(`hs-panel-header[name="layermanager"]`).should('be.visible');
cy.get(`hs-panel-header[name="layerManager"]`).should('be.visible');
cy.get(
'hs-layermanager-layer-list li:first .d-flex button.hs-lm-item-visibility',
'hs-layer-manager-layer-list:first li:last .d-flex button.hs-lm-item-visibility',
).should('have.class', 'hs-checkmark');
cy.get('hs-layermanager-layer-list li:first .hs-lm-item-title').should(
cy.get('hs-layer-manager-layer-list:first li:last .hs-lm-item-title').should(
'have.text',
` ${layerName} `, //Extra padding around title
);
Expand All @@ -15,7 +15,7 @@ function addLayerAndCheckIfAdded() {

//it('Layer should be added', () => {
cy.get('hs-layer-table table tr:first input[type="checkbox"]').click();
cy.get('hs-layer-table table tr td:nth-child(2n) span').then(($td) => {
cy.get('hs-layer-table table tr:first td:nth-child(2n) span').then(($td) => {
const layerName = $td.html();
cy.get('button[title="Add selected layers to the map"').click();
checkIfLayerAdded(layerName);
Expand All @@ -29,17 +29,17 @@ function openPanelAndTypeTab(index) {
).click();
cy.get(`hs-panel-header[name="addData"]`).should('be.visible');
//Open corresponding type tab
cy.get('hs-add-data ul[role="tablist"] li:nth-child(2n) a').click();
cy.get('hs-add-data ul li:nth-child(2n) a').click();
cy.get(`hs-add-data-url>.d-flex>.container>.row>button`).eq(index).click();
}

describe('Hslayers application', () => {
beforeEach(() => {
cy.visit('/');
//Open layer manager
cy.get('.hs-sidebar-item[data-cy="layermanager"]').click();
cy.get('.hs-sidebar-item[data-cy="layerManager"]').click();
//Turn off all layers
cy.get('hs-layermanager-layer-list li .d-flex button.hs-checkmark').each(
cy.get('hs-layer-manager-layer-list li .d-flex button.hs-checkmark').each(
(button) => {
cy.wrap(button).click();
},
Expand All @@ -54,9 +54,6 @@ describe('Hslayers application', () => {
);
cy.get(`hs-url-wms hs-common-url input + button`).click();
addLayerAndCheckIfAdded();
//it('Layer should be visible on map', () => {
cy.wait(3000); //Need to wait for failed layman request error toast to disappear if HsConfig.errorToastDuration is large
cy.get('.hs-ol-map').matchImage();
});

it('WMTS layer should be visible on map', () => {
Expand All @@ -67,9 +64,6 @@ describe('Hslayers application', () => {
);
cy.get(`hs-url-wmts hs-common-url input + button`).click();
addLayerAndCheckIfAdded();
//it('Layer should be visible on map', () => {
cy.wait(2000);
cy.get('.hs-ol-map').matchImage();
});

it('WFS layer should be visible on map', () => {
Expand All @@ -81,9 +75,6 @@ describe('Hslayers application', () => {
);
cy.get(`hs-url-wfs hs-common-url input + button`).click();
addLayerAndCheckIfAdded();
//it('Layer should be visible on map', () => {
cy.wait(2000);
cy.get('.hs-ol-map').matchImage();
});

it('geoJSON layer should be visible on map', () => {
Expand All @@ -97,14 +88,8 @@ describe('Hslayers application', () => {

const layerName = 'Added geojson layer';
cy.get(`input.form-control[name="name"]`).type(layerName);
cy.get('.form-horizontal > :nth-child(2) > .btn-primary').should(
'not.have.attr',
'disabled',
);
cy.get('.form-horizontal > :nth-child(2) > .btn-primary').click();
cy.get('hs-add-to-map .btn-primary').should('not.have.attr', 'disabled');
cy.get('hs-add-to-map .btn-primary').click();
checkIfLayerAdded(layerName);
//it('Layer should be visible on map', () => {
cy.wait(2000);
cy.get('.hs-ol-map').matchImage();
});
});
2 changes: 1 addition & 1 deletion cypress/tests/external.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ describe('Hslayers application', () => {
beforeEach(() => {
cy.visit('/');
//Open layer manager
cy.get('.hs-sidebar-item[data-cy="layermanager"]').click();
cy.get('.hs-sidebar-item[data-cy="layerManager"]').click();
});

it('Should zoom to feature', () => {
Expand Down
14 changes: 5 additions & 9 deletions cypress/tests/language.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,7 @@ describe('Hslayers application', () => {
'hs-mini-sidebar .hs-sidebar-item.hs-panel-hidden[data-cy="language"]',
).click();
cy.get('hs-language .list-group .btn:last').click();
cy.get('hs-language hs-panel-header').should(
'have.attr',
'ng-reflect-title',
'Linguam mutare',
);
cy.get('hs-language hs-panel-header span').should(
cy.get('hs-language hs-panel-header a.nav-link').should(
'contain.text',
'Linguam mutare',
);
Expand All @@ -20,8 +15,9 @@ describe('Hslayers application', () => {
it('App should open with a language other than the default', () => {
cy.visit('/?hs-lang=cs');

cy.get(
'hs-some-panel > .card > hs-panel-header > .card-header > .flex-grow-1',
).should('contain.text', 'Můj úžasný panel');
cy.get('hs-some-panel hs-panel-header a.nav-link').should(
'contain.text',
'Můj úžasný panel',
);
});
});
Loading
Loading