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

Recently updated state does not persist past the latest resolved or fixed issue? #887

Open
ssciolla opened this issue Feb 13, 2023 · 0 comments · Fixed by #892
Open

Recently updated state does not persist past the latest resolved or fixed issue? #887

ssciolla opened this issue Feb 13, 2023 · 0 comments · Fixed by #892

Comments

@ssciolla
Copy link
Contributor

ssciolla commented Feb 13, 2023

When fixing and resolving issues in the UFixitModal when filtered to "Active Issues" (the default), if the user fixes or resolves multiple issues, only the latest updated issue stays in the modal. See the video below for an example:

Screen.Recording.2023-02-12.at.7.59.51.PM.mov

I believe this is because the report from the backend supersedes the frontend report in this handler method, and the extra logic that follows to keep the last resolved issue in the modal only affects the latest issue.

handleIssueSave(newIssue, newReport) {
let { report } = this.state
report = {...report, ...newReport}
if (report && Array.isArray(report.issues)) {
report.issues = report.issues.map(issue => (issue.id == newIssue.id) ? newIssue : issue)
}
this.setState({ report })
}

For people familiar with the design decisions with version 3, is this deliberate? There are small changes we could make here to keep all fixed or resolved issues in the modal until it has been closed. I think the current behavior is somewhat confusing and it would make sense to keep anything changed while the modal has been open in view, so users can review (or un-do) their work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant