From f85bd85c92d708bca16dd57bfe9b7000329770c5 Mon Sep 17 00:00:00 2001 From: OxygenCobalt Date: Sat, 19 Dec 2020 12:23:10 -0700 Subject: [PATCH] Add contribution templates Add contribution templates for this project. --- .github/CONTRIBUTING.md | 8 ++--- .github/ISSUE_TEMPLATE/bug_report.md | 32 +++++++++++++++++++ .github/ISSUE_TEMPLATE/feature_request.md | 20 ++++++++++++ .github/PULL_REQUEST_TEMPLATE.md | 28 ++++++++++++++++ README.md | 6 +++- .../auxio/database/PlaybackStateDatabase.kt | 2 +- .../oxycblt/auxio/library/LibraryViewModel.kt | 9 +----- .../org/oxycblt/auxio/music/MusicStore.kt | 2 +- .../org/oxycblt/auxio/music/coil/CoilUtils.kt | 2 +- .../auxio/playback/PlaybackViewModel.kt | 11 +++---- .../auxio/playback/queue/QueueAdapter.kt | 2 +- .../oxycblt/auxio/playback/state/LoopMode.kt | 3 ++ .../playback/state/PlaybackStateManager.kt | 14 -------- .../org/oxycblt/auxio/songs/SongsFragment.kt | 2 +- info/ADDITIONS.md | 2 +- 15 files changed, 103 insertions(+), 40 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md create mode 100644 .github/PULL_REQUEST_TEMPLATE.md diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index ff4dfc1a7..a309fe00b 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -10,9 +10,9 @@ Please keep in mind when reporting an issue: - **Is it still relevant in the latest version?** Make sure to test it in the latest version. If you do make an issue, Make sure to provide: -- A summary of what you were doing before the bug/crash -- What do you did that caused the bug/crash -- A trace/logcat if possible, the longer the better. +- A description of the bug/crash +- A summary of the steps to create the bug/crash +- A stack trace/logcat if possible, the longer the better. If you have knowledge of Android/Kotlin in general, you could also go about fixing the bug yourself and opening a [Pull Request](https://github.com/OxygenCobalt/Auxio/pulls). @@ -23,7 +23,7 @@ These should also be logged in the [Issues](https://github.com/OxygenCobalt/Aux Please keep in mind when requesting a feature: - **Has it already been requested?** Make sure request for this feature is not already here. - **Has it been already added?** Make sure this feature has not already been added in the most recent release. -- **Will it be accepted?** Read the [Accepted Additions and Requests](../info/ADDITIONS.md) in order to see the likelihood that your request will be accepted. +- **Will it be accepted?** Read the [Accepted Additions and Requests](../info/ADDITIONS.md) in order to see the likelihood that your request will be implemented. If you do make a request, provide the following: - What kind of addition is this? (A Full Feature? A new customization option? A UI Change?) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 000000000..5aa6a7bc5 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,32 @@ +--- +name: Bug/Crash Report +about: Report an issue with Auxio +labels: bug +assignees: '' + +--- + +**Describe the bug/crash** + + +**To Reproduce** + + +**Logs/Stack Traces** + + +**Screenshots** + + +**Phone Information** + + +**Due Diligence** + +- [ ] I have read the [Contribution Guidelines](../CONTRIBUTING.md). diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 000000000..9578519ae --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,20 @@ +--- +name: Bug/Crash Report +about: Propose an idea for Auxio +labels: enhancement +assignees: '' + +--- + +**Describe the feature you want to implement** + + +**Is your feature request related to a problem? Please describe.** + + +**Why do you think this will improve everyone's usage of Auxio?** + + +**Due Diligence** + +- [ ] I have read the [Accepted Additions and Requests](../../info/ADDITIONS.md), and the [Contribution Guidelines](../CONTRIBUTING.md). diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 000000000..a65e06f1d --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,28 @@ + + +**What is it?** +- [ ] Bugfix (user facing) +- [ ] Feature (user facing) +- [ ] Codebase improvement (dev facing) +- [ ] Meta improvement to the project (dev facing) + +**Description of changes** + +- Do this +- Fix that +- Listen to music + +**Fixes the following issues** + +- + +**Any additional information** + + +**APK testing** + +debug.zip + +**Due Diligence** + +- [ ] I have read the [Contribution Guidelines](CONTRIBUTING.md) and [Accepted additions & Requests](../info/ADDITIONS.md). diff --git a/README.md b/README.md index caf060fb2..7a55a93d5 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,10 @@ Auxio is a local music player for android that I primarily built for myself. -It only has the features that I use out of a music player and nothing more, with a UI/UX mostly derived from [Spotify](https://spotify.com), but with elements from [Phonograph](https://github.com/kabouzeid/Phonograph) and [Music Player GO](https://github.com/OxygenCobalt/Auxio). Its meant to be consistent and reliable, while still being customizable and extendable if one wants to add their own features that I (Personally) don't need. +It only has the features that I use out of a music player and nothing more, with a Spotify-Like UI/UX combined with elements from [Phonograph](https://github.com/kabouzeid/Phonograph) and [Music Player GO](https://github.com/enricocid/Music-Player-GO). +Its meant to be consistent and reliable, while still being customizable and extendable if one wants to add their own features that I (Personally) don't need. + +**Note:** Auxio is still early in development, meaning that some things may change as time passes. ## Screenshots @@ -40,6 +43,7 @@ It only has the features that I use out of a music player and nothing more, with - Full playback persistence system - Embedded covers support - Search Functionality +- Audio Focus / Headset Management - No internet connectivity whatsoever - Kotlin from the ground-up - Modular, feature-based architecture diff --git a/app/src/main/java/org/oxycblt/auxio/database/PlaybackStateDatabase.kt b/app/src/main/java/org/oxycblt/auxio/database/PlaybackStateDatabase.kt index 507a5b5f8..4e178350d 100644 --- a/app/src/main/java/org/oxycblt/auxio/database/PlaybackStateDatabase.kt +++ b/app/src/main/java/org/oxycblt/auxio/database/PlaybackStateDatabase.kt @@ -121,7 +121,7 @@ class PlaybackStateDatabase(context: Context) : /** * Read the stored [PlaybackState] from the database, if there is one. - * @return The stored [PlaybackState], null if there isn't one,. + * @return The stored [PlaybackState], null if there isn't one. */ fun readState(): PlaybackState? { val database = writableDatabase diff --git a/app/src/main/java/org/oxycblt/auxio/library/LibraryViewModel.kt b/app/src/main/java/org/oxycblt/auxio/library/LibraryViewModel.kt index 6139c39a2..eace67ecb 100644 --- a/app/src/main/java/org/oxycblt/auxio/library/LibraryViewModel.kt +++ b/app/src/main/java/org/oxycblt/auxio/library/LibraryViewModel.kt @@ -27,13 +27,9 @@ class LibraryViewModel : ViewModel(), SettingsManager.Callback { private var mDisplayMode = DisplayMode.SHOW_ARTISTS private var mIsNavigating = false - /** The current [SortMode] */ val sortMode: LiveData get() = mSortMode - /** The current library data */ val libraryData: LiveData> get() = mLibraryData - /** The results from the last search query */ val searchResults: LiveData> get() = mSearchResults - /** If LibraryFragment is already navigating */ val isNavigating: Boolean get() = mIsNavigating private val settingsManager = SettingsManager.getInstance() @@ -110,9 +106,6 @@ class LibraryViewModel : ViewModel(), SettingsManager.Callback { } } - /** - * Reset the search query. - */ fun resetQuery() { mSearchResults.value = listOf() } @@ -120,7 +113,7 @@ class LibraryViewModel : ViewModel(), SettingsManager.Callback { // --- LIBRARY FUNCTIONS --- /** - * Update the current [SortMode]. + * Update the current [SortMode] with a menu id. * @param itemId The id of the menu item selected. */ fun updateSortMode(@IdRes itemId: Int) { diff --git a/app/src/main/java/org/oxycblt/auxio/music/MusicStore.kt b/app/src/main/java/org/oxycblt/auxio/music/MusicStore.kt index 014c24ba3..c5670a3f2 100644 --- a/app/src/main/java/org/oxycblt/auxio/music/MusicStore.kt +++ b/app/src/main/java/org/oxycblt/auxio/music/MusicStore.kt @@ -28,7 +28,7 @@ class MusicStore private constructor() { private var mSongs = listOf() val songs: List get() = mSongs - /** All parent models loaded by Auxio */ + /** All parent models (ex Albums, Artists) loaded by Auxio */ val parents: MutableList by lazy { val parents = mutableListOf() parents.addAll(mGenres) diff --git a/app/src/main/java/org/oxycblt/auxio/music/coil/CoilUtils.kt b/app/src/main/java/org/oxycblt/auxio/music/coil/CoilUtils.kt index b10b92e1a..078f453f3 100644 --- a/app/src/main/java/org/oxycblt/auxio/music/coil/CoilUtils.kt +++ b/app/src/main/java/org/oxycblt/auxio/music/coil/CoilUtils.kt @@ -100,7 +100,7 @@ fun ImageView.bindArtistImage(artist: Artist) { } /** - * Bind the genre image for an artist. + * Bind the genre image for a genre. */ @BindingAdapter("genreImage") fun ImageView.bindGenreImage(genre: Genre) { diff --git a/app/src/main/java/org/oxycblt/auxio/playback/PlaybackViewModel.kt b/app/src/main/java/org/oxycblt/auxio/playback/PlaybackViewModel.kt index e78115cea..62077fe3a 100644 --- a/app/src/main/java/org/oxycblt/auxio/playback/PlaybackViewModel.kt +++ b/app/src/main/java/org/oxycblt/auxio/playback/PlaybackViewModel.kt @@ -53,23 +53,20 @@ class PlaybackViewModel : ViewModel(), PlaybackStateManager.Callback { val parent: LiveData get() = mParent /** The current playback position, in seconds */ val position: LiveData get() = mPosition - /** The current queue determined my [mode] and [parent] */ + + /** The current queue determined by [mode] and [parent] */ val queue: LiveData> get() = mQueue /** The queue created by the user. */ val userQueue: LiveData> get() = mUserQueue /** The current [PlaybackMode] that also determines the queue */ val mode: LiveData get() = mMode - /** Whether the playback is paused or played. */ + val isPlaying: LiveData get() = mIsPlaying - /** Whether the queue is shuffled or not. */ val isShuffling: LiveData get() = mIsShuffling - /** The current [LoopMode] */ + /** The current repeat mode */ val loopMode: LiveData get() = mLoopMode - /** Whether the user is seeking or not */ val isSeeking: LiveData get() = mIsSeeking - /** Whether to nav to an item or not */ val navToItem: LiveData get() = mNavToItem - /** Whether the play/pause button on CompactPlaybackFragment can animate */ val canAnimate: Boolean get() = mCanAnimate /** The position as a duration string. */ diff --git a/app/src/main/java/org/oxycblt/auxio/playback/queue/QueueAdapter.kt b/app/src/main/java/org/oxycblt/auxio/playback/queue/QueueAdapter.kt index b2cbea221..076f2775a 100644 --- a/app/src/main/java/org/oxycblt/auxio/playback/queue/QueueAdapter.kt +++ b/app/src/main/java/org/oxycblt/auxio/playback/queue/QueueAdapter.kt @@ -156,7 +156,7 @@ class QueueAdapter( } /** - * Generic ViewHolder for the **user queue header**. Has the clear queue button. + * ViewHolder for the **user queue header**. Has the clear queue button. */ inner class UserQueueHeaderViewHolder( context: Context, diff --git a/app/src/main/java/org/oxycblt/auxio/playback/state/LoopMode.kt b/app/src/main/java/org/oxycblt/auxio/playback/state/LoopMode.kt index 1f071bec5..bddfd9b6b 100644 --- a/app/src/main/java/org/oxycblt/auxio/playback/state/LoopMode.kt +++ b/app/src/main/java/org/oxycblt/auxio/playback/state/LoopMode.kt @@ -1,5 +1,8 @@ package org.oxycblt.auxio.playback.state +/** + * Enum that determines the playback repeat mode. + */ enum class LoopMode { NONE, ONCE, INFINITE; diff --git a/app/src/main/java/org/oxycblt/auxio/playback/state/PlaybackStateManager.kt b/app/src/main/java/org/oxycblt/auxio/playback/state/PlaybackStateManager.kt index 01cb0285e..799e991a3 100644 --- a/app/src/main/java/org/oxycblt/auxio/playback/state/PlaybackStateManager.kt +++ b/app/src/main/java/org/oxycblt/auxio/playback/state/PlaybackStateManager.kt @@ -851,7 +851,6 @@ class PlaybackStateManager private constructor() { /** * Create an ordered queue based on an [Artist]. - * @return A list of the songs in the [Artist], ordered. */ private fun orderSongsInArtist(artist: Artist): MutableList { val final = mutableListOf() @@ -865,7 +864,6 @@ class PlaybackStateManager private constructor() { /** * Create an ordered queue based on a [Genre]. - * @return A list of the songs in the [Genre], ordered. */ private fun orderSongsInGenre(genre: Genre): MutableList { val final = mutableListOf() @@ -887,29 +885,17 @@ class PlaybackStateManager private constructor() { * remove them on destruction with [removeCallback]. */ interface Callback { - /** Called when the song updates */ fun onSongUpdate(song: Song?) {} - /** Called when the parent updates */ fun onParentUpdate(parent: BaseModel?) {} - /** Called when the position updates */ fun onPositionUpdate(position: Long) {} - /** Called when the queue updates */ fun onQueueUpdate(queue: MutableList) {} - /** Called when the user queue updates */ fun onUserQueueUpdate(userQueue: MutableList) {} - /** Called when the mode updates */ fun onModeUpdate(mode: PlaybackMode) {} - /** Called when the index updates */ fun onIndexUpdate(index: Int) {} - /** Called when the playing status changes */ fun onPlayingUpdate(isPlaying: Boolean) {} - /** Called when the shuffle status changes */ fun onShuffleUpdate(isShuffling: Boolean) {} - /** Called when the loop mode changes */ fun onLoopUpdate(mode: LoopMode) {} - /** Called when a seek is confirmed */ fun onSeekConfirm(position: Long) {} - /** Called when the restore process is finished */ fun onRestoreFinish() {} } diff --git a/app/src/main/java/org/oxycblt/auxio/songs/SongsFragment.kt b/app/src/main/java/org/oxycblt/auxio/songs/SongsFragment.kt index 01097a250..2bff2cf39 100644 --- a/app/src/main/java/org/oxycblt/auxio/songs/SongsFragment.kt +++ b/app/src/main/java/org/oxycblt/auxio/songs/SongsFragment.kt @@ -96,7 +96,7 @@ class SongsFragment : Fragment() { } /** - * Go through the fast scroller process. + * Go through the fast scroller setup process. * @param binding Binding required */ private fun setupFastScroller(binding: FragmentSongsBinding) { diff --git a/info/ADDITIONS.md b/info/ADDITIONS.md index abf3de1b1..bc182cafa 100644 --- a/info/ADDITIONS.md +++ b/info/ADDITIONS.md @@ -18,7 +18,7 @@ These will be accepted/added if I see the value in the addition of those options ## Feature Additions and UI Changes -These are far less likely to be accepted/added. As I said, I want to avoid Auxio from becoming overly bloated with features I do not use, and therefore **I will only accept features/UI changes that directly benefit my own usage.** If they do not, then I will reject/ignore them. +These are far less likely to be accepted/added. As I said, I want to avoid Auxio from becoming overly bloated with features I do not use, and therefore **I will only accept features/UI changes that directly benefit my own usage.** If they do not, then I will reject/ignore them. This does not rule out certain additions, but I am generally less likely to accept these kinds of requests. Feel free to fork Auxio to add your own features however.