Add INSCRIBED Difficulty Support - #66
Draft
283375 wants to merge 5 commits into
Draft
Conversation
…view - Difficulty gains a nullable rating_class_alias column (schema 14 -> 15); the raw upstream value is interpreted only by ArcaeaRatingClassDisplay. - The `charts` DatabaseView is replaced by explicit join queries returning Chart as a plain POJO. Views force their definition to be recreated in every migration that touches the joined tables; DAO-level joins avoid that and let consumers of the query stay unchanged. The view is dropped in the migration so a future `CREATE VIEW charts` cannot collide with a stale definition. - Duplicate columns shared by play_results and the chart join (song_id, rating_class, date) resolve to the play_results value, as before. Refs #61
Pass the raw upstream value through to Difficulty; interpretation stays in ArcaeaRatingClassDisplay. Adds the first songlist importer test with a trimmed fixture covering alias parsing and unknown-key tolerance.
- toRatingClassSelectorItems now takes List<Difficulty> and feeds the alias into ArcaeaRatingClassDisplay.of; ArcaeaChartSelector derives charts from the same difficulties query it already ran, and the calculator screen reads difficulties for the selector items. - ratingText gains an ArcaeaRatingClassDisplay-based overload so an INSCRIBED chart renders "INSCRIBED" instead of "BEYOND"; the chart card colors follow the display form as well. Refs #61
Room generates the same statements (drop the removed charts view, add the nullable rating_class_alias column), so the hand-written migration was redundant. The migration test now relies on the registered AutoMigration via the database class and keeps its assertions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #61
Changes
Database (schema 14 → 15)
rating_class_aliascolumn todifficultieschartsDatabaseView with explicit join queries returningChartas a plain POJOChartFactory.fakeChartcarries the aliasSonglist parsing
ratingClassAliasfrom difficulty entries and store it onDifficultyUI
toRatingClassSelectorItems()now takesList<Difficulty>ratingTextrenders INSCRIBED viaArcaeaRatingClassDisplay; the chart card difficulty label color follows the display formTests
ratingTextINSCRIBED and unknown-alias fallback cases