Skip to content

Allow list elements to be translatable and left align data policy text - #1986

Open
louise-davies wants to merge 1 commit into
developfrom
improve-data-policy-display
Open

Allow list elements to be translatable and left align data policy text#1986
louise-davies wants to merge 1 commit into
developfrom
improve-data-policy-display

Conversation

@louise-davies

@louise-davies louise-davies commented Aug 6, 2026

Copy link
Copy Markdown
Member

Description

See title. The data policy text I got from Silvia had a bullet-point list, so configuring i18next so we can render html lists properly, and then the data policy looked weird when it was middle aligned, so left aligned the data policies.

To test this, replace the data_policy string in public/res/default.json in datagateway-download to something like:

"data_policy": "Accept data policy: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.<ul><li>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</li><li>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum lore eu fugiat nulla pariatur.</li><li>Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</li></ul>This is a <Link href=\"https://example.com/\">link to example.com</Link>."

and then go to the cart and pretend to mint a user-defined DOI and check that the data policy is rendering the list correctly and that it is left aligned.

There's also the data policy in the publish button, but the code is identical so probably don't need to double check both

Testing instructions

Add a set up instructions describing how the reviewer should test the code

  • Review code
  • Check Actions build
  • Review changes to test coverage

@louise-davies
louise-davies requested a review from xkyue August 6, 2026 09:28
@codecov

codecov Bot commented Aug 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.73%. Comparing base (251be13) to head (3d66b62).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #1986   +/-   ##
========================================
  Coverage    96.72%   96.73%           
========================================
  Files          221      221           
  Lines        31463    31475   +12     
  Branches      4751     4751           
========================================
+ Hits         30434    30446   +12     
+ Misses        1025     1024    -1     
- Partials         4        5    +1     
Flag Coverage Δ
common 95.48% <100.00%> (ø)
dataview 98.50% <100.00%> (+<0.01%) ⬆️
download 96.87% <100.00%> (+<0.01%) ⬆️
search 95.64% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant