feat: Tweak Lyra popup UI#768
Conversation
This commit implements some tweaks to the popup UI of the Lyra theme, based on the Figma design. The Figma design was not implemented exactly, as I felt it resulted in popups being too easy to miss. After exploring some options, I feels this strikes a good balance between being functional and looking polished and fitting with the rest of the theme.
In most instances, the trailing ellipsis ("...") have been removed, as they resulted in the popup feeling off balance.
Additionally, the string for used to indicate the activation of sleep mode has been rewritten to something a little more 'conversational' and less technical.
|
I realised I missed creating a |
The BaseTheme implementation is invisible with the updated LyraTheme::drawPopup.
|
I've pushed a commit that implements Of course if the popup will change, this might need to change too. But having this PR merge ready before the end of the weekend worked best for me. |
|
Really lovely improvement! If I may, here some visual improvements i would do:
Despite from that it's a much better improvement from current version! Congrats |
Do you mean moving the entire popup to one of the corners?
Yep, I like the black one best too! It already has a white outline actually.
Yeah I think I'll leave this as a followup PR, due to how this works in code now. Basically first a 'regular' popup is rendered, and then separately the progress bar is drawn inside it. They are two separate things drawn on top of each other. So we can't say: use a bigger margin in case there is a progress bar. Not without changing the API of these method at least. |
Yes, positioning based on the Reading Orientation set by the user |
Ah I see. Yeah maybe in landscape mode this could be an option. To position it in the top-right maybe, a but like notifications on MacOS? In portrait I think it might look strange, because of how narrow the screen is. What do you think @daveallie? (Also of this PR in general) |
|
The popup is currently positioned middle center regardless of reading orientation, and it's usually in response to a user operation, so there's no need to move it out of the way (top corner for example), I think the placement is fine. Regarding the style, I don't really mind either way tbh. @CaptainFrito has been running a lot of the theming so I'd like to lean on his opinion here. |
|
Looks great to me, thanks @bramschulting! |
|
Apologies, with the merge of #728, updating strings has changed a bit, if you could update the translation files as part of resolving the conflicts that would be amazing. |
After the i18n support was merged, these changes needed to be applied again in the new system. An extra key is added for the loading popup, where the trailing ellipsis is omitted. This is done because the existing loading key is also used in other screens, where the ellipsis should remain.
1caf40b
📝 WalkthroughWalkthroughThe changes add a new Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
|
@daveallie No worries! The conflicts have been resolved, and I've reapplied the changes in the i18n system. While I did change the English "Entering Sleep..." to "Going to sleep", I did not update the actual translations of other languages. I did remove the ellipsis, but the 'main' translations are unchanged. I don't speak any of these languages, and using Google Translate or something similar seems like the wrong choice in my opinion. But if preferred, I can still do that of course. |
There was a problem hiding this comment.
🤖 Fix all issues with AI agents
Verify each finding against the current code and only fix it if needed.
In `@lib/I18n/translations/russian.yaml`:
- Line 8: Update the Russian translation for STR_ENTERING_SLEEP to match the new
conversational English tone ("Going to sleep") by replacing the formal/nominal
"Переход в сон" with a verb-phrase alternative such as "Засыпаю" or "Ухожу
спать" so the copy tone is consistent across languages; locate
STR_ENTERING_SLEEP in the translations file and substitute the value
accordingly.
🧹 Nitpick comments (1)
🤖 Fix all nitpicks with AI agents
Verify each finding against the current code and only fix it if needed. In `@lib/I18n/translations/russian.yaml`: - Line 8: Update the Russian translation for STR_ENTERING_SLEEP to match the new conversational English tone ("Going to sleep") by replacing the formal/nominal "Переход в сон" with a verb-phrase alternative such as "Засыпаю" or "Ухожу спать" so the copy tone is consistent across languages; locate STR_ENTERING_SLEEP in the translations file and substitute the value accordingly.lib/I18n/translations/russian.yaml (1)
8-8: Consider aligning Russian tone with the new conversational copy.
English changed to “Going to sleep,” while “Переход в сон” remains more formal/nominal. If you want tone parity, consider a verb phrase like “Засыпаю” or “Ухожу спать.”🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@lib/I18n/translations/russian.yaml` at line 8, Update the Russian translation for STR_ENTERING_SLEEP to match the new conversational English tone ("Going to sleep") by replacing the formal/nominal "Переход в сон" with a verb-phrase alternative such as "Засыпаю" or "Ухожу спать" so the copy tone is consistent across languages; locate STR_ENTERING_SLEEP in the translations file and substitute the value accordingly.
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
lib/I18n/translations/russian.yaml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: build
- GitHub Check: cppcheck
🔇 Additional comments (2)
lib/I18n/translations/russian.yaml (2)
22-22: LGTM — ellipsis removal is consistent.
28-28: LGTM — new popup key has a clear translation.
## Summary I want to preface this PR by stating that the proposed changes are subjective to people's opinions. The following is just my suggestion, but I'm of course open to changes. The popups in the currently implemented version of the Lyra theme feel a bit out of place. This PR suggests an updated version which looks a bit more polished and in line with the rest of the theme. I've also taken the liberty to remove the ellipsis behind the text of the popups, as they made the popup feel a bit off balance (example below). With the applied changes, popups will look like this.  The vertical position is (more or less) aligned to be in line with the sleep button. I'm aware the popup is used for other purposes aside from the sleep message, but this still felt like a good place. It's also a place where your eyes naturally 'rest'. The popup has a small 2px white outline, neatly separating it from whatever is behind it. ### Alternatives considered and rationale behind proposal Initially I started out worked off the Figma design for the Lyra theme, which [moves the popups](https://www.figma.com/design/UhxoV4DgUnfrDQgMPPTXog/Lyra-Theme?node-id=2011-19296&t=Ppj6B2MrFRfUo9YX-1) to the bottom of the screen. To me, this results in popups that are much too easy to miss:  After this, I tried moving the popup back up (to the position of the sleep button), but to me it still kinda disappeared into the text of the book:  Inverting the colors of the popup made things stand out the perfect amount in my opinion. The white outline separates the popup from what is behind it.  This looked much better to me. The only thing that felt a bit off to me, was the balance due to the ellipsis at the end of the popup text. Also, "Entering Sleep..." felt a bit.. engineer-y. I felt something a bit more 'conversational' makes at all feel a bit more human-centric. But I'm no copywriter, and English is not even my native language. So feel free to chip in! After tweaking that, I ended up with the final result: _(Same picture as the first one shown in this PR)_  ## Additional Context * Figma design: https://www.figma.com/design/UhxoV4DgUnfrDQgMPPTXog/Lyra-Theme?node-id=2011-19296&t=Ppj6B2MrFRfUo9YX-1 --- ### AI Usage While CrossPoint doesn't have restrictions on AI tools in contributing, please be transparent about their usage as it helps set the right context for reviewers. Did you use AI tools to help write this code? _**NO**_
## Summary I want to preface this PR by stating that the proposed changes are subjective to people's opinions. The following is just my suggestion, but I'm of course open to changes. The popups in the currently implemented version of the Lyra theme feel a bit out of place. This PR suggests an updated version which looks a bit more polished and in line with the rest of the theme. I've also taken the liberty to remove the ellipsis behind the text of the popups, as they made the popup feel a bit off balance (example below). With the applied changes, popups will look like this.  The vertical position is (more or less) aligned to be in line with the sleep button. I'm aware the popup is used for other purposes aside from the sleep message, but this still felt like a good place. It's also a place where your eyes naturally 'rest'. The popup has a small 2px white outline, neatly separating it from whatever is behind it. ### Alternatives considered and rationale behind proposal Initially I started out worked off the Figma design for the Lyra theme, which [moves the popups](https://www.figma.com/design/UhxoV4DgUnfrDQgMPPTXog/Lyra-Theme?node-id=2011-19296&t=Ppj6B2MrFRfUo9YX-1) to the bottom of the screen. To me, this results in popups that are much too easy to miss:  After this, I tried moving the popup back up (to the position of the sleep button), but to me it still kinda disappeared into the text of the book:  Inverting the colors of the popup made things stand out the perfect amount in my opinion. The white outline separates the popup from what is behind it.  This looked much better to me. The only thing that felt a bit off to me, was the balance due to the ellipsis at the end of the popup text. Also, "Entering Sleep..." felt a bit.. engineer-y. I felt something a bit more 'conversational' makes at all feel a bit more human-centric. But I'm no copywriter, and English is not even my native language. So feel free to chip in! After tweaking that, I ended up with the final result: _(Same picture as the first one shown in this PR)_  ## Additional Context * Figma design: https://www.figma.com/design/UhxoV4DgUnfrDQgMPPTXog/Lyra-Theme?node-id=2011-19296&t=Ppj6B2MrFRfUo9YX-1 --- ### AI Usage While CrossPoint doesn't have restrictions on AI tools in contributing, please be transparent about their usage as it helps set the right context for reviewers. Did you use AI tools to help write this code? _**NO**_
## Summary I want to preface this PR by stating that the proposed changes are subjective to people's opinions. The following is just my suggestion, but I'm of course open to changes. The popups in the currently implemented version of the Lyra theme feel a bit out of place. This PR suggests an updated version which looks a bit more polished and in line with the rest of the theme. I've also taken the liberty to remove the ellipsis behind the text of the popups, as they made the popup feel a bit off balance (example below). With the applied changes, popups will look like this.  The vertical position is (more or less) aligned to be in line with the sleep button. I'm aware the popup is used for other purposes aside from the sleep message, but this still felt like a good place. It's also a place where your eyes naturally 'rest'. The popup has a small 2px white outline, neatly separating it from whatever is behind it. ### Alternatives considered and rationale behind proposal Initially I started out worked off the Figma design for the Lyra theme, which [moves the popups](https://www.figma.com/design/UhxoV4DgUnfrDQgMPPTXog/Lyra-Theme?node-id=2011-19296&t=Ppj6B2MrFRfUo9YX-1) to the bottom of the screen. To me, this results in popups that are much too easy to miss:  After this, I tried moving the popup back up (to the position of the sleep button), but to me it still kinda disappeared into the text of the book:  Inverting the colors of the popup made things stand out the perfect amount in my opinion. The white outline separates the popup from what is behind it.  This looked much better to me. The only thing that felt a bit off to me, was the balance due to the ellipsis at the end of the popup text. Also, "Entering Sleep..." felt a bit.. engineer-y. I felt something a bit more 'conversational' makes at all feel a bit more human-centric. But I'm no copywriter, and English is not even my native language. So feel free to chip in! After tweaking that, I ended up with the final result: _(Same picture as the first one shown in this PR)_  ## Additional Context * Figma design: https://www.figma.com/design/UhxoV4DgUnfrDQgMPPTXog/Lyra-Theme?node-id=2011-19296&t=Ppj6B2MrFRfUo9YX-1 --- ### AI Usage While CrossPoint doesn't have restrictions on AI tools in contributing, please be transparent about their usage as it helps set the right context for reviewers. Did you use AI tools to help write this code? _**NO**_
## Summary I want to preface this PR by stating that the proposed changes are subjective to people's opinions. The following is just my suggestion, but I'm of course open to changes. The popups in the currently implemented version of the Lyra theme feel a bit out of place. This PR suggests an updated version which looks a bit more polished and in line with the rest of the theme. I've also taken the liberty to remove the ellipsis behind the text of the popups, as they made the popup feel a bit off balance (example below). With the applied changes, popups will look like this.  The vertical position is (more or less) aligned to be in line with the sleep button. I'm aware the popup is used for other purposes aside from the sleep message, but this still felt like a good place. It's also a place where your eyes naturally 'rest'. The popup has a small 2px white outline, neatly separating it from whatever is behind it. ### Alternatives considered and rationale behind proposal Initially I started out worked off the Figma design for the Lyra theme, which [moves the popups](https://www.figma.com/design/UhxoV4DgUnfrDQgMPPTXog/Lyra-Theme?node-id=2011-19296&t=Ppj6B2MrFRfUo9YX-1) to the bottom of the screen. To me, this results in popups that are much too easy to miss:  After this, I tried moving the popup back up (to the position of the sleep button), but to me it still kinda disappeared into the text of the book:  Inverting the colors of the popup made things stand out the perfect amount in my opinion. The white outline separates the popup from what is behind it.  This looked much better to me. The only thing that felt a bit off to me, was the balance due to the ellipsis at the end of the popup text. Also, "Entering Sleep..." felt a bit.. engineer-y. I felt something a bit more 'conversational' makes at all feel a bit more human-centric. But I'm no copywriter, and English is not even my native language. So feel free to chip in! After tweaking that, I ended up with the final result: _(Same picture as the first one shown in this PR)_  ## Additional Context * Figma design: https://www.figma.com/design/UhxoV4DgUnfrDQgMPPTXog/Lyra-Theme?node-id=2011-19296&t=Ppj6B2MrFRfUo9YX-1 --- ### AI Usage While CrossPoint doesn't have restrictions on AI tools in contributing, please be transparent about their usage as it helps set the right context for reviewers. Did you use AI tools to help write this code? _**NO**_

Summary
I want to preface this PR by stating that the proposed changes are subjective to people's opinions. The following is just my suggestion, but I'm of course open to changes.
The popups in the currently implemented version of the Lyra theme feel a bit out of place. This PR suggests an updated version which looks a bit more polished and in line with the rest of the theme.
I've also taken the liberty to remove the ellipsis behind the text of the popups, as they made the popup feel a bit off balance (example below).
With the applied changes, popups will look like this.
The vertical position is (more or less) aligned to be in line with the sleep button. I'm aware the popup is used for other purposes aside from the sleep message, but this still felt like a good place. It's also a place where your eyes naturally 'rest'.
The popup has a small 2px white outline, neatly separating it from whatever is behind it.
Alternatives considered and rationale behind proposal
Initially I started out worked off the Figma design for the Lyra theme, which moves the popups to the bottom of the screen. To me, this results in popups that are much too easy to miss:
After this, I tried moving the popup back up (to the position of the sleep button), but to me it still kinda disappeared into the text of the book:
Inverting the colors of the popup made things stand out the perfect amount in my opinion. The white outline separates the popup from what is behind it.
This looked much better to me. The only thing that felt a bit off to me, was the balance due to the ellipsis at the end of the popup text. Also, "Entering Sleep..." felt a bit.. engineer-y. I felt something a bit more 'conversational' makes at all feel a bit more human-centric. But I'm no copywriter, and English is not even my native language. So feel free to chip in!
After tweaking that, I ended up with the final result:
(Same picture as the first one shown in this PR)
Additional Context
AI Usage
While CrossPoint doesn't have restrictions on AI tools in contributing, please be transparent about their usage as it
helps set the right context for reviewers.
Did you use AI tools to help write this code? NO