Skip to content

Commit dda01e4

Browse files
martin-trajanovskiMartin TrajanovskinitrosxJunjiequan
authored
feat: published data refactor (#1896)
## Description This PR aims to refactor the published data following the new workflow shown in the picture bellow. ## Motivation The old published data workflow was outdated and wasn't using all the metadata fields that can be provided to DataCite ## Fixes: Please provide a list of the fixes implemented in this PR * Items added ## Changes: Please provide a list of the changes implemented by this PR * Changes are mostly in the way we create and edit the published data. The published data now has configuration that is fetched from the backend and the metadata form is generated based on that. ## Tests included - [x] Included for each change/fix? - [x] Passing? (Merge will not be approved unless this is checked) ## Documentation - [ ] swagger documentation updated \[required\] - [ ] official documentation updated \[nice-to-have\] ### official documentation info If you have updated the official documentation, please provide PR # and URL of the pages where the updates are included ## Backend version - [ ] Does it require a specific version of the backend - which version of the backend is required: ## Summary by Sourcery Refactor the published data workflow to support dynamic metadata configuration, full CRUD operations, and improved user experience. New Features: - Fetch published data configuration from backend and generate metadata forms dynamically via JSONForms - Add create, save, amend, publish, update, and delete actions and effects for published data with localStorage persistence - Implement unsaved changes guard and “Save and continue” workflow with canDeactivate support - Enable editing of dataset lists in batch view with navigation and localStorage integration Enhancements: - Overhaul NgRx state, actions, effects, reducers, and selectors for metadata-driven publication workflows - Update publish and edit components to use Angular Material expansion panels and JSONForms for metadata input - Enhance published data details view to display metadata fields and conditional action buttons with confirmation dialogs - Improve dataset table selection mode based on user presence and add status column to dashboard Build: - Add @jsonforms/core, @jsonforms/angular, and @jsonforms/angular-material dependencies Tests: - Update unit tests for actions, effects, reducers, and selectors to reflect new metadata structure and action names - Adjust Cypress tests for new save and continue button IDs Chores: - Remove deprecated static form fields and related HTML code - Apply styles for expansion panels and button spacing - Add canDeactivate guard to publishing and edit routes <img width="1172" height="1434" alt="published_data_workflow_1" src="https://github.com/user-attachments/assets/a50e04e2-9183-457b-8d61-cb56a7be0032" /> --------- Co-authored-by: Martin Trajanovski <martin.trajanovski@sigmatechnology.com> Co-authored-by: Max Novelli <Max.Novelli@ess.eu> Co-authored-by: junjiequan <a331998513@gmail.com>
1 parent 3d36143 commit dda01e4

File tree

57 files changed

+4025
-685
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+4025
-685
lines changed

.github/workflows/test.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,9 @@ jobs:
116116
sudo sysctl -w vm.max_map_count=262144
117117
118118
- name: Run docker-compose
119+
env:
120+
DOI_USERNAME: ${{ secrets.DOI_TEST_USERNAME }}
121+
DOI_PASSWORD: ${{ secrets.DOI_TEST_PASSWORD }}
119122
run: |
120123
cp CI/e2e/docker-compose.e2e.yaml docker-compose.yaml
121124
docker compose pull

CI/e2e/.env.backend.e2e

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ RABBITMQ_ENABLED="no"
2121
RABBITMQ_HOSTNAME="localhost"
2222
RABBITMQ_USERNAME="rabbitmq"
2323
RABBITMQ_PASSWORD="rabbitmq"
24-
REGISTER_DOI_URI="https://mds.test.datacite.org/doi"
24+
REGISTER_DOI_URI="https://api.test.datacite.org/dois"
25+
REGISTER_DOI_URI_V3="https://mds.test.datacite.org/doi"
2526
REGISTER_METADATA_URI="https://mds.test.datacite.org/metadata"
2627
SITE="ESS"
2728
OAI_PROVIDER_ROUTER=

CI/e2e/docker-compose.e2e.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ services:
3131
- "./CI/e2e/functionalAccounts.e2e.json:/home/node/app/functionalAccounts.json"
3232
- "./CI/e2e/proposalTypes.e2e.json:/home/node/app/proposalTypes.json"
3333
- "./CI/e2e/frontend.config.e2e.json:/home/node/app/dist/config/frontend.config.json"
34+
- "./CI/e2e/publishedDataConfig.e2e.json:/home/node/app/publishedDataConfig.json"
35+
environment:
36+
- DOI_USERNAME=${DOI_USERNAME}
37+
- DOI_PASSWORD=${DOI_PASSWORD}
3438
depends_on:
3539
mongodb:
3640
condition: service_healthy

CI/e2e/frontend.config.e2e.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"editDatasetEnabled": true,
88
"editDatasetSampleEnabled": true,
99
"editMetadataEnabled": true,
10-
"editPublishedData": false,
10+
"editPublishedData": true,
1111
"addSampleEnabled": false,
1212
"externalAuthEndpoint": "/api/v3/auth/msad",
1313
"facility": "SciCat Vanilla",

0 commit comments

Comments
 (0)