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

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

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

Conversation

ChengShi-1
Copy link
Contributor

@ChengShi-1 ChengShi-1 commented Nov 4, 2024

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 tag allows you to provide a machine-readable format of the date and time, which can be useful for search engine optimization (SEO), calendar integration, and other purposes. Also, in order to keep constant with JSF, we need change some date format to YYYY-MM-DD as well.

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:

@ChengShi-1 ChengShi-1 linked an issue Nov 4, 2024 that may be closed by this pull request
@ChengShi-1 ChengShi-1 force-pushed the 533-use-time-tag-with-datetime-and-remove-hardcoded-format branch from 1faf6f9 to 149d1cf Compare November 4, 2024 17:17
@coveralls
Copy link

coveralls commented Nov 4, 2024

Coverage Status

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

@ChengShi-1 ChengShi-1 added FY25 Sprint 9 FY25 Sprint 9 (2024-10-23 - 2024-11-06) GREI Re-arch GREI re-architecture-related Original size: 3 Size: 3 A percentage of a sprint. 2.1 hours. SPA.Q4.10 Resolve TODOs and tech debt SPA labels Nov 4, 2024
@ChengShi-1 ChengShi-1 changed the title Add time tag to the date and change some date format to YYYY/MM/DD Add time tag to the date and change some date format to YYYY-MM-DD Nov 4, 2024
@ChengShi-1 ChengShi-1 marked this pull request as ready for review November 4, 2024 18:21
@cmbz cmbz added the FY25 Sprint 10 FY25 Sprint 10 (2024-11-06 - 2024-11-20) label Nov 7, 2024
Copy link
Contributor

@g-saracca g-saracca left a comment

Choose a reason for hiding this comment

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

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

@ChengShi-1
Copy link
Contributor Author

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.

Copy link
Contributor

@g-saracca g-saracca left a comment

Choose a reason for hiding this comment

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

Some more tweaks for the datetime attribute value

@ofahimIQSS ofahimIQSS self-assigned this Nov 12, 2024
@ofahimIQSS
Copy link
Contributor

@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

@ChengShi-1
Copy link
Contributor Author

@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
Copy link
Contributor

ofahimIQSS commented Nov 13, 2024

@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

@ChengShi-1
Copy link
Contributor Author

@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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FY25 Sprint 9 FY25 Sprint 9 (2024-10-23 - 2024-11-06) FY25 Sprint 10 FY25 Sprint 10 (2024-11-06 - 2024-11-20) GREI Re-arch GREI re-architecture-related Original size: 3 Size: 3 A percentage of a sprint. 2.1 hours. SPA.Q4.10 Resolve TODOs and tech debt SPA
Projects
Status: QA ✅
Development

Successfully merging this pull request may close these issues.

Use time tag with dateTime and remove hardcoded format
5 participants