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

Flagged development #259

Open
alexgbob opened this issue Aug 17, 2018 · 2 comments
Open

Flagged development #259

alexgbob opened this issue Aug 17, 2018 · 2 comments

Comments

@alexgbob
Copy link

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.

  1. Go to https://www.massbuilds.com/map/moderations
  2. Click on one of the flagged development
  3. Un-flag the development
  4. then go back to the moderation window and see that the development is still in the flagged development list.

Expected behavior
I would assume that the un-flagged development would be removed from the flagged development list

Screenshots
image

Desktop (please complete the following information):

  • OS: Windows
  • Browser: chrome
@alexgbob
Copy link
Author

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.

@mzagaja mzagaja self-assigned this Nov 13, 2020
@mzagaja mzagaja added the bug label Nov 13, 2020
@mzagaja
Copy link
Contributor

mzagaja commented Nov 13, 2020

@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.

@mzagaja mzagaja removed their assignment Mar 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants