Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validate Entity version when clicking "Edit" button #476

Open
lognaturel opened this issue Sep 1, 2023 · 1 comment
Open

Validate Entity version when clicking "Edit" button #476

lognaturel opened this issue Sep 1, 2023 · 1 comment
Labels
frontend Requires a change to the UI needs discussion Discussion needed before work can begin

Comments

@lognaturel
Copy link
Member

lognaturel commented Sep 1, 2023

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

getodk/central-frontend#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)
@lognaturel lognaturel added needs discussion Discussion needed before work can begin frontend Requires a change to the UI labels Sep 1, 2023
@sadiqkhoja
Copy link
Contributor

Like the idea to update the row before showing the edit box

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
frontend Requires a change to the UI needs discussion Discussion needed before work can begin
Projects
None yet
Development

No branches or pull requests

2 participants