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

Dynamic adding and removing of facets #188

Open theq629 opened 8 years ago

theq629 commented 8 years ago

In #168 me and @anoopsarkar noted that the new per-field selections (#186) can be extended to allow dynamic adding and removing of facets in the UI.

This should now be easy to implement as long as there is at most one facet per data field. Besides adding the UI to add and remove facets, to add a facet we just get the appropriate selection object from Facets.FieldSelections and attach a facet UI to it.

Supporting more than one facet per data field is also easy for the facet view itself. We would extend Facets.FieldSelections to allow more than one selection object per field. However, it's not clear what do in the storyline view when the user clicks on an entity line. Eg if the user clicks on an entity line for "person:Hannibal" and there are currently two facets for the "person" field, then which facet gets changed?

anoopsarkar commented 8 years ago

Multiple facets on the same data field could be viewed as an OR over that data field, so in the above question I think nothing changes in those other facets. If they are all ANDed together to form a new constraint then all of them will have to change. Unsure which option is better.

theq629 commented 8 years ago

I'm not sure that that being OR or AND effects the question of which facet to change. An entity line in the storyline currently is just associated with a field, so if there is more than one facet per field it isn't clear which facet that should be applied to. For the main interface we'd just need to at least change the drop down menu to show different facets (eg "Person (1)", "Person (2)"), and use that choice when the user clicks on an entity line. However, for the manual query we'd also have to either provide a text format for selecting facets (eg "person.1:Hannibal") or use the current queries ("person:Hannibal") and let the user choose which facet to use when they click on an entity line.

Using OR constraints would be a much bigger change since we don't have any support for that right now. Using AND constraints would be easy apart from the various UI changes.

anoopsarkar commented 8 years ago

We talked about this a bit more in person. I think using AND constraints limits the use of an additional facet list, so I think we should revisit this when we can do OR constraints properly.