Skip to content

Commit

Permalink
🐛 Fixed feedback buttons' layout breaking in different languages, in …
Browse files Browse the repository at this point in the history
…newsletters (#21752)

fixes
https://linear.app/ghost/issue/DES-974/feedback-and-comment-icons-when-translated-cause-overlapping-in-email

- Since we added i18n, the feedback/comment button layout would break in
languages where the text is longer.
- We've revised the button layout to be centred. On smaller (mobile)
resolutions, we hide the labels and rely solely on the icons.

**Before**
<img width="679" alt="french-before"
src="https://github.com/user-attachments/assets/e3de40a2-7a0a-4317-8ab8-03e285eb9f8a">
<br /><br />


**After**
<img width="720" alt="newsletter-buttons-desktop-french"
src="https://github.com/user-attachments/assets/f7fce52d-bb3b-4afd-b8fd-538a2ec9a31e"><br
/><br />
<img width="462" alt="newsletter-buttons-mobile"
src="https://github.com/user-attachments/assets/9e21c706-8d92-4fc2-804c-ad2aab6b6350">
  • Loading branch information
dvdwinden authored Dec 2, 2024
1 parent 76c1cd9 commit df53eb0
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 126 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -322,10 +322,7 @@ table.body .footer a {
}
table.body .feedback-button-text {
display: block !important;
padding-top: 4px !important;
padding-left: 0px !important;
font-size: 13px !important;
display: none!important;
}
table.body .latest-posts-header {
Expand Down Expand Up @@ -782,7 +779,7 @@ exports[`Email Preview API Read can read post email preview with email card and
Object {
"access-control-allow-origin": "http://127.0.0.1:2369",
"cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0",
"content-length": "24870",
"content-length": "24766",
"content-type": "application/json; charset=utf-8",
"content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/,
"etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/,
Expand Down Expand Up @@ -1018,10 +1015,7 @@ table.body .footer a {
}
table.body .feedback-button-text {
display: block !important;
padding-top: 4px !important;
padding-left: 0px !important;
font-size: 13px !important;
display: none!important;
}
table.body .latest-posts-header {
Expand Down Expand Up @@ -1500,7 +1494,7 @@ exports[`Email Preview API Read can read post email preview with fields 4: [head
Object {
"access-control-allow-origin": "http://127.0.0.1:2369",
"cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0",
"content-length": "29650",
"content-length": "29546",
"content-type": "application/json; charset=utf-8",
"content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/,
"etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/,
Expand Down Expand Up @@ -1767,10 +1761,7 @@ table.body .footer a {
}
table.body .feedback-button-text {
display: block !important;
padding-top: 4px !important;
padding-left: 0px !important;
font-size: 13px !important;
display: none!important;
}
table.body .latest-posts-header {
Expand Down Expand Up @@ -2234,7 +2225,7 @@ exports[`Email Preview API Read has custom content transformations for email com
Object {
"access-control-allow-origin": "http://127.0.0.1:2369",
"cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0",
"content-length": "24624",
"content-length": "24520",
"content-type": "application/json; charset=utf-8",
"content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/,
"etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/,
Expand Down Expand Up @@ -2830,10 +2821,7 @@ table.body .footer a {
}
table.body .feedback-button-text {
display: block !important;
padding-top: 4px !important;
padding-left: 0px !important;
font-size: 13px !important;
display: none!important;
}
table.body .latest-posts-header {
Expand Down Expand Up @@ -3311,7 +3299,7 @@ exports[`Email Preview API Read uses the newsletter provided through ?newsletter
Object {
"access-control-allow-origin": "http://127.0.0.1:2369",
"cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0",
"content-length": "25407",
"content-length": "25303",
"content-type": "application/json; charset=utf-8",
"content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/,
"etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/,
Expand Down Expand Up @@ -3933,10 +3921,7 @@ table.body .footer a {
}
table.body .feedback-button-text {
display: block !important;
padding-top: 4px !important;
padding-left: 0px !important;
font-size: 13px !important;
display: none!important;
}
table.body .latest-posts-header {
Expand Down Expand Up @@ -4414,7 +4399,7 @@ exports[`Email Preview API Read uses the posts newsletter by default 4: [headers
Object {
"access-control-allow-origin": "http://127.0.0.1:2369",
"cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0",
"content-length": "25407",
"content-length": "25303",
"content-type": "application/json; charset=utf-8",
"content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/,
"etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/,
Expand Down
Loading

0 comments on commit df53eb0

Please sign in to comment.