Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

simple-search: address bar consistency #21

Open
funderburkjim opened this issue Dec 9, 2020 · 9 comments
Open

simple-search: address bar consistency #21

funderburkjim opened this issue Dec 9, 2020 · 9 comments
Labels
bug Something isn't working

Comments

@funderburkjim
Copy link
Contributor

Suppose we use the url https://sanskrit-lexicon.uni-koeln.de/simple/lan/guru to get a
specific word. The address bar is now consistent with the Dictionary and Citation form inputs:

image

@funderburkjim
Copy link
Contributor Author

Now, suppose we request a new dictionary and/or citation:

Say, rAma in Wilson.

The address bar is now inconsistent with the dictionary and citation:
image

@funderburkjim
Copy link
Contributor Author

It would be better for the address bar to be consistent with
the current input forms.

How to do this? Don't know.

@funderburkjim funderburkjim added the bug Something isn't working label Dec 9, 2020
@gasyoun
Copy link
Member

gasyoun commented Dec 10, 2020

How to do this? Don't know.

Let me do some research, I saw it as well, but can you please or better show how it is coded right now?
I'll find a developer to fix that, if I can show and tell how what is there works right now. Leonid, developer
whom I asked, said it will take 5 hours to fix, but he needs FTP and admin access (is there a cache on server?).

@funderburkjim
Copy link
Contributor Author

This stackoverflow article looks promising. You might ask one of your contacts their opinion of this approach.
e.g., which specific method is preferred, and are there any things to be wary of

https://stackoverflow.com/questions/3338642/updating-address-bar-with-new-url-without-hash-or-reloading-the-page

In particular, this looks best to me at the moment:

Changing full URL. Chrome, Firefox, IE10+

history.pushState('data to be passed', 'Title of the page', '/test');
The above will add a new entry to the history so you can press Back button to go to the previous state.

@gasyoun
Copy link
Member

gasyoun commented Dec 10, 2020

You might ask one of your contacts their opinion of this approach.

Let me try. Leonid told me anyway would work, he has never worked with window.history.pushState("object or string", "Title", "/new-url"); before, but as per documentation it does the needed https://developer.mozilla.org/ru/docs/Web/API/History/pushState based on https://sanskrit-lexicon.uni-koeln.de/simple?dictionary=lan&citation=guru

@gasyoun
Copy link
Member

gasyoun commented Apr 10, 2021

@alex-bukach please take a look at it. It's number one issue as per UI at Cologne as per me.

@gasyoun
Copy link
Member

gasyoun commented Dec 21, 2021

@funderburkjim where or github is the backend code, that makes https://sanskrit-lexicon.uni-koeln.de/simple/MW/druma page possible? I want @oilda to close the URL issue, but need baldy your advice, thanks.

@funderburkjim
Copy link
Contributor Author

If you do a view source, you'll see the starting DIRECTORY:
image

To know the 'starting' point within the directory, you have to consult the .htaccess file.
At Cologne: RewriteRule ^simple$ scans/csl-apidev/simple-search/v1.1/list-0.2s_rw.php is the relevant
line.

That shows where the code is (at Cologne). So it is the csl-apidev repository at Github that is involved.

1.1a

This is probably a better version of simple search insofar as the way it handles parameters.
To access it at cologne use
https://sanskrit-lexicon.uni-koeln.de/simple1.1a.

The behavior depends in part on how cookies are set locally, if no 3rd parameter given.
(I am not sure whether this form always reverts to 'input=simple'. This could be checked by oilda?
https://sanskrit-lexicon.uni-koeln.de/simple1.1a/md/anga

But, you can 'force' a use of the simple-search algorithm by adding a 3rd parameter.
Some examples to try with 1.1a:
https://sanskrit-lexicon.uni-koeln.de/simple1.1a/md/anga/simple

This is also useful to be able to force, for example, that the 2nd parameter be interpreted as slp1:
https://sanskrit-lexicon.uni-koeln.de/simple1.1a/md/aNga/slp1 #Thus, you can 'force' slp1.

Note that a wrong slp1 spelling fails, which is reasonable.
https://sanskrit-lexicon.uni-koeln.de/simple1.1a/md/anga/slp1

I

@gasyoun
Copy link
Member

gasyoun commented Jun 18, 2022

https://sanskrit-lexicon.uni-koeln.de/simple1.1a

But 1.1a does not equals to

https://sanskrit-lexicon.uni-koeln.de/simple

linked from homepage, right @funderburkjim

siva

Sidequestion. Can it realy be that siva is more frequent than śiva? I hardly believe so or we have no frequency data from Oliver on them?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants