Ability to manually save state
- Dominant language
- Rust
- Stars
- 30.6k
- Forks
- 2.1k
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 72
Description
**Is your feature request related to a problem? Please describe.**
If I know a particular action changes something significant enough to warrant saving the state to disk, I want to be able to request a save (similar to how you can use `ctx.request_repaint()` and related functions if you know a repaint will be needed).
**Describe the solution you'd like**
The idea that comes to mind is adding a `ctx.request_save()` or similar, which triggers the same behavior as if the autosave duration was reached.
**Describe alternatives you've considered**
I tried storing the creation context passed to the `eframe::App`, but that caused ownership problems.
I tried storing a reference to the `eframe::Storage` instead, and also ran into ownership problems.
~~I can't even figure out a messy way to do it with existing functionality.~~ (**EDIT:** I found a way to implement it. See https://github.com/emilk/egui/issues/5243#issuecomment-2406186520.)
Contributor guide
Research direction
Start by tracing the eframe::App creation context and eframe::Storage usage, using the existing ctx.request_repaint() behavior as the API pattern. Determine how the autosave-duration path is triggered and define how a manual request reaches it without ownership problems. Done means an application can request a save explicitly and it follows the same behavior as an autosave.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100