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

Already on GitHub? Sign in to your account

Reload features on save #20

Merged
merged 4 commits into from Oct 31, 2013

Conversation

Projects
None yet
2 participants
Contributor

panozzaj commented Sep 24, 2013

My primary concern for this PR was getting it so when I press save on one of the tabs that the view on the main screen updates correctly. Previously, any changes that were saved did not show up until the page was refreshed.
Now, you are taken to the home page and the view is updated (turns a newly activated feature to green without reloading the browser, as an example.) Also, when a tab is saved, we change the url to be the main app's url so that if the browser is refreshed, the user sees the same view as before the browser refresh. Running rake passes.

Caveats:
I am not super familiar with Spine conventions, so any suggestions/improvements are welcome. I was not able to get the main page view to update when a percentage slider changed, although this also does not appear to be correct on page refresh either, so I think this is a separate task.

Owner

jnunemaker commented Sep 25, 2013

When I click change settings on the first feature, change it to off, and save it, it says it is enabled and stays green. If I do the change/save again it shows it correctly as off/disabled. It seems like it just doesn't work the first time. Any ideas?

Contributor

panozzaj commented Sep 25, 2013

OK, thanks for the quick response! To potentially clarify: you are saying the behavior you are seeing is with this PR. I am not sure, I cannot replicate that here after reinstalling the gem from the PR branch and restarting my server. My steps are: go to a disabled feature, go to the boolean tab and select enable, and then save changes. Expected behavior is to go to the home page and see the feature as green, which is what I see.

Maybe it deals with how I set up Flipper. I did something like:

FlipperWrapper.adapter.add(Feature.new(:home_page))

to get the feature to show up on the main screen. I am using the in-memory adapter.

What happens if you refresh and try again? What does your setup look like? Thanks!

Owner

jnunemaker commented Sep 26, 2013

I was using the provided runnable: bundle exec rake start. I'll try to look at it today again.

Contributor

panozzaj commented Sep 30, 2013

I can replicate what you are seeing with bundle exec rake start, first save after the server startup does not show up correctly in the web view (hard refresh shows that it is persisted though.)

Owner

jnunemaker commented Sep 30, 2013

Ok. So maybe something with in memory version or something. This is working fine for you though with another adapter or another setup?

Contributor

panozzaj commented Oct 16, 2013

Sorry for the delay. I have gotten some similar issues to what you saw, but have not gotten around to figuring out the root cause. It seems to work in a local install with an in-memory adapter, but when I use the project's rake script, it does not appear to work quite right. If you don't mind, can we keep this open until the end of the month and then reconsider?

Contributor

panozzaj commented Oct 29, 2013

I just tried again, and the switches still seem to randomly give the wrong values still. I still think the change is overall useful, but maybe there is something missing in the implementation or an interaction I am not expecting. Feel free to disposition this PR however you see fit (and thanks for the projects and your time spent on them.)

jnunemaker added a commit that referenced this pull request Oct 31, 2013

@jnunemaker jnunemaker merged commit 6cfebf2 into jnunemaker:master Oct 31, 2013

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