sanskrit-lexicon / COLOGNE

Development of http://www.sanskrit-lexicon.uni-koeln.de/
18 stars 3 forks source link

Add ability to go back and forward from one user's search to another #259

Open mariaiontseva opened 5 years ago

mariaiontseva commented 5 years ago

Each dictionary entry returned as a search result should have a unique URL to make browser back&forward buttons work

drdhaval2785 commented 5 years ago

By unique URL do you mean something like the following? https://www.sanskrit-lexicon.uni-koeln.de/scans/awork/apidev/getword.php?dict=MW&key=mADava

gasyoun commented 5 years ago

@drdhaval2785 she means between she has searched for. Search history.

mariaiontseva commented 5 years ago

yep, this should work. the goal is to go back and forward from one user's search results to another using browser's Back/Forward buttons

funderburkjim commented 5 years ago

This kind of request is probably best viewed in the context of what Javascript web programmers call 'single page applications.' (SPA). Vue.js uses a special module (vue router) to implement this (see https://router.vuejs.org/). As a crude approximate explanation, Such a system hijacks the usual browser history functions (such as forward, backward arrows).

I think this is purely a client-side function, and requires no special server-side hooks. A good starting place to have a display with this implementation would be one of the displays in the repository: https://github.com/funderburkjim/sanlex-vue; maybe basic v0.2b or basic v0.4 would be good starting points.

Note: If anyone wants to try adding vue-router function to one of these (say basic v0.4), there is one detail regarding access of the Cologne server that should be revised (namely, there is no need currently for the 'pythonanywhere' request; pythonanywhere was used as a kluge to get around lack of https support of Cologne server; since Cologne server now is https, this kluge no longer needed).

gasyoun commented 5 years ago

If anyone wants to try adding vue-router function

It's up to @artforlife if it makes sense for him. Jim, glad to see you back again!

artforlife commented 5 years ago

It might require some tweaks to the back-end as well. I cannot tell at present.

@funderburkjim , are you available to answer some questions? Specifically, we need to clarify and do a couple of things on the test and production server to continue implementing things discussed in #257

funderburkjim commented 5 years ago

@artforlife Ask me an easy one -- let's see how it goes.

Here's one question, not sure whether for you or @drdhaval2785. Back in January, someone made 'apidev' and 'websanlexicon' repositories here in sanskrit-lexicon project. This is confusing to me since (a) I had set up repositories by these names under 'funderburkjim' project and (b) had been using these as the masters for repositories at Cologne.

We need to either (a) remove these repositories in sanskrit-lexicon or (b) change the Cologne repositories so that they consider the sanskrit-lexicon repositories as their master; I'm not sure how to do this.

This needs to be done before further work on the apidev, websanlexicon repositories is done.

drdhaval2785 commented 5 years ago

Not me @funderburkjim. I can see there are three FORKs of your repos. apidev, websanlexicon and sanlexhome.

As these are forks, you can safely remove / ignore those. Whenever someone needs it, he can create a new fork or use from funderburkjim repository.

artforlife commented 5 years ago

Back in January, someone made 'apidev' and 'websanlexicon' repositories here in sanskrit-lexicon project. This is confusing to me since (a) I had set up repositories by these names under 'funderburkjim' project and (b) had been using these as the masters for repositories at Cologne.

Yes, I believe I made them. I did it not in January but slightly more recently.

We need to either (a) remove these repositories in sanskrit-lexicon or (b) change the Cologne repositories so that they consider the sanskrit-lexicon repositories as their master; I'm not sure how to do this.

We should take path (b) here because it seems prudent for the repositories to be within the project. This way, pull-requests can be approved by more than one person, and there is never a hold-up due to some one being away.

This needs to be done before further work on the apidev, websanlexicon repositories is done.

Agreed. How should we proceed?

CC: @gasyoun

gasyoun commented 5 years ago

We should take path (b)

Fully agree. @funderburkjim how about you?