nextcloud / nextcloud/cookbook
Prevent browser from falling asleep if app shows recipe
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 641
- Forks
- 113
- Avg merge
- 21h 31m
- Merged PRs (30d)
- 26
Description
Description
There is a wake lock in place currently for displaying a recipe.
This fails short in case one of these events happen:
- The user turns off the display via power button
- The user switches to another tab
- The user switches to another application
In either case, the wake lock is released by the OS (at least under Android) and must be re-aquired.
Reproduction
Steps to reproduce the behavior:
- Reduce the display turnoff time to the shortest possible time and make sure the display actually turns off
- Open a recipe in view mode (at least currently)
- Wait and see that the wake lock actually works
- Turn off the display and turn it on again. You see the app again
- After the turn-off delay the display turns off.
Expected behavior
The turn-off does not depend if the user clicked somewhere unexpected and by accident disabled the wake lock.
Browser
Firefox for Android
Versions
Cookbook version: 0.11.9
Additional point
Ideally the wake log should be extracted into its own composable to be reused by Vue components and stuff whereever needed.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the current wake-lock implementation used when displaying a recipe, then inspect how it responds to display, tab, and application visibility changes. Done means the wake lock is reacquired after those events and the logic can be reused by Vue components through its own composable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100