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

Elm Source in Survey_Display_Local does not match compiled Javascript of Survey_Display_Server #4

Closed
carlosparadis opened this issue Sep 9, 2017 · 3 comments

Comments

@carlosparadis
Copy link
Member

Some Background

For unknown reasons, Forrest created two projects originally: Occupant Query and Occupant Query Server. These projects have been labeled respectively to Survey Display Local and Survey Display Server, under the wrong assumption the Local was installed on the tablet. However, this was recently found to not be the case (see issue #1). As such, the true intent of the local code is unknown.

The survey_display_server, which handles everything follows more-or-less an MVC architecture (or more specifically a Model-Template-View). The View portion was done in Elm, which compiles to javascript. As such, if we want to edit the view portion of the surveys, we must have the elm code. The javascript compiled is not at all easy to edit.

The start of the problem

For unknown reasons, the Elm code is not available in the survey_display_server, only the compiled javascript. This means the website is functional, but the structure is non-editable. survey_display_local has elm files. Up to this point, we assumed the source elm in one project compiled to the javascript on the other.

Well, that assumption was incorrect. As such, it is impossible to edit the Views of survey_display_server. Just use them, which is clearly a dead end for maintaining it on the long-run.

Next Steps

We need to find the .elm associated to survey_display_server. There are a chance survey_display_local older commit versions may contain it. But as it is, there is no easy way to track it. Additional options look into the server where the development of the code was made if it still exists there.

@ryantanaka
Copy link

ryantanaka commented Sep 15, 2017

  1. We have the elm files now. Compiling the elm files from Forrests computer (occupant-query/app/src/) produces the exact same java script file as the one we have in survey_display/occquse/static/survey-app.js

  2. The sub directory, "server", in occupant-query from Forrest's computer is equivalent to the directory "occquse" in the deployment branch of survey_display. To test this, I did what you suggested and copied "occquse" from Forrest's computer, into our deployment branch. Running "git status" did not show any changes. Just to be sure, I did this again, but added a new line to one of the files in Forrests, repeated the processes. Git then showed that one change.

It looks like we have what we need.

project_diff

@carlosparadis
Copy link
Member Author

Alright, thanks for the brief in the office too. Just to add to what you told there:

App is what we called (wrongly) survey_display_local, and is now known as inactive-survey_display_template. Seeing that only survey_display_server, now survey_display is being used, and we know the files there are the same anyway if we ever need to look back, I guess this case is finally solved. So much legacy code hunting, I don't even.

Here are the next to-dos, which are now on me:

  • I will send a PR linking this issue adding the elm files
  • Adding to .gitignore the server password so it is not listed as a missing dependency.
  • Doing git pull on the server so it is in sync (i.e. downloading the 6 elm files).

I will close this issue soon afterward.

The one on your court now is #5.

@carlosparadis
Copy link
Member Author

Alright, this madness is over. Closing this issue!

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

No branches or pull requests

2 participants