if the place has no concerts, it might switch to the festival tab. but then if someone adds a concert then refreshing the same page will show the concerts tab
2022-05-26 14620, 2022
Etua joined the channel
2022-05-26 14632, 2022
alastairp
so I wanted to add something that would be explicit to say "we're actually showing a different tab to the default"
2022-05-26 14600, 2022
alastairp
in this case, it means that no parameter always means the concerts tab (or a redirect)
2022-05-26 14629, 2022
alastairp
yes, it's a bit inefficient, because we gather all of the information for the page and then redirect (so another request, another set of queries, etc), but for the size of the site this is OK
2022-05-26 14630, 2022
ansh
Understood
2022-05-26 14613, 2022
alastairp
there are definitely other ways of doing it. If we had more javascript in the frontend we could automatically add the query parameter to the URL on the client side
2022-05-26 14642, 2022
alastairp
a slightly more efficient way would be to check related events at the beginning of the view and redirect before we do too many DB queries
[critiquebrainz] 14alastair opened pull request #430 (03master…place-part-of-parts): Show both forward and backward place-place rels (Parts and Part of) https://github.com/metabrainz/critiquebrainz/pull…
2022-05-26 14622, 2022
BrainzGit
[critiquebrainz] 14alastair opened pull request #431 (03master…api-default-sort): CB-429: API: Default sort by published_on desc if no sort params provided https://github.com/metabrainz/critiquebrainz/pull…