getodk / getodk/central

Validate Entity version when clicking "Edit" button

Open
#476 1 comment 1 reaction 0 assignees View on GitHub
frontend needs discussion
Dominant language
JavaScript
Stars
226
Forks
235
Avg merge
2d 22h
Merged PRs (30d)
19

Description

Note: this is a very small refinement idea, it's certainly not necessary. It's related to a broader theme of data updates for the frontend.

#### Problem description
https://github.com/getodk/central-frontend/pull/843 beautifully handles the case where two people or two tabs have the edit modal open at the same time and both make edits. 🎉

However, it's annoying in the case where one person made an edit, and the other person/tab just had the list of entities or a specific entity page open. In that case, the second person will make their edit and only get the message to refresh when they submit their edit. Then they'll lose whatever changes they made and have to re-apply it which could lead to errors.

#### URL of the page
https://staging.getodk.cloud/#/projects/11/entity-lists/trees/entities/d2234801-fd76-4c78-8f3d-173b422cad14

#### Steps to reproduce the problem
Open that page in two tabs. Make an edit in one. Go get a coffee. Come back and try to make an edit in the other.

#### Expected behavior
There's a backend request when the edit button is clicked. The data could automatically refresh (ideal) or the user could be prompted to do so.

#### Central version shown in version.txt

```
versions:
2011fdc00550b22269e67e75112a0be16b92e153 (v2023.3.1-7-g2011fdc)
+9e6643a088062cb3ac5063293e8a1312aa80ba5b client (v2023.3.0-20-g9e6643a0)
+cedadf298742dcf4c3c320ac27f2d0fff95b7476 server (v2023.3.1-40-gcedadf29)
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.