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

fix: apply localization, escape special HTML chars in license strings, CSS changes #295

Merged
merged 12 commits into from
Oct 25, 2023

Conversation

SteelWagstaff
Copy link
Member

@SteelWagstaff SteelWagstaff commented Oct 25, 2023

Book cards print the full name of each book's copyright license. Sometimes, these strings contain apostrophes and other special HTML characters which weren't being unescaped. This PR fixes that problem. It also applies minor CSS improvements to address the display of list items in book cards, and updates the translations for French. Addresses #127, #254, #292 and #293

@codecov-commenter
Copy link

codecov-commenter commented Oct 25, 2023

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (7ee1536) 99.60% compared to head (e148e72) 99.22%.

Additional details and impacted files
@@             Coverage Diff              @@
##                dev     #295      +/-   ##
============================================
- Coverage     99.60%   99.22%   -0.39%     
- Complexity       97       98       +1     
============================================
  Files            15       15              
  Lines           511      514       +3     
============================================
+ Hits            509      510       +1     
- Misses            2        4       +2     
Files Coverage Δ
src/PressbooksNetworkCatalog.php 92.30% <33.33%> (-7.70%) ⬇️

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

@SteelWagstaff SteelWagstaff requested a review from arzola October 25, 2023 18:12
@@ -28,10 +28,19 @@
color: var(--primary-dark);
}

.book-cards .book-card .book-info p {
.book-cards .book-card .book-info * {
Copy link
Member Author

Choose a reason for hiding this comment

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

Apply desired font size to all elements in the book card book info block

@apply text-base m-0;
}

.book-cards .book-card .book-info ol {
@apply list-decimal list-inside;
Copy link
Member Author

Choose a reason for hiding this comment

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

Apply desired list styling to ordered and unordered lists.

@@ -57,7 +66,7 @@
@apply mb-2;
}

.book-cards .book-card .book-info .book-description.line-clamp *:not(a):not(em):not(del):not(span):not(strong):not(u) {
.book-cards .book-card .book-info .book-description.line-clamp *:not(a):not(em):not(del):not(span):not(strong):not(u):not(li) {
Copy link
Member Author

Choose a reason for hiding this comment

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

Show the list styling for clamped items

@SteelWagstaff SteelWagstaff changed the title fix: escape special HTML chars in license strings fix: apply localization, escape special HTML chars in license strings, CSS changes Oct 25, 2023
Copy link
Contributor

@arzola arzola left a comment

Choose a reason for hiding this comment

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

LGTM, tested and working as expected

@arzola arzola merged commit b714217 into dev Oct 25, 2023
6 checks passed
@arzola arzola deleted the fix/unescaped-chars branch October 25, 2023 22:48
@SteelWagstaff SteelWagstaff requested a review from arzola October 25, 2023 22:56
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.

3 participants