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

Add a config variable to select displayed views #193

Closed avacariu closed 8 years ago

avacariu commented 8 years ago

This is definitely an ugly way of doing this, but I can't do this a loop since there are sometimes 2 or 3 names for the same view, and the setup functions don't all have the same interface.

If I were to refactor the views a bit to stick with 1 name per view, and have a global 'parameters' object that each setup function would get (and then only read the attributes it's interested in), then this could be turned into a cleaner loop.

If this refactor doesn't conflict with anyone else's work, I'd like to do it, and then this PR will be ready to be merged.

avacariu commented 8 years ago

I've refactored the views, and now the tabs are all added in a for loop, which loops over all tabs listed in config.py. The only thing is that the Facets view is going to be always shown (since it's set up in a different way than the other views).

avacariu commented 8 years ago

I've cleaned this up, and this is now ready to merge.