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

download and open pitch ranges in new window icons #241

Closed craigsapp closed 5 months ago

craigsapp commented 5 months ago

It would be useful to add these two icons:

Screenshot 2024-01-22 at 00 16 23

After the "finals" checkbox for vocal ranges:

Screenshot 2024-01-22 at 00 16 30

The download button would download the vocal range plot to the users' computer (to insert in MS Word or similar text editor for example), and the expand icon would be used to open the image in a new window for a larger display (and optionally download from there as well).

craigsapp commented 5 months ago

Implemented in commit https://github.com/craigsapp/website-polish-scores/commit/f1f2e4de4e1dd60f2a7b4ba194c471439b674683

Example:

Screenshot 2024-01-22 at 05 08 38

Clicking on the new download button will download to a filename that contains the file ID of the score, such as pl-kk--kk-i-376--003-prange.svg in this case.

Clicking on the expand button will open in a new window:

Screenshot 2024-01-22 at 05 10 24

This will load the image directly from the data server:

https://humdrum.nifc.pl/pl-kk--kk-i-376--003-prange-duration-final.svg

Notice that the display will match the check box options for the pitch range analysis entry, which in this case selected the duration variant with display of final notes (this is also true for download button).

craigsapp commented 5 months ago

Commit https://github.com/craigsapp/website-polish-scores/commit/0ab26c26a44b36e2aaae71fc1cface6283920536 preserves the checkbox options similar to the new window option.

The downloaded filename will be pl-kk--kk-i-376--003-prange-duration-final.svg when the durations and finals checkboxes are selected, for example.

craigsapp commented 5 months ago

When a century ID is used, the colon is converted into an underscore automatically (since colons are not really allowed in MacOS). May behave differently in linux and windows (only tested on a mac).

For example: the century ID 17xx:577 will have a download filename of 17xx_577-prange-attack.svg