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

feat: browse artists by area #918

Merged
merged 1 commit into from
May 20, 2024
Merged

feat: browse artists by area #918

merged 1 commit into from
May 20, 2024

Conversation

lydavid
Copy link
Owner

@lydavid lydavid commented May 20, 2024

No description provided.

Copy link
Contributor

sweep-ai bot commented May 20, 2024

Sweep: PR Review

data/database/src/commonMain/kotlin/ly/david/musicsearch/data/database/DatabaseDaoModule.kt

The changes add ArtistsByEntityDao to the import statements and the dependency injection module, ensuring it can be used throughout the application.


data/database/src/commonMain/kotlin/ly/david/musicsearch/data/database/dao/ArtistsByEntityDao.kt

A new DAO class ArtistsByEntityDao has been added to manage database operations for the Artists_by_entity table, including insertions, deletions, and queries with support for coroutines and paging.

Sweep Found These Issues


data/database/src/commonMain/sqldelight/ly.david.musicsearch.data.database/artists_by_entity.sq

Introduced a new table artists_by_entity and associated SQL operations for inserting, deleting, counting, and retrieving artists by entity.

Sweep Found These Issues


data/database/src/commonMain/sqldelight/migrations/5.sqm

A new table artists_by_entity is created with entity_id and artist_id as non-null columns and a composite primary key.


data/musicbrainz/src/commonMain/kotlin/ly/david/musicsearch/data/musicbrainz/api/BrowseApi.kt

The changes generalize the method for browsing artists to support various entity types by introducing a new parameter for the entity type and updating the request URL construction accordingly.

Sweep Found These Issues

Potential Issues

Sweep isn't 100% sure if the following are issues or not but they may be worth taking a look at.


data/repository/src/commonMain/kotlin/ly/david/musicsearch/data/repository/artist/ArtistsByEntityRepositoryImpl.kt

The changes introduce the ArtistsByEntityDao to handle database operations for artists by entity, expanding the functionality of several methods to support more entity types without raising errors.

Sweep Found These Issues


docs/all_features.md

The change updates the documentation to reflect that users can now browse artists when viewing the details of an area.


shared/feature/details/src/commonMain/kotlin/ly/david/musicsearch/shared/feature/details/DetailsFeatureModule.kt

Added a new dependency artistsByEntityPresenter to the AreaPresenter in the detailsFeatureModule.


shared/feature/details/src/commonMain/kotlin/ly/david/musicsearch/shared/feature/details/area/AreaPresenter.kt

The changes introduce functionality to handle artist-related data within the AreaPresenter by adding new dependencies, initializing UI state, handling events, and updating the overall state management.

Potential Issues

Sweep isn't 100% sure if the following are issues or not but they may be worth taking a look at.


shared/feature/details/src/commonMain/kotlin/ly/david/musicsearch/shared/feature/details/area/AreaTab.kt

A new enum constant ARTISTS has been added to the AreaTab enum class.


shared/feature/details/src/commonMain/kotlin/ly/david/musicsearch/shared/feature/details/area/AreaUi.kt

The changes introduce a new tab for displaying a list of artists associated with an area, using the ArtistsListScreen composable.

Potential Issues

Sweep isn't 100% sure if the following are issues or not but they may be worth taking a look at.


shared/feature/details/src/commonMain/kotlin/ly/david/musicsearch/shared/feature/details/area/AreaUiState.kt

The changes include adding an import statement for ArtistsByEntityUiState and reordering the properties within the AreaUiState data class.


shared/feature/stats/src/commonMain/kotlin/ly/david/musicsearch/shared/feature/stats/AreaStatsPresenter.kt

The changes introduce functionality to collect and include artist statistics in the StatsUiState by adding a new DAO dependency and state variables for remote and local artist counts.


shared/feature/stats/src/commonMain/kotlin/ly/david/musicsearch/shared/feature/stats/Stats.kt

A new ArtistStats data class has been added and integrated into the Stats data class to include artist-related statistics.


shared/feature/stats/src/commonMain/kotlin/ly/david/musicsearch/shared/feature/stats/StatsFeatureModule.kt

A new dependency artistsByEntityDao was added to the AreaStatsPresenter in the statsFeatureModule.


shared/feature/stats/src/commonMain/kotlin/ly/david/musicsearch/shared/feature/stats/StatsUi.kt

A new case for Tab.ARTISTS has been added to display artist statistics in the StatsUi function.


strings/src/commonMain/kotlin/ly/david/musicsearch/strings/AppStrings.kt

Two new properties, artists and cachedArtists, were added to the AppStrings data class to enhance string resource management and formatting capabilities.


strings/src/commonMain/kotlin/ly/david/musicsearch/strings/EnStrings.kt

The changes introduce new localized strings for "Artists" and a template for displaying cached artists information.


test-data/src/commonMain/kotlin/ly/david/data/test/api/FakeMusicBrainzApi.kt

The method browseArtistsByCollection was renamed to browseArtistsByEntity, with the parameter collectionId replaced by entityId and a new parameter entity added.


ui/common/src/commonMain/kotlin/ly/david/ui/common/topappbar/Tab.kt

The changes introduce a new ARTISTS value to the Tab enum and update the getTitle function to return the appropriate title for this new tab.


@lydavid lydavid enabled auto-merge (squash) May 20, 2024 00:09
@lydavid lydavid merged commit 6617fcb into beta May 20, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant