iftechfoundation / ifdb

The software behind the Interactive Fiction Database (IFDB)
Other
23 stars 18 forks source link

Don't collapse reviews unless calling page specifically requests it #315

Closed dfabulich closed 2 months ago

dfabulich commented 2 months ago

Fixes https://github.com/iftechfoundation/ifdb/issues/409

When adding "Read More" collapsed reviews on the /viewgame page, we caused reviews to be collapsed on all pages, including the single-review page, the "all reviews" page for a game, the "all reviews" page for a user, etc. etc.

Now, we only collapse reviews when the calling page requests it.

(Currently, the calling page is responsible for displaying and wiring up the Read More buttons in <script> in $extraHead. That seems fine to me, because I don't anticipate using this feature much, but we can move that code down into reviews.php if/when we decide to make it reusable on other pages.)