CyberCRI / learn-ext

WeLearn Browser Extension
https://welearn.cri-paris.org
MIT License
11 stars 1 forks source link

[Welearn-map] click event contains wikipedia label #166

Open nicolasz-cri opened 4 years ago

nicolasz-cri commented 4 years ago

On click, only wikidata_id in the selection are tracked. We need concept label too.

prashnts commented 4 years ago

Can you access the concepts lookup table? The "base layer" of concepts can be referenced for getting the labels, otherwise, you can return the concept objects, although that may require creating new objects on each event.

nicolasz-cri commented 4 years ago

I was trying to use vue-effector without success so I decide tu put some basic Custom event. And now, i just realize that I can just use selectedConcepts.watch() in Vue. Actually, I put few logic in the lib to be able to use data needed in Projects (wikidata_id) but that logic must be in Projects otherwise we can't be generalistic.

prashnts commented 4 years ago

Oh, maybe i can help with vue-effector. I was just thinking: since effector works with both react, vue, as well as vanilla js, let's use it for the "core api" of map? I dont know how yet though, but just putting the idea in your head :P