feat(ui): change popup logic#442
Conversation
There was a problem hiding this comment.
Pull request overview
This PR removes boot screens and the "Entering Sleep..." message to improve wake-up speed, and refactors indexing popup implementations from TxtReaderActivity and EpubReaderActivity into a unified ScreenComponents approach.
Changes:
- Removed BootActivity class and its display during startup
- Removed "Entering Sleep..." popup from SleepActivity
- Created unified popup rendering methods in ScreenComponents (drawPopup and fillPopupProgress)
- Removed unused displayWindow method from GfxRenderer
- Simplified Section.cpp by removing progressSetupFn parameter (no longer needed to conditionally show progress UI)
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/main.cpp | Removed BootActivity instantiation and calls during startup |
| src/activities/boot_sleep/BootActivity.h | Deleted file - boot screen no longer needed |
| src/activities/boot_sleep/BootActivity.cpp | Deleted file - boot screen implementation removed |
| src/activities/boot_sleep/SleepActivity.h | Removed renderPopup method declaration |
| src/activities/boot_sleep/SleepActivity.cpp | Removed "Entering Sleep..." popup rendering |
| src/activities/reader/TxtReaderActivity.cpp | Refactored to use ScreenComponents::drawPopup and fillPopupProgress |
| src/activities/reader/EpubReaderActivity.cpp | Refactored to use ScreenComponents::drawPopup and fillPopupProgress |
| src/ScreenComponents.h | Added PopupLayout struct and popup rendering methods |
| src/ScreenComponents.cpp | Implemented unified popup rendering with progress bar support |
| lib/GfxRenderer/GfxRenderer.h | Removed experimental displayWindow method |
| lib/Epub/Epub/Section.h | Removed progressSetupFn parameter from createSectionFile |
| lib/Epub/Epub/Section.cpp | Removed conditional progress UI setup logic |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
daveallie
left a comment
There was a problem hiding this comment.
Overall, generally happy. I do think there are cases where the sleep popover should still be shown.
Also, one other valuable part of the boot screen was showing the version code which helped for debugging boot stalling issues (or even understanding that it was crashing between boot and entering the reader/home screen). Do you have any thoughts as to still get similar signals without the boot screen?
agreed, I'll make this PR only about popups then. Need to think how to handle Boot / Sleep screen a bit more |
… and remove unused include
…e creation and indexing
- Update current branch from theme-engine-wiggum to custom-v16 - Document v16.0 base with merged PRs crosspoint-reader#442, crosspoint-reader#506, crosspoint-reader#433 - Add git workflow for syncing with upstream - Add code style patterns (house style, null-checks, settings) - Document pre-commit hook behavior - Remove outdated theme-specific content - Update repository structure (private fork, remotes, branches) - Clean up integrated PRs table
## Summary
* refactors Indexing popups into ScreenComponents (they had different
implementations in different files)
* removes Indexing popup for small chapters
* only show Indexing popup (without progress bar) for large chapters
(using same minimum file size condition as for progress bar before)
## Additional Context
* Having to show even single popup message and redraw the screen slows
down the flow significantly
* Testing results:
* Opening large chapter with progress bar - 11 seconds
* Same chapter without progress bar, only single Indexing popup - 5
seconds
---
### AI Usage
Did you use AI tools to help write this code? _**< PARTIALLY>**_
* master: feat: Debugging monitor script (crosspoint-reader#555) fix: truncating chapter titles using UTF-8 safe function (crosspoint-reader#599) fix: don't wake up after USB connect (crosspoint-reader#644) Revert "fix: don't wake up after USB connect" (crosspoint-reader#643) fix: custom sleep not showing image at index 0 (crosspoint-reader#639) docs: Update USER_GUIDE.md (crosspoint-reader#625) fix: Hide button hints in landscape CW mode (crosspoint-reader#637) fix: WiFi error screen text clarifications (crosspoint-reader#612) fix: don't wake up after USB connect (crosspoint-reader#576) feat(ui): change popup logic (crosspoint-reader#442) feat: Add reading menu and delete cache function (crosspoint-reader#433)
## Summary
* refactors Indexing popups into ScreenComponents (they had different
implementations in different files)
* removes Indexing popup for small chapters
* only show Indexing popup (without progress bar) for large chapters
(using same minimum file size condition as for progress bar before)
## Additional Context
* Having to show even single popup message and redraw the screen slows
down the flow significantly
* Testing results:
* Opening large chapter with progress bar - 11 seconds
* Same chapter without progress bar, only single Indexing popup - 5
seconds
---
### AI Usage
Did you use AI tools to help write this code? _**< PARTIALLY>**_
## Summary
* refactors Indexing popups into ScreenComponents (they had different
implementations in different files)
* removes Indexing popup for small chapters
* only show Indexing popup (without progress bar) for large chapters
(using same minimum file size condition as for progress bar before)
## Additional Context
* Having to show even single popup message and redraw the screen slows
down the flow significantly
* Testing results:
* Opening large chapter with progress bar - 11 seconds
* Same chapter without progress bar, only single Indexing popup - 5
seconds
---
### AI Usage
Did you use AI tools to help write this code? _**< PARTIALLY>**_
## Summary
* refactors Indexing popups into ScreenComponents (they had different
implementations in different files)
* removes Indexing popup for small chapters
* only show Indexing popup (without progress bar) for large chapters
(using same minimum file size condition as for progress bar before)
## Additional Context
* Having to show even single popup message and redraw the screen slows
down the flow significantly
* Testing results:
* Opening large chapter with progress bar - 11 seconds
* Same chapter without progress bar, only single Indexing popup - 5
seconds
---
### AI Usage
Did you use AI tools to help write this code? _**< PARTIALLY>**_
Summary
Additional Context
AI Usage
Did you use AI tools to help write this code? < PARTIALLY>