openrightsgroup / blocked-org-uk

Template front-end code, markup, style-sheets, images and other assets for the Censorship Monitoring Project (blocked.org.uk)
https://www.blocked.org.uk/
GNU General Public License v3.0
13 stars 5 forks source link

Add ability to link URLs on frontend with extra info already expanded #380

Closed alexhaydock closed 5 years ago

alexhaydock commented 5 years ago

It would be quite useful if I was able to link URLs to entries on Blocked.org.uk with the data about past blocks already expanded (i.e. as if someone had pre-clicked "Show all results")

For example I want to highlight this domain in the report: https://www.blocked.org.uk/site/http://a8c.com

But I want to draw attention not just to the fact that there is a current block by Three, but also to the fact that there have been 4 previous blocks which have been cleared as a result of the report.

Maybe something like ?all=1 in the URL or similar?

dantheta commented 5 years ago

I've added an ?expand=1 parameter to the site results page, eg:

https://www.blocked.org.uk/site/http://a8c.com?expand=1

edjw commented 5 years ago

@dantheta – Can we make it a bit easier to discover this parameter? Maybe by overwriting the URL in the address bar when the 'Show all results' link is pressed?

dantheta commented 5 years ago

No problem - I wasn't sure if this feature was intended for general use or just for Alex/admin.

I've added the expand parameter to the permalink when the full results are expanded.

edjw commented 5 years ago

Brilliant, thanks Dan. Closing

dantheta commented 5 years ago

Cheers! The changes have just gone live, along with #393

edjw commented 5 years ago

Is the addition of the expand parameter definitely working? Doesn't seem to be working for me on Firefox or Chrome

dantheta commented 5 years ago

It's working for me in Firefox & Chromium (Linux)

edjw commented 5 years ago

GIF showing what's happening for me

CleanShot 2019-05-30 at 11 29 06

dantheta commented 5 years ago

The URL updating is there now (for the "show all results" toggle).

dantheta commented 5 years ago

Ah, got it. I was changing the permalink URL at the bottom in response to the expand event. I'll fix it for the address bar URL as well. Sorry!

On 30 May 2019 11:30:10 BST, edjw notifications@github.com wrote:

CleanShot 2019-05-30 at 11 29
06

-- You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/openrightsgroup/blocked-org-uk/issues/380#issuecomment-497284564

-- Sent from my Android device with K-9 Mail. Please excuse my brevity.