NYULibraries / spatial_data_repository

NYU's GeoBlacklight instance @ geo.nyu.edu
https://geo.nyu.edu
6 stars 2 forks source link

Open restricted downloads in new tab to avoid blank page #346

Closed spilth closed 2 months ago

spilth commented 2 months ago

Problem

When a user attempts to download a restricted "Original Shapefile" for the first time while not being logged in, they are left on a blank page at the end of the sign-in/download process.

Solution

Force restricted "Original Shapefile" downloads to open in a new tab so they still have an SDR tab open at the end of the process. Future downloads (while now logged in) will open and close a new tab automatically, leaving you right where you were.

Additionally, I migrated the "Downloads Collapse" partial to a View Component to allow for easier view testing.

Addresses #312

Type

Bug Fix

Video

First download is an unrestricted file, second download is a restricted file.

https://github.com/user-attachments/assets/81baff4f-b5a4-44e2-9ccf-a268fd9f06b7

nmwolf commented 2 months ago

This set up looks like a good working solution from the user point of view.