IQSS / dataverse-frontend

An upcoming and modernized UI for Dataverse
Apache License 2.0
20 stars 16 forks source link

Add time tag to the date and change some date format to YYYY-MM-DD #541

Closed ChengShi-1 closed 4 days ago

ChengShi-1 commented 2 weeks ago

What this PR does / why we need it:

For solving some existing todos, add time tag to the date so as to provides semantic meaning to the content. The date attribute within the

Which issue(s) this PR closes:

Special notes for your reviewer:

Suggestions on how to test this:

Step 1: Run the Development Environment

  1. Execute npm i.
  2. Navigate with cd packages/design-system && 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: check if the date run well and in a right format YYYY-MM-DD

  1. log in to the dataverseAdmin account, so you could publish a dataset
  2. create a new dataset by http://localhost:8000/spa/datasets/root/create
  3. click into the new dataset just created
  4. upload a random file
  5. under "File Metadata", click the file title, "Deposit Date" should be shown in YYYY-MM-DD format.
  6. publish the dataset 7.under "File Metadata", click the file title, the filed "Deposit Date","Metadata Release Date", and "Publication Date" should be shown in YYYY-MM-DD format.

Does this PR introduce a user interface change? If mockups are available, please link/include them here:

Is there a release notes update needed for this change?:

Additional documentation:

coveralls commented 2 weeks ago

Coverage Status

coverage: 97.554% (+0.2%) from 97.388% when pulling b5c62f3e5b30dd6a7ebcd2528e9f164836988fb1 on 533-use-time-tag-with-datetime-and-remove-hardcoded-format into 110d6963fe8d97c187665a1f182a4ba96589f478 on develop.

ChengShi-1 commented 2 weeks ago

Hi @ChengShi-1 , leave some comments on test files and we are missing datetime attribute on all the <time /> tags. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/time

Hi German! Thank you a lot for reviewing it! I submit a couple of fix here. The earliest fix included most of the adjustments, but the dateHelper in utcTime couldn't pass the e2e so I had next two fix commits for recovering the code. Sorry for messed commits, hope you are not confused.

ofahimIQSS commented 1 week ago

@ChengShi-1 It looks like file uploading is broken with this PR 😫.

  1. Go to http://localhost:8000/
  2. Login
  3. Add dataset and add a file to upload (i tried several file types all of them failed) Result: Once you upload the file, the file disappears and is not displayed on the UI. See video below

I was thinking it might be a local issue but wanted to check with you guys first.

https://github.com/user-attachments/assets/685f32e4-05a2-41d9-8147-a0ce6bd86599

ChengShi-1 commented 1 week ago

@ChengShi-1 It looks like file uploading is broken with this PR 😫.

  1. Go to http://localhost:8000/
  2. Login
  3. Add dataset and add a file to upload (i tried several file types all of them failed) Result: Once you upload the file, the file disappears and is not displayed on the UI. See video below

I was thinking it might be a local issue but wanted to check with you guys first.

Screen.Recording.2024-11-12.at.3.15.20.PM.mov

Hi, Omer! Sorry, it should be for http://localhost:8000/spa instead of JSF(http://localhost:8000). Can you try http://localhost:8000/spa/datasets/root/create to create, and then click into the dataset you just create, and "Upload Files" button here. image

ofahimIQSS commented 1 week ago

@ChengShi-1 The file upload is still failing, see recording below:

  1. Login, Created new dataset in SPA
  2. Saved
  3. Add an image file to dataset Issue: When trying to upload the image, file appears red and is not uploaded to system

https://github.com/user-attachments/assets/d464f8d0-4810-4ef8-9a7a-a1de0b28156a

ChengShi-1 commented 1 week ago

@ChengShi-1 The file upload is still failing, see recording below:

  1. Login, Created new dataset in SPA
  2. Saved
  3. Add an image file to dataset Issue: When trying to upload the image, file appears red and is not uploaded to system

    Screen.Recording.2024-11-13.at.1.53.35.PM.mov

@ofahimIQSS Hi Omer, I don't meet the same uploading error on my end. Since I don't think this PR changes the code about uploading, could you try upload files in other branch to see if the uploading failure happens globally, and rebuild docker to try upload again as well? Ty!

ofahimIQSS commented 4 days ago

No issues found with PR. Merging. Testing of 541.docx