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

Modify DTO sent to CreateCollection and UpdateCollection use cases #596

Open
wants to merge 10 commits into
base: develop
Choose a base branch
from

Conversation

g-saracca
Copy link
Contributor

@g-saracca g-saracca commented Feb 5, 2025

What this PR does / why we need it:

Modifies how we are sending the DTO while creating or updating a collection

Which issue(s) this PR closes:

Suggestions on how to test this:

Step 1: Run the Development Environment

  1. Execute npm i.
  2. Navigate with cd packages/design-system && npm i && npm run build.
  3. Return with cd ../../.
  4. Ensure you have a .env file similar to .env.example, with the variable VITE_DATAVERSE_BACKEND_URL=http://localhost:8000.
  5. Navigate with cd dev-env.
  6. Start the environment using ./run-env.sh unstable.
  7. To verify the environment, visit http://localhost:8000 and check your local Dataverse installation.

Step 2: Test the feature
In the SPA, edit the root collection, change any field, everything should be updated correctly.
Smoke test creating and updating sub collections could be nice also.

@g-saracca g-saracca added bug Something isn't working Size: 3 A percentage of a sprint. 2.1 hours. GREI Re-arch GREI re-architecture-related Original size: 3 SPA.Q1 Not related to any specific Q1 feature FY25 Sprint 16 FY25 Sprint 16 (2025-01-29 - 2025-02-12) labels Feb 5, 2025
@coveralls
Copy link

coveralls commented Feb 5, 2025

Coverage Status

coverage: 97.499% (+0.02%) from 97.481%
when pulling 3b83fb3 on modify-dto-create-update-collection
into 692283b on develop.

@ChengShi-1 ChengShi-1 self-assigned this Feb 6, 2025
@ChengShi-1 ChengShi-1 self-requested a review February 6, 2025 15:06
@g-saracca
Copy link
Contributor Author

Thanks @ChengShi-1, all changes requested made 👍🏼

@g-saracca g-saracca removed their assignment Feb 6, 2025
ChengShi-1
ChengShi-1 previously approved these changes Feb 6, 2025
Copy link
Contributor

@ChengShi-1 ChengShi-1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! approve

@ofahimIQSS ofahimIQSS self-assigned this Feb 7, 2025
@ofahimIQSS
Copy link
Contributor

ofahimIQSS commented Feb 7, 2025

Hello!

I’m currently testing this PR locally, and as part of my regression testing, I noticed an issue I wanted to bring to your attention.

When editing the Dataverse root collection under General Information, I added an HTML file into the Description field and saved the changes. However, upon reopening the General Information section for editing, I found that the HTML tags were not preserved—the description is displayed as plain text instead.

Could you verify if this is an issue or is this something still pending development?

Screen.Recording.2025-02-07.at.9.45.42.AM.mov

Additionally, if the description is too long, there should be an option to expand/collapse that section on the root homepage. I didn't see it there, same question as above.
image

@g-saracca
Copy link
Contributor Author

Hi @ofahimIQSS this is a known issue and is currently happening on beta.
I think this PR from @ChengShi-1 will fix it.
@ChengShi-1 can you confirm?

@ChengShi-1
Copy link
Contributor

Hi @ofahimIQSS this is a known issue and is currently happening on beta. I think this PR from @ChengShi-1 will fix it. @ChengShi-1 can you confirm?

Hi German, unfortunately it isn't solved. The issue 588 relate to getDataset(), in dataset page, but this error above, happens collection page. We may need create a separate issue for this error.

@ofahimIQSS
Copy link
Contributor

ofahimIQSS commented Feb 7, 2025

Another observation during testing this PR:

I am unable to add Featured Items to the root collections [Edit - or any collection] page in my local environment - to reproduce:

  1. Go to (http://localhost:8000/spa/collections)
  2. Edit > Featured Items
  3. Add 10 items, add images, and add descriptions to all then publish.
    Issue: I get undefined message - and I am unable to save
Screen.Recording.2025-02-07.at.10.58.59.AM.mov

@ofahimIQSS
Copy link
Contributor

Regression Testing also uncovered this:
Uploading file to Dataset fails when entering special characters in File Path. I checked JSF and a warning message appears when we have special characters in that field. See screenshot below and video of SPA (i cut the video short, it never finishes uploading the file):

image

Screen.Recording.2025-02-07.at.11.41.39.AM.mov

@g-saracca
Copy link
Contributor Author

@ofahimIQSS about Collection description and Upload Files filePath bugs please feel free to open issues for that in the frontend repo, but they are not related to this change.
Related to the featured items bug, could you please show me the response error in the network tab from the browser?

@ofahimIQSS
Copy link
Contributor

ofahimIQSS commented Feb 7, 2025

Next observation I'm just jotting down on this PR:
Dataverse/Collection Name should have Max allowed chars, limits on the input text box. If we go over 288 Characters, the system throws an error message. This issue exists in the JSF as well, see below:
image

SPA Error:
image

Here is the Title I'm using (315 characters):
The Legendary Chronicles of Procrastination: A Heroic Tale of Coffee-Fueled Ambitions, Accidental Naps, Overdue Deadlines, and the Eternal Struggle Between ‘Just One More Episode’ and ‘I Should Really Be Productive’—Now Featuring a Cameo by My Lost Sock, Mysterious Fridge Goblin, and That One Unfinished Project from 2017

@ofahimIQSS
Copy link
Contributor

ofahimIQSS commented Feb 7, 2025

@ofahimIQSS about Collection description and Upload Files filePath bugs please feel free to open issues for that in the frontend repo, but they are not related to this change.

I will go ahead and raise the bugs - thanks! [EDIT: Here they are: https://github.com//issues/599 & https://github.com//issues/600]

Related to the featured items bug, could you please show me the response error in the network tab from the browser?

image

@g-saracca
Copy link
Contributor Author

@ofahimIQSS great! I push a fix for the collection name.
I added a max length validation for that field and affiliation field also of 120 characters, please try it.

Please open an issue for the 403 Request Entity too large error on featured items creation, not sure what could be, working ok on my end.

Copy link
Contributor

@ChengShi-1 ChengShi-1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work, small changes

@g-saracca
Copy link
Contributor Author

my bad, please @ChengShi-1, check again

@ofahimIQSS
Copy link
Contributor

@ofahimIQSS great! I push a fix for the collection name. I added a max length validation for that field and affiliation field also of 120 characters, please try it.

Awesome, I'll take it for a spin.

Please open an issue for the 403 Request Entity too large error on featured items creation, not sure what could be, working ok on my end.

Done: IQSS/dataverse#11238

@ChengShi-1 ChengShi-1 self-requested a review February 7, 2025 18:56
ChengShi-1
ChengShi-1 previously approved these changes Feb 7, 2025
Copy link
Contributor

@ChengShi-1 ChengShi-1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! length limit works on my end. Approve

@g-saracca
Copy link
Contributor Author

Increased max length validation for collection name and affiliation fields to 255 characters.

@ofahimIQSS
Copy link
Contributor

Can we get this PR reviewed please - merging is blocked :)

Copy link
Contributor

@ChengShi-1 ChengShi-1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working FY25 Sprint 16 FY25 Sprint 16 (2025-01-29 - 2025-02-12) GREI Re-arch GREI re-architecture-related Original size: 3 Size: 3 A percentage of a sprint. 2.1 hours. SPA.Q1 Not related to any specific Q1 feature
Projects
Status: Ready for QA ⏩
Development

Successfully merging this pull request may close these issues.

Modify DTO sent to CreateCollection and UpdateCollection use cases - SPA frontend
4 participants