sfu-natlang / lensingwikipedia

Lensing Wikipedia is an interface to visually browse through human history as represented in Wikipedia. This the source code that runs the website:
http://lensingwikipedia.cs.sfu.ca
Other
11 stars 4 forks source link

Refactored facet code #167

Closed theq629 closed 9 years ago

theq629 commented 9 years ago

For #151 .

avacariu commented 9 years ago

Just a note: I've moved all of the frontend code into web/, so when we switch the site to use that, the stuff in frontend/ won't be used anymore.

anoopsarkar commented 9 years ago

@vlad003 can you merge the new changes in this pull request into web/ ?

anoopsarkar commented 9 years ago

Or perhaps I should merge this pull request first, and then you can incorporate the changes into web/ and submit a new pull request?

avacariu commented 9 years ago

@theq629 is it alright if I make the changes directly to this branch? That'd be simpler.

theq629 commented 9 years ago

Sure, that's fine.

avacariu commented 9 years ago

I copied and pasted the facet.js file to the new location. I hope this was all that was needed since I didn't make any other changes to the .js files when I copied them from frontend/ before.

If this is fine, then this is ready to merge.

theq629 commented 9 years ago

That should work, facet.js was the only changed file.

anoopsarkar commented 9 years ago

Why do we have both web and frontend with copies of files. Shouldn't we have a single location for all the files that are not "localized" to domains? Should the web directory be created for each domain?

avacariu commented 9 years ago

It's because I didn't delete frontend/ in my pull request that added web/. We hadn't deployed the Flask site at that point, so I figured it's better to remove frontend/ in a separate commit.

Right now, all javascript files should go in web/app/static/js. The localized ones are in there, prefixed with the domain. If it turns out we need more files, they should still be in there, but we can create folders for each domain. They get selectively included in index.html based on the DOMAIN variable in web/config.py.

For each domain, we'd have different stuff in web/local_config.py, so we'd need a copy of web/ for each domain on the server, along with different Apache virtualhosts. But the contents of each web/ directory should be identical (except for local_config.py).

anoopsarkar commented 9 years ago

Ok. I will merge this now. But we should as soon as possible do another pull request that also does lensingaviation using the web directory organization and removes any legacy or duplicated information elsewhere in the repo. Otherwise it will be chaos for anyone picking this up later.

avacariu commented 9 years ago

There's nothing that needs to be done for aviation within the repository. It's all already there. It's only when you deploy this that you'd need to have 2 copies of web/ so that you can have 2 separate config files.

theq629 commented 9 years ago

What is the status of the two copies of js files in the repo? Because I would like to push soon and right now it looks like there is no move on the files I'd be changing.

avacariu commented 9 years ago

Ignore frontend/ and put everything in web/app/static/js/. The Flask server is running at http://lensingwikipedia.cs.sfu.ca:8080.

I'll do a PR for removing frontend/ and we can discuss there if we're ready to go with the Flask version 100% (i.e. move it to port 80).