Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] MBS-9253: Use type child_order rather than id to sort RGs #3387

Draft
wants to merge 1 commit into
base: schema-change-2025-q2
Choose a base branch
from

Conversation

reosarevok
Copy link
Member

@reosarevok reosarevok commented Oct 17, 2024

Implement MBS-9253

Description

This will allow us to list EP release groups above singles, which has been requested forever, and it makes sense in all markets except maybe Japan. Given Japan would want singles before albums, which we don't do anyway, this is probably not too relevant.

This changes the lists from sorting on type id to type child_order, which means reordering EP and single just requires switching their child_order.

For secondary types, we were sorting by type id on _fast sorts and by type name on _slow. This changes both to use child_order. Right now the secondary types all have a child_order of 0, which we should probably change (either to match ID or name by default, before we take more active decisions about it).

Tasks

  • Write triggers to update the artist_release_group table when release_group_primary_type or release_group_secondary_type get updated.
  • Drop and recreate the artist_release_group table if exists during the schema change.
  • Test running the schema change.
  • Test the triggers actually work by changing child_order and checking if there's reordering in _fast RG listings.
  • Decide on a starting set of child_order values for secondary types (alphabetical keeps them sorted as in _slow and RG edit forms, id-based keeps them sorted as in _fast).

Testing

Tested the slow method locally by using it by default for a moment (changing the condition for fast to if ($self->has_materialized_artist_release_group_data && 0)). Fast method is still untested, see tasks above.

@reosarevok reosarevok added the QoL Non-urgent quality of life improvements label Oct 17, 2024
@Aerozol
Copy link
Contributor

Aerozol commented Oct 18, 2024

Holy sh*t :-0

@reosarevok reosarevok changed the title MBS-9253: List EP release groups above singles [WIP] MBS-9253: Use type child_order rather than id to sort RGs Mar 19, 2025
@reosarevok reosarevok changed the base branch from master to schema-change-2025-q2 March 20, 2025 14:03
@reosarevok reosarevok force-pushed the MBS-9253 branch 2 times, most recently from 537bed7 to 38718f4 Compare March 21, 2025 10:52
This will allow us to list EP release groups above singles, which
has been requested forever, and it makes sense in all markets except
maybe Japan. Given Japan would want singles before albums,
which we don't do anyway, this is probably not too relevant.

For secondary types, we were sorting by type id on _fast sorts
and by type name on _slow. This changes both to use child_order.

We still want type ids for filtering and as a fallback when
child_order is the same, so this adds child_order in addition
to them rather than replacing them.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
QoL Non-urgent quality of life improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants