giseldo/neodataset huggingface dataset:
FE: add the new Timeslider in the KNMI application

- in the KNMI application replace the old timeslider with the new one that FMI made
- don't delete the old timeslider component yet from the core library, we can do that next sprint

see the reference application how its done: https://gitlab.com/opengeoweb/geoweb-core-demo/-/blob/master/src/components/MapWithGeoWebLayerSelect.tsx

![image](/uploads/141052624eeed5118e325403e091185c/image.png)

Story points: 3.0
FE: add the new MultiDimensionSelect in the KNMI application

- replace `VerticalDimensionSelectConnect` with the new `MultiDimensionSelectConnect`
- Import redux component into KNMI application and verify the dimensions work if present. Test for example this layer: Harmnonie Pressure levels. Also make a test for it

See how it's done in https://gitlab.com/opengeoweb/geoweb-core-demo/-/blob/master/src/components/MapWithGeoWebLayerSelect.tsx
![image](/uploads/8583fe1d428af17fce56436c64479cf4/image.png)

Story points: 3.0
FE: WMS layers do not inherit properties from their parents

for description see https://gitlab.com/opengeoweb/geoweb-assets/-/issues/1243

- create example xml's with different settings (fake wms capabilities documents with nested layers)
- use those in tests and check if properties are inherited properly
- verify the log has been removed and the legend works as described in this MR: https://gitlab.com/opengeoweb/opengeoweb/-/merge_requests/545?diff_id=184708213&start_sha=56401a91708b92885e5be401834e129640b8a448#fa09a443a8231f67baa63c26fe502ef3573eed9e_180_180

Story points: 5.0
FE: publishing of theme to NPM

Publish of the new theme lib to NPM

Don't forget to enable the pipeline task to publish to npm in file:

* .gitlab-ci.yml

Also update all the versions to `2.0.1`. Because theme is already on `2.0.1`, we have to start from there now. (otherwise publishing theme to npm will fail)

Also update the readme of core because it needs the theme provider to work.

introduced here: https://gitlab.com/opengeoweb/opengeoweb/-/merge_requests/526

Story points: 3.0
FE: make storybook use fullscreen layout

all the stories currently have some padding around, storybook has an option to use fullscreen layout

Changing `.storybook/preview.js` to

```
export const parameters = {
  layout: 'fullscreen',
  options: {
    storySort: (a, b) => a[1].id.localeCompare(b[1].id),
  },
};
``` 
should solve it. 

Then this file should be obsolete: `opengeoweb/libs/core/.storybook/preview-body.html`

Story points: 5.0
FE: make sure cypress e2e tests don't fail on uncaught exceptions

See image, make sure e2e tests don't fail on uncaught exceptions

(this pops up when we use the latest version of geoweb-core in the application)

https://docs.cypress.io/api/events/catalog-of-events#Uncaught-Exceptions

![image](/uploads/67326d1f5111d63b6c1c5279962b75bb/image.png)

Story points: 2.0
FE: fix imports from @opengeoweb/core/store

in sigmet-airmet and knmi-geoweb there are imports from `@opengeoweb/core/store` 

- [x] export store from opengeoweb/core
- [x] publish a new version for core v0.0.41
- [x] use this in opengeoweb
- [x] fix the imports 

when we move core to opengeoweb, this should be fixed, otherwise this will give type errors

Story points: 3.0
FE: add packages to opengeoweb to prepare for geoweb-core

Install the packages that core needs that opengeoweb doesn't have yet, to prepare for the big move:

**make sure to install the same version that core currently has!**

**check if it should be installed as dependencies or devDependencies**

- [x] - react-sortable-hoc
- [x] - react-rnd
- [x] - es6-enum
- [x] - proj4
- [x] - @types/proj4 (as devDep)
- [x] - mq-polyfill (as devDep)
- [x] - redux-dynamic-modules-saga
- [x] - redux-saga
- [x] - reselect
- [x] - react-intl
- [x] - lodash.clonedeep
- [x] - throttle-debounce

Story points: 2.0
FE: copy geoweb-core code to opengeoweb

> [ ] make sure there are no open merge requests in the old repo
1. [x] remove the dummy files from opengeoweb `libs/core/src/lib`
1. [x] copy all the folders and files inside the geoweb-core `/src` folder into opengeoweb folder `libs/core/src/lib`
1. [x] copy the `stories` folder into opengeoweb folder `libs/core/src/lib` and update all the imports (the opengeoweb folder structure is a bit different)
1. [x] copy the file `.storybook/preview-body.html` to `libs/core/.storybook/preview-body.html`
1. [x] run `npm uninstall @opengeoweb/core`
1. [x] enable the alias for the new core lib inside `tsconfig.base.json` and `.storybook/main.js`
1. [x] remove `@opengeoweb/core` from the externals in `workspace.json` since it's not external anymore
1. [x] copy the relevant README contents into opengeoweb (note in opengeoweb there is a main README for our development and a lib specific README that gets published with the NPM package, make sure to put information in the logical location)
1. [x] make sure the new core lib uses the **local-theme** (renaming that back to theme is a separate ticket https://gitlab.com/opengeoweb/opengeoweb/-/issues/656)
1. [x] run the formatting `npm run format`
1. [x] enable the publish to npm job for core in `.gitlab-ci.yml`
1. [ ] make sure all the pipeline jobs work for core
> [ ] archive the old repo

NOTE: moving storyshots functionality is a separate ticket https://gitlab.com/opengeoweb/opengeoweb/-/issues/666

Story points: 5.0
FE: let pipeline fail on console.error caused by tests

Let pipeline fail on console.error on tests, don't let it fail on console.error in our (core) code
![Screenshot_2021-05-03_at_14.20.06](/uploads/e17b5ba958ed8ba4315f270fb76f2b14/Screenshot_2021-05-03_at_14.20.06.png)

Story points: 5.0
FE: cleanup sigmet-airmet test warnings

Fix this issue (might do this after https://gitlab.com/opengeoweb/opengeoweb/-/issues/663 that can be tested well)


 ![Screenshot_2021-05-03_at_14.01.46](/uploads/71bf3467439373bc3e20704afdf768ab/Screenshot_2021-05-03_at_14.01.46.png)

Story points: 2.0
FE: setup empty core lib in opengeoweb

Prepare an empty lib so we can easily copy paste the code when it's ready.

- Follow the steps for adding a new **publishable** library like defined in the readme, with name `core`.
- add a dummy component, story and test so we can fully run the pipeline for this new library
- Inside the main `tsconfig.base.json` add an alias for @opengeoweb/core but leave it commented out (so it can be enabled when core is moved). See for example like we did previously for the empty theme library:
![image](/uploads/3e76304eba127a9703b9299c34bd7703/image.png)

Story points: 3.0
FE: rename local-theme alias to theme

When geoweb-core is moved, we should rename local-theme to theme. Find and replace `import { GWTheme } from '@opengeoweb/local-theme';` and remove the `local-` prefix in following files:

- .storybook/main.js
- libs/theme/package.json
- tsconfig.base.json
- remaining files in libs
- remaining files in apps

Story points: 3.0
BE: dev-branches should import dev UserPoolId

Currently, UserPoolId to dev userpool is hardcoded in cloudformation.

Preferably, the id is retrieved based on the stack name `knmi-geoweb-backend-dev-user-pool`

The dev-userpool stack exports the ID but this is not yet imported in the dev-stacks. 

First step would be to research how to import outputs from stacks. Second step is to implement this for the dev-branches in the geoweb serverless backend

Story points: 5.0
FE: fix taf issues pane thumbs up icon

The thumbs up icon in the TAF issues pane should be bigger [as in design](https://app.zeplin.io/project/5ecf84a3c6ae1047a368f393/screen/61f2bfb7f296e5b460ed7dde)

![image](/uploads/797fa86d9fb90008d6b080c502622f4c/image.png)

Story points: 1.0
Update serverless backend readme with local config

Create a repo where we can store (local) config keys for geoweb knmi. 

- Add to readme of serverless backend instructions to run geoweb locally with the following config

config knmi:
```
{
  "AUTH_LOGIN_URL": "https://geoweb-tst.auth.eu-west-1.amazoncognito.com/oauth2/authorize?client_id={client_id}&response_type=code&scope=email+openid&redirect_uri={app_url}/code&state={state}&code_challenge={code_challenge}&code_challenge_method=S256",
  "AUTH_LOGOUT_URL": "https://geoweb-tst.auth.eu-west-1.amazoncognito.com/logout?client_id={client_id}&logout_uri={app_url}/login",
  "AUTH_TOKEN_URL": "https://84q8po1iql-vpce-026bc1761b17f4f69.execute-api.eu-west-1.amazonaws.com/infra/auth/token",
  "AUTH_CLIENT_ID": "2ol63v0glufqj39r67slauv6uj",
  "INFRA_BASE_URL": "https://84q8po1iql-vpce-026bc1761b17f4f69.execute-api.eu-west-1.amazonaws.com/infra",
  "APP_URL": "http://localhost:5400",
  "SW_BASE_URL": "https://vko1z3liqc-vpce-026bc1761b17f4f69.execute-api.eu-west-1.amazonaws.com/spaceweather",
  "SIGMET_BASE_URL": "https://argl88v0da-vpce-026bc1761b17f4f69.execute-api.eu-west-1.amazonaws.com/aviation",
  "AIRMET_BASE_URL": "https://argl88v0da-vpce-026bc1761b17f4f69.execute-api.eu-west-1.amazonaws.com/aviation",
  "TAF_BASE_URL": "https://argl88v0da-vpce-026bc1761b17f4f69.execute-api.eu-west-1.amazonaws.com/aviation",
  "PRESET_BACKEND_URL": "https://gwpresetsbe.geoweb.dev.knmi.cloud",
  "INITIAL_PRESETS_FILENAME": "knmi.initialPresets.json",
  "SCREEN_PRESETS_FILENAME": "knmi.screenPresets.json",
  "LAYER_SELECT": false,
  "FEATURE_APP_TITLE": "KNMI GeoWeb",
  "FEATURE_FORCE_AUTHENTICATION": true,
  "FEATURE_MODULE_SPACE_WEATHER": true,
  "FEATURE_MODULE_TAF": true,
  "FEATURE_MODULE_SIGMET": true,
  "FEATURE_MODULE_AIRMET": true,
  "FEATURE_MENU_SATCOMP": true,
  "FEATURE_MENU_FEEDBACK": true,
  "FEATURE_MENU_INFO": false,
  "FEATURE_MENU_VERSION": true
}

```

Story points: 1.0
FE: unified version fix linting

I noticed in https://gitlab.com/opengeoweb/opengeoweb/-/merge_requests/1730/diffs#e914e8a23cd6a5a4647c3eca647780bdd83d2299_65_75 that the MR did not fail, while I'm console.logging. The linting job should fail if there's an error like using console.log

Story points: 2.0
BE: backend testing documentation

Update documentation for presets-backend and serverless backend to test BE with FE branch

Serverless BE
- Has to be deployed to be able to test 
- Add yourself to the user pool if needed
- Check the logs of Deploy cloud formation job
- Find the url of the deployed branch there
- In your browser go to this url+/assets/config.json
- Copy the BE + auth urls to your local frontend config.json

Presets BE
* Make sure you are not on connect
* Checkout branch locally
* Make sure docker is installed and running
* Run command line in the root of the project:

cat <<EOF > .env
PRESETS_ENABLE_SSL=TRUE
PRESETS_BACKEND_PORT=4443
PRESETS_BACKEND_PORT_HTTP=80
EXTERNALADDRESS=https://localhost:4443/
OAUTH2_USERINFO=https://geoweb-tst.auth.eu-west-1.amazoncognito.com/oauth2/userInfo
VERSION=1.0.0
EOF

docker compose up -d --build

* In the web browser that you will use to test the app: go to address: https://localhost:4443/ and accept the certificate (this is not possible on connect). Keep this browser open.
* Copy   "PRESET_BACKEND_URL": "https://localhost:4443/"  into your local config.json
* Go on connect
* Run your app with cognito authentication (same cognito as OAUTH2_USERINFO key that started the presets-be)
* Open the app in the same browser as where you accepted the certificate

Story points: 3.0
FE: Add Presets module to Frontend HDL

Presets module and its calls should be added to the FrontEnd HDL document.
https://app.diagrams.net/#G10h7Bkjtv2wHEMgf-PqTzCs-SBwEo5NNZ

Upload the image to [confluence](https://confluence.knmi.nl/display/GW/Frontend+HLD).

Story points: 2.0
FE: unified version remove KNMI app

Do this when we are fully sure everything is working.

- remove knmi-geoweb and knmi-geoweb-e2e (there are nx commands to make this easy that automatically remove references in other files)
- update the depGraph.png
- remove commands from package.json
- remove/update gitlab pipeline jobs (there should be no reference to `knmi` in `.gitlab-ci.yml`)

Story points: 2.0
BE: TAF: Status change should not be set to published before IWXXM is generated

On publishing there are 4 steps taken

1. change status to 'published'
1. generate TAC to S3
1. generate IWXXM2.1 to S3
1. generate IWXXM3.0 to S3 the state should be changed to publish if only all those steps did not fail.

Solution: step 1 should become the last step after 2,3 and 4.

An explicit error message should warn that the publish is failed in case of failure.

Story points: 5.0
FE: fix config keys that loads json

The following keys are known that they are not working. When logged in for KNMI it does not takes a custom json file defined in the following keys: 
```
"INITIAL_PRESETS_FILENAME": "knmi.initialPresets.json",
"SCREEN_PRESETS_FILENAME": "knmi.screenPresets.json",
```

Expected result, should work with `knmi.screenPresets.json`

Story points: 3.0
FE: unified version create validations for the keys

Create validations for all keys we currently have. First create a TS type where we can define all our current keys in config.json. Check the knmi-config for reference, as that holds all the keys. Keep some keys optional so we don't have to change other repos, and keep a bit of order in it (api keys together).  

For validation, keep it simple (string has length, or boolean is expected)

Later we can check to make all keys mandatory.

Story points: 3.0
FE: TAF switch button part 2

Connect the button the the BE.

- lock: `PATCH /taf` with `editor: "username"`
- unlock: `PATCH /taf` with `editor: ""`

example body:
```
{
    creationDate: "",
    canbe: ['DRAFTED', 'DISCARDED', 'PUBLISHED'],
    editor: "username",
    taf: {
      uuid: '5f9583fjdf0f337925',
      location: 'EHAM',
      status: 'NEW',
      type: 'NORMAL',
      messageType: 'ORG',
      ...
    },
  },
```

Story points: 3.0
BE: Investigate on how to improve the geoweb-serverless-backend deployment

**Goal**

* understand the current CI/CD pipeline
* investigate and propose alternative deployment ways

**Suggestions**

- There's a lot of repetition in the CFN template. By using a tool like [troposphere](https://github.com/cloudtools/troposphere) we could reduce the number of line and make it easier to maintain. Default values are specified only once. First step in the pipeline would be generating the CFN template from a Python script, followed by the usual linting and deployment. We would also get rid of the `sed` replacement in the current template.
- Investigate alternatives (like [stacker](https://stacker.readthedocs.io/en/latest/config.html) and [cdk](https://aws.amazon.com/cdk/)) for managing CFN templates.
- The end-goal could be to have completely separate deployments for frontend, Aviation, SpaceWeather, Cognito. To reach this goal we could take the following path:
   1. Extract monitoring (Grafana) and move to separate repository.
   1. Extract Cognito userpool generation (for tst, acc, prd) to the newly created [dev-cognito-userpool repository](https://gitlab.com/KNMI/geoweb/backend-services/dev-cognito-userpool) like has been done for dev.
   1. Create separate deployment repository for frontend and point to backend services.
   1. Create separate code repository and deployment repository for each backend services (Aviation, SpaceWeather), one at a time.
   1. Optional: create separate deployment repository for triggering deployment pipelines of all the components. In this repo dependencies are managed. Or could this just be the responsibility of the frontend deployment?

**To be discussed**

How do we manage dependencies and rollbacks? We currently have the possibility to deploy the complete stack from a previous tag. This could become more difficult.

How do we connect the different stacks? By exporting output values and importing those in another stack. This makes the importing stack dependent on the exporting stack, meaning the latter cannot be deleted without deleting the first. (We have to investigate if updates are problematic.) Or we use `aws cloudformation describe-stacks` inside CI/CD for looking up exported output values and pass those as parameters through the properties files created in .gitlab-ci.yml. The benefit is that stacks can be deleted independently.

Story points: 5.0
BE: dev-branches should use the general dev Cognito userpool

Dev branches of geoweb-serverless-backend should use the communal Cognito userpool (exported by it's CloudFormation stack, see #2413) as a userpool by referencing the exported UserPool in the dev-userpool stack and attach their own userpoolclient (with callback-url etc) to that userpool. 
In the communal Cognito userpool, one smoketestuser should exist. In geoweb-serverless-backend, the test should re-use an existing smoketest user. 


The documentation needs to be updated as well


**NOTE** make sure nothing changes for TST & ACC & PRD

Story points: 3.0
BE: Cloudformation stack for dev user pool

We should create a CloudFormation stack to deploy a Cognito userpool for all dev-stacks to use.

This userpool (and prbably it's URL) should be exported from the stack, so dev branches of geoweb-serverless-backend can use that to add their own userpoolclients (with shared user names and passwords).

So usernames should be added there and a smoketestuser too.

---
**How to test:**
* Repository that created the CloudFormation stack: https://gitlab.com/KNMI/geoweb/backend-services/dev-cognito-userpool 
* Merge this [MR](https://gitlab.com/KNMI/geoweb/geoweb-admin/cognito-user-manager/-/merge_requests/73) to add/remove users to dev userpool
* Name of cognito userpool: `geoweb-backend-dev-user-pool`
* smoketest user has been added to userpool
* Further testing in next ticket #2414

Story points: 3.0
FE: layermanager add layer tooltip hover bug

This tooltip is visible when the layermanager is default visible, check the story `http://localhost:4300/?path=/story/application-demo--presets-demo-on-map-dark-theme`, probably it's visible because `<AddLayersButton />` component has `shouldFocus` in `DescriptionRow` file. This is needed for the keyboard controls (I assume), but it's blocking the controls. 

![Screenshot_2022-08-11_at_09.15.05](/uploads/7194f7b9e58a8848b57fe594cc07de9e/Screenshot_2022-08-11_at_09.15.05.png)

Story points: 2.0
FE: show spinner when saving as or deleting a preset takes a long time

When user tries to Save As or Delete a preset, and BE takes a long time, the user should be informed. 

In the confirm dialog, the Save/Delete button should be disabled and show a spinner somewhere, so the user knows that the request is still being processed and doesn't click 10 more times on the Save button.

Check how it's done in sigmet-airmet.

Story points: 3.0
FE: show (modified) when existing preset has changes

Existing map preset:

* when the map preset is an existing preset, the name of the map preset will be shown in regular (non italic) font in the map preset menu
* when the user changes the content (e.g. add new datalayer) or properties of the content in the map preset, the name of the map preset will be shown in italic font with `(modified)` behind its name in the map preset menu

New preset should still show '(not saved)', existing presets should show '(modified)'

![image](/uploads/960cba9fd5b0bfa0ab92a233bd48b30c/image.png)

Story points: 2.0
FE: not show preset id in error message

The error message when selecting a preset fails, contains the preset id.

for the user, the id is not useful. 

Change message to: ' `Preset could not be loaded: Select a different one or try again.`


Old message:
![image](/uploads/d14816ada153340d30e0f4b4a48933b7/image.png)

Story points: 1.0
FE: map pin location is set while not being visible or disabled

In the core [story](http://localhost:5000/?path=/story/components-mapview-mapviewconnect--toggle-map-pin-action) try to do the following action:

1. click on the map somewhere
1. hide the pin
1. click on the map somewhere with mouse (pin is hidden correctly)
1. make the pin visible

At this point you have the pin on the place that you clicked in the point 2). This is strange behavior because you loose the position that you chose correctly when the pin was visible.

Same problem with the disabled map pin. In story http://localhost:5001/?path=/story/components-mapview-mapviewconnect--set-and-disable-map-pin-action

1. the pin is disabled, but when you click on the map the setMapPinLocation action still gets fired

- The problem is the MapPinLocation is fired always, even if it's not visible or disabled. Should only fire when it's enabled and visible.
- would be nice to bundle all MapPin stories in 1 file, to already clean that folder a bit up.

Story points: 2.0
FE: add missing map preset test of showTimeSlider in saga

In the mappreset saga this part:
```
   if (showTimeSlider !== undefined) {
        yield put(
          mapActions.toggleTimeSliderIsVisible({
            mapId,
            isTimeSliderVisible: showTimeSlider,
          }),
        );
      }
```
does not have a test, should be added

Story points: 1.0
FE: fix styling for icons in buttons

Buttons should have 8px margin between icon and text, and have size 24px.

in buttonStyle:

```
// icon styling
  '& .MuiButton-startIcon': {
    marginRight: '8px',
    '& .MuiSvgIcon-root': {
      fontSize: '24px',
    },
  },
```

this will make sure the startIcon in Buttons always looks the same. 

should also be fixed for `ToggleButton` and `CustomToggleButton`

NOTE: `CustomToggleButton.stories.tsx` now has a custom fix to show some space between icon and text, this should be removed and solved with styling.

Story points: 2.0
BE: Add HARM vs SFC Obs preset to KNMI map presets

Goal of this issue is to add the `HARM vs SFC Obs` that currently is present in the openGeoWeb preset menu (only) to the map preset menu in the layer manager.

Note that the observations and Harmonie model output needs to come from the operational KNMI services (currently on openGeoWeb we're using the external services).

Story points: 3.0
BE: fix refreshing of expired token for presets-backend

If the Cognito token expires (after 1 hour norm
ally), presets-backend calls fail. Application has to be refreshed for the token to be refreshed.
An easy way to test/fix this is to generate a geoweb-serverless-backend branch with a Cognito which expires tokens within a few minutes, so you don't have to wait long for expiration. Make serverless-backend and presets-backend branches with the same branch name.

Could BE, could be FE problem.

Story points: 3.0
FE: Icons remove duplicates

The Add button is used 3 times, choose either the first or last variant and remove the rest (test branch temptestbranch). Make a default Props object (with a default width and height which we can reuse for all icons later), and make sure you can overwrite these props. 

![Screenshot_2022-08-01_at_07.07.44](/uploads/f546eda6fe2e669aa24c5c4a90ab70ce/Screenshot_2022-08-01_at_07.07.44.png)

Story points: 3.0
FE: error message save as not displayed

_Note_: messed something up in first (closed) MR, so discarded that one. Only need to look at open MR!

The new error messages returned by the presets BE is not shown in the FE.

To replicate:
- Try to SaveAs a preset with the exact same name as an existing one. 
- It still says "Request failed with status code 400"

Two thoughts:
- FE: Since the BE does return the error message in the response, we could find it and use it
- BE: Is the error returned differently than what we have for the other modules? Could we fix it here?

Story points: 2.0
FE: put the storybook example of icons inside a grid

Would be nice to align them inside a grid, so we also have an easier diff change when the snapshot changes

![Screenshot_2022-07-27_at_14.24.14](/uploads/a9609dcc809f290dd2b5d9567c76b840/Screenshot_2022-07-27_at_14.24.14.png)

Story points: 2.0