Repository navigation
Conversation
Coverage Report for CI Build 47170076133Coverage increased (+0.09%) to 60.776%Details
Uncovered ChangesNo uncovered changes found. Coverage Regressions630 previously-covered lines in 9 files lost coverage.
Coverage Stats
💛 - Coveralls |
📦 Build Artifacts Ready
|
Withalion
left a comment
There was a problem hiding this comment.
Great job, it looks very promising! There are some trivial things, a bit more refactoring is needed, but mainly unit tests.
UI/UX
- It would be nice to navigate to the geometry you will be recording further after you open the draft
- After user is done recording geometry and doesn't fill out anything in the form yet, application crashes. We should open the form right away and not the geometry recording
- When a draft is available and an existing feature is clicked to edit the warning drawer opens and closes right away
- When a draft is available and "add" button is clicked, the drawer opens correctly, but discarding draft doesn't start recording mode, but stays in "view" mode of map
Withalion
left a comment
There was a problem hiding this comment.
Great job, it looks very promising! There are some trivial things, a bit more refactoring is needed, but mainly unit tests.
UI/UX
- It would be nice to navigate to the geometry you will be recording further after you open the draft
- After user is done recording geometry and doesn't fill out anything in the form yet, application crashes. We should open the form right away and not the geometry recording
- When a draft is available and an existing feature is clicked to edit the warning drawer opens and closes right away
- When a draft is available and "add" button is clicked, the drawer opens correctly, but discarding draft doesn't start recording mode, but stays in "view" mode of map
b242e2a to
d02dcfb
Compare
📦 Build Artifacts Ready
|
tomasMizera
left a comment
There was a problem hiding this comment.
Nice! :)
When testing, let's try it out on some low-end devices to see if the 1 second interval is not causing too much slowness in UI. If so, we might need to move the saving part to another thread.
In general, this is going in a very good direction, I believe we will have this ready for testing soon.
📦 Build Artifacts Ready
|
|
@Withalion everything should be resolved. |
📦 Build Artifacts Ready
|
📦 Build Artifacts Ready
|
Withalion
left a comment
There was a problem hiding this comment.
Few more comments after your changes. I'll let @tomasMizera have the final review
📦 Build Artifacts Ready
|
Withalion
left a comment
There was a problem hiding this comment.
Some more concers from the quick review
📦 Build Artifacts Ready
|
Withalion
left a comment
There was a problem hiding this comment.
The PR needs to be rebased on master to fix merge conflicts
c46dbf5 to
fa98f0f
Compare
tomasMizera
left a comment
There was a problem hiding this comment.
We need #4773 merged first before finalizing this one.
| { | ||
| return false; // field removed or renamed since the draft was written | ||
| } | ||
|
|
There was a problem hiding this comment.
Btw. this is prone to the same problem that #4773 fixes. Let's merge and release the two together.
There was a problem hiding this comment.
We then also need to verify that remapping scenario is handled properly.
| * The actual notification UI is handled elsewhere - this class only detects a draft | ||
| * and performs the resume/discard action once the user has decided. | ||
| */ | ||
| class FeatureDraftController : public QObject |
There was a problem hiding this comment.
This class must listen to #4773 remapped feature. This is to handle scenario when the drafted feature's fid has been remapped during sync.
- Iterate over remapped features
- If there is a saved draft for a remapped feature, update its feature ID to the new ID
7b00060 to
9c5daa3
Compare
|
@tomasMizera @gabriel-bolbotina
|
I am happy to keep this for v2. Can you just log a note ( |
Description
Adds automatic recovery of in progress feature edits. If the app closes unexpectedly while you're editing a feature (a crash, an incoming call, a dead battery), your unsaved geometry and attribute changes are no longer lost. On the next launch you can resume exactly where you left off, or discard the changes.
Fixes: #4585
What changed
FeatureDraftUtils(storage) andFeatureDraftController(app/drafts/) persist an in progress edit (geometry and attributes) as JSON inQSettings, one draft per project. Writes are debounced by about 1s, so they don't happen on every keystroke or vertex.AttributeControllerandRecordingMapToolwrite the draft when attributes or geometry change, and clear it once the feature is saved, deleted, or the edit is cancelled.ActiveProjectexposes the draft controller to QML.Behaviour
Videos:
Test crash in geometry, notification resume:
ScreenRecording_12-03-2026.18-49-59_1.MP4
Test crash in geometry, layers banner resume:
ScreenRecording_12-03-2026.18-50-26_1.MP4
Test crash in geometry, previous edits also in form, notification resume:
ScreenRecording_12-03-2026.18-51-25_1.MP4
Test crash in form, previous edits also in geometry, notification resume:
ScreenRecording_12-03-2026.18-52-21_1.MP4
Test relations, notification resume:
https://github.com/user-attachments/assets/92c69cfa-e3ec-4d6b-933d-f67f91e973b7
Known limitations (v2)