Open alexgbob opened 6 years ago
Seems like the second issue (with un-flagged developments staying in the flagged development list) resolves itself when you logout and then log back in.
@atomtay and I encountered this in reviewing the updated Flags feature we worked on in the past few days. We have isolated it to the following technical issue:
We are using a computed property in our template to populate the flags. It appears that the computed property does not update after calling flag.set('isResolved', true)
. The local store appears to get out of sync with the remote server and so the currently loaded version of the app does not reflect the actual state of the application on the server other than for the little trick where the call to flag.save().then()
invokes a JavaScript function to remove the entry from the user's current view.
This issue does not appear to comport with the claims made in the Ember documentation that changes made to items being observed by computed properties should dynamically update that computed property. It is my belief I am correctly observing the array of flag objects that are resolved but empirical analysis (and the above bug report) shows that is not the case.
A blocking issue that has made debugging this more challenging is we currently cannot inspect the state of our data in the Ember Inspector Data Tab. It does not load, and this may or may not be a function of Ember being in version 3 and the inspector having marched ahead to later versions.
It is my general belief that the solution to this will involve a different method of updating the Flag object that triggers the observer and/or a local refresh, or updating the method of observing the object so that is appropriately triggered on object update. However Googling has failed to produce a functional example that is analogous to this case.
Describe the bug First, on the moderation window, the section that lists the flagged developments goes off the page, so you cannot see the bottom of the scroll bar.
Second, when I investigate a flagged development and then decide to unflag it, when I go back to the moderations window, the development still shows up as flagged. When I then click on the development that I just un-flagged the map goes to the development and it does not look like it is flagged.
Steps to reproduce Walk us through how you revealed the bug.
Expected behavior I would assume that the un-flagged development would be removed from the flagged development list
Screenshots
Desktop (please complete the following information):