Closed nicebread closed 1 month ago
I think you mean P_Data_Open
(this is the hierachical prefix for all open data items)
mode=print&details=false&filter=P_Data_Open
gives us:
How I implemented it:
filter
is a comma separated list. It shows all indicators with IDs, that start with one of the filter IDs.
filter=P_Data_Open,P_Preregistration
gives us everything that starts with P_Data_Open
or P_Preregistration
The result looks great!
Just one thing: I still first have to select a
Ideally, we can show arbitrary version of the packs. We should store old versions as separate files (e.g., in a subfolders of packs
), and the display/printing mode has a dropdown box which lists all available versions. Then users can select the desired version and display it.
(See my email from 2024-08-08). We need version 0.3 (see releases/tags) as printed PDF for a BSc thesis.
https://resque-framework.github.io/collector-app/preview
There is a dropdown to choose packs and a text field for filter. The filter works exactly the same as before. The top bar for input is hidden when printing.
Great!
(A) Can you add the option to show the indicator labels as a checkbox? (Otherwise user do not know what to put into the filter box). Also write an info to the filter box that it filters the indicator labels.
(B)
Can you add the capability to select the item from the dropdown box also via URL query strings?
Such as:
https://resque-framework.github.io/collector-app/preview?type=pubs&version=0.3.1&filter=P_Data&showmeta=true
(this needs to be intelligently resolved to the underlying pack file).
I need this feature to include the printing into the RESQUE main website. E.g., when I write a section on the new theory indicators, I want to show them on the website.
(A) is complete.
(B)
Now it works with type
, version
, filter
and showLabels
, you can try the link: https://resque-framework.github.io/collector-app/preview?type=pubs&version=0.3.1&filter=P_Data
I made it in a way that the selection menu disappears if we use query params (for embedding to the website?)
What does showmeta
do?
Great - this works already nicely on the website:
What does showmeta do?
The same as the "Show indicator labels" checkbox does - show or hide the labels. Maybe we should call it show_labels
.
Can you furthermore add this JS snippet to the preview:
<script>
function sendHeight() {
const height = document.documentElement.scrollHeight;
window.parent.postMessage(height, '*');
}
window.onload = sendHeight;
window.onresize = sendHeight;
</script>
This helps resizing the iFrame on the website.
The same as the "Show indicator labels" checkbox does - show or hide the labels. Maybe we should call it show_labels.
We already have showLabels
: https://resque-framework.github.io/collector-app/preview?type=pubs&version=0.3.1&filter=P_Data&showLabels=true
I also copied your helper function
Great! Can you add the preview options to the documentation? I think then we can close the issue.
Print mode, but only select indicators.
For example, show all open data indicators from publications:
https://nicebread.github.io/RESQUE/web/?mode=print&filter=P_OpenData