craigsapp / website-polish-scores

Front-end for digital transcriptions of the Polish Music Heritage in Open Access project
https://polishscores.org
3 stars 1 forks source link

Place century selection in browse search parameters of URL, et al. #267

Closed craigsapp closed 4 months ago

craigsapp commented 4 months ago

The composer search field is copied to the URL:

https://polishscores.org/?c=Asola%2C%20Giovanni%20Matteo

Screenshot 2024-02-10 at 17 01 04

But the century select menu does not do this:

Screenshot 2024-02-10 at 17 02 08

The genre selection also needs copying to the URL:

Screenshot 2024-02-10 at 17 02 45

Genre (and probably most other search fields are read from the URL):

https://polishscores.org/?g=Christmas

Screenshot 2024-02-10 at 17 08 31

Library is copied to URL:

Screenshot 2024-02-10 at 17 13 08

Instrument selection needs to copy to the URL:

Screenshot 2024-02-10 at 17 03 59

Title search field copies to the URL, but not lyrics:

Screenshot 2024-02-10 at 17 05 31

Also pitch searches need it:

Screenshot 2024-02-10 at 17 06 16

As well as tonic:

Screenshot 2024-02-10 at 17 06 47

And mode:

Screenshot 2024-02-10 at 17 07 13
craigsapp commented 4 months ago

Add search fields to this.VARS.SEARCH_URL for other field besides composer, siglum and title:

doBrowseSearch.js:  this.updateBrowseUrl(this.VARS.SEARCH_URL);
filterByComposer.js:        this.VARS.SEARCH_URL.c = target;
filterBySiglum.js:      this.VARS.SEARCH_URL.s = target;
filterByTitle.js:       this.VARS.SEARCH_URL.t = target;

CGI parameters for search fields (from getCgiParameters.js):

param name
c composer
g genre
l lyrics
p pitch
s siglum
t title
y century

New ones to add:

param name
i instrument
k tonic (key)
m mode (e.g.: major, minor, lydian)
craigsapp commented 4 months ago

Commit https://github.com/craigsapp/website-polish-scores/commit/07983ddefd69505cdb096ad27a261cc4b1743ec1 adds search to URL for all browse search fields.

Still need to implement i, k, and m parsing from incoming URL.

Example covering all but lyrics:

https://polishscores.org?c=Paderewski%2C%20Ignacy%20Jan&y=18xx&s=PL-Wumfc&g=Etude&t=exercise&i=piano&p=cde&k=C&m=maj

Screenshot 2024-02-10 at 18 04 18
Added parameters: search field parameter
composer c=Paderewski%2C%20Ignacy%20Jan
century y=18xx
siglum s=PL-Wumfc
genre g=Etude
text t=exercise
instrument i=piano
pitch p=cde
tonic (key) k=C
mode m=maj
craigsapp commented 4 months ago

Commit https://github.com/craigsapp/website-polish-scores/commit/5e38ceef928dfa0ce686e796e3157e87d6a67364 add i (instrument), k (tonic or key) and m (mode) input search parameters from the URL. keyscape display options for work pages changed to ks.

Example of new search parameters in URL:

polishscores.org/?i=flt&k=C&m=maj

(C major works containing flute)

Screenshot 2024-02-10 at 18 42 07