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: shadcn_flutter based UI #2288

Merged
merged 81 commits into from
Jan 30, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
5ad1519
feat: initial integration of shadcn-ui
KRTirtho Dec 21, 2024
e73d2d0
refactor: use shadcn NavigationBar for mobile navigation bar
KRTirtho Dec 21, 2024
fe2f0a3
refactor: use NavigationSidebar and NavigationRail for desktop sidebar
KRTirtho Dec 21, 2024
04190f2
refactor: use DropdownMenu for adaptive pop sheet list, shadcn widget…
KRTirtho Dec 21, 2024
2488da2
refactor: bottom player border, player queue using shadcn drawer
KRTirtho Dec 21, 2024
1089e90
refactor: use shadcn CardImage for playbutton card
KRTirtho Dec 21, 2024
fcefce4
refactor: titlebar to use shadcn appbar and library tabs to use shadc…
KRTirtho Dec 21, 2024
f80ea32
refactor: use Appbar titlebar throughout the app
KRTirtho Dec 21, 2024
2925dd6
refactor: library page filter fields and update home sections
KRTirtho Dec 21, 2024
418a0d2
refactor: artist card to use shadcn card
KRTirtho Dec 21, 2024
7ee071f
refactor: connected device button
KRTirtho Dec 21, 2024
2fefd65
refactor: settings using shadcn components
KRTirtho Dec 22, 2024
05d544f
refactor: update FriendItem and HorizontalPlaybuttonCardView styles, …
KRTirtho Dec 22, 2024
a6720d5
feat: grid/list customizable playbutton view
KRTirtho Dec 22, 2024
b09263d
chore: fix queue close causing exceptions
KRTirtho Dec 22, 2024
b40c0b7
chore: use latest shadcn
KRTirtho Dec 22, 2024
db3aaa4
chore: upgrade to flutter 3.27.1
KRTirtho Dec 23, 2024
e2143a0
chore: fix android build and player controls slider layout builder ex…
KRTirtho Dec 24, 2024
ced85d3
chore: fix scaling issue in android and status bar being black
KRTirtho Dec 24, 2024
d53782d
refactor: playlist and album pages
KRTirtho Dec 28, 2024
2ee0ca4
refactor: profile page to use shadcn design
KRTirtho Dec 28, 2024
d845180
fix: mobile keyboard overflow
KRTirtho Dec 28, 2024
b558cc1
fix: SafeArea for global bottom items not working
KRTirtho Dec 28, 2024
047eccf
fix: SafeArea not working for bottom floating widgets
KRTirtho Dec 29, 2024
684e595
refactor: use shadcn widgets for create playlist and add tracks to pl…
KRTirtho Dec 29, 2024
f96b5ea
refactor: floating player to use shadcn
KRTirtho Jan 3, 2025
30e0378
refactor: alternative track sheet to use shadcn
KRTirtho Jan 3, 2025
780f5de
cd: upgrade flutter version to 3.28.0-0.1.pre
KRTirtho Jan 4, 2025
af295be
refactor: remote playback page to shadcn
KRTirtho Jan 4, 2025
bbad701
refactor: dialogs to shadcn dialog
KRTirtho Jan 5, 2025
4afe0cc
refactor: artist page
KRTirtho Jan 5, 2025
b8f2495
refactor: user local library
KRTirtho Jan 5, 2025
dd0bb01
refactor: generate playlist to shadcn
KRTirtho Jan 5, 2025
b734985
refactor: track page
KRTirtho Jan 5, 2025
dff8fe2
chore: fix alternative source list item theme inconsistency
KRTirtho Jan 5, 2025
e6408cc
refactor: genre home section
KRTirtho Jan 5, 2025
6dd9b75
refactor: migrate stats to shadcn
KRTirtho Jan 6, 2025
bf94a49
refactor: genres section
KRTirtho Jan 6, 2025
4685254
refactor: add genre carousel buttons and indicators
KRTirtho Jan 6, 2025
3ffcb48
chore: improve carousel performance
KRTirtho Jan 6, 2025
e54a646
refactor: downloads page to shadcn
KRTirtho Jan 8, 2025
8890609
refactor: use shadcn for TrackTile
KRTirtho Jan 8, 2025
2daea2b
chore: make genre carousel items better in light mode
KRTirtho Jan 10, 2025
5a14f58
chore: titlebar buttons not working
KRTirtho Jan 10, 2025
b25ae33
feat: flag to hide spotify generated images with patterns
KRTirtho Jan 10, 2025
a8694a7
refactor: blacklist and about page
KRTirtho Jan 11, 2025
b8ffb9b
feat: show placeholder images where there is no item or on empty page
KRTirtho Jan 12, 2025
3649b67
refactor: use undraw for not_found component
KRTirtho Jan 12, 2025
5930c34
chore: fix window resizing
KRTirtho Jan 12, 2025
696875e
chore: use youtube_explode from github
KRTirtho Jan 12, 2025
6c00559
refactor: color scheme support based on shadcn colors
KRTirtho Jan 16, 2025
e470f50
chore: remove xmas background from glance widget
KRTirtho Jan 19, 2025
74a328e
refactor: logs page to shadcn
KRTirtho Jan 19, 2025
086107b
refactor: adaptive list tile to use shadcn
KRTirtho Jan 20, 2025
4fead5f
feat: pause playback when no internet connection
KRTirtho Jan 20, 2025
2411f46
fix: youtube video unplayable issue and use more ytClients
KRTirtho Jan 21, 2025
6e35723
refactor: use expanded sidebar tiles for library
KRTirtho Jan 23, 2025
082f711
chore: use angle
KRTirtho Jan 23, 2025
768bab8
chore: settings popup menu constraints
KRTirtho Jan 23, 2025
0aee8b3
cd: use upload-artifact v4
KRTirtho Jan 23, 2025
343198a
cd: use individual artifacts
KRTirtho Jan 24, 2025
becba89
cd: artifact name need to be specified
KRTirtho Jan 24, 2025
85ebaf6
cd: use new hosted github runners
KRTirtho Jan 24, 2025
1937b1b
cd: use default caching key
KRTirtho Jan 24, 2025
b7bb35d
cd: upgrade flutter action
KRTirtho Jan 24, 2025
15773e1
cd: use alternative flutter action setup action
KRTirtho Jan 24, 2025
ed1f4ad
cd: use cache less Flutter SDK
KRTirtho Jan 24, 2025
219ae9d
cd: use git source for flutter action
KRTirtho Jan 24, 2025
b2b38a9
cd: use git source for flutter action
KRTirtho Jan 24, 2025
ee95b3b
chore: fix build cli argument access
KRTirtho Jan 24, 2025
e05645c
cd: enable caching for Flutter SDK in release workflow
KRTirtho Jan 24, 2025
697ba1e
cd: sha and md5 sum error
KRTirtho Jan 24, 2025
8c0a473
cd: artifact nested directory glob
KRTirtho Jan 24, 2025
75e1893
cd: update workflow and build command for Ubuntu 22.04 compatibility
KRTirtho Jan 24, 2025
4e8a50e
chore: fix logs not showing up and nightly crashing on track change o…
KRTirtho Jan 26, 2025
4c37184
chore: local library not working
KRTirtho Jan 26, 2025
5c6cb77
chore: fix where loading images not working
KRTirtho Jan 28, 2025
42158a9
refactor: use shadcn for mini lyrics window
KRTirtho Jan 28, 2025
ada0ca1
chore: remove obsolete appearance customization
KRTirtho Jan 28, 2025
e0760e6
chore: fix linux resizing blocking scrollbar
KRTirtho Jan 30, 2025
6cf4ca9
chore: use shadcn in all places that's using material
KRTirtho Jan 30, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ LASTFM_API_SECRET=$LASTFM_API_SECRET
RELEASE_CHANNEL=$RELEASE_CHANNEL

HIDE_DONATIONS=$HIDE_DONATIONS
DISABLE_SPOTIFY_IMAGES=$DISABLE_SPOTIFY_IMAGES
2 changes: 1 addition & 1 deletion .fvm/fvm_config.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"flutterSdkVersion": "3.27.0"
"flutterSdkVersion": "3.27.3"
}
2 changes: 1 addition & 1 deletion .fvmrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"flutter": "3.27.0",
"flutter": "3.27.3",
"flavors": {}
}
76 changes: 37 additions & 39 deletions .github/workflows/spotube-release-binary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ on:
description: Dry run without uploading to release

env:
FLUTTER_VERSION: 3.27.0
FLUTTER_VERSION: 3.27.3
FLUTTER_CHANNEL: master

permissions:
contents: write
Expand All @@ -30,44 +31,52 @@ jobs:
strategy:
matrix:
include:
- os: ubuntu-latest
- os: ubuntu-22.04
platform: linux
arch: x86
files: |
dist/Spotube-linux-x86_64.deb
dist/Spotube-linux-x86_64.rpm
dist/spotube-linux-*-x86_64.tar.xz
- os: ubuntu-latest
platform: linux_arm
- os: ubuntu-22.04-arm
platform: linux
arch: arm64
files: |
dist/Spotube-linux-aarch64.deb
dist/spotube-linux-*-aarch64.tar.xz
- os: ubuntu-latest
- os: ubuntu-22.04
platform: android
arch: all
files: |
build/Spotube-android-all-arch.apk
build/Spotube-playstore-all-arch.aab
- os: windows-latest
platform: windows
arch: x86
files: |
dist/Spotube-windows-x86_64.nupkg
dist/Spotube-windows-x86_64-setup.exe
- os: macos-latest
platform: ios
arch: all
files: |
Spotube-iOS.ipa
- os: macos-14
platform: macos
arch: all
files: |
build/Spotube-macos-universal.dmg
build/Spotube-macos-universal.pkg
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2.12.0
- uses: subosito/flutter-action@v2.18.0
with:
cache: true
cache-key: ${{ runner.os }}-flutter-${{ hashFiles('**/pubspec.yaml') }}
flutter-version: ${{ env.FLUTTER_VERSION }}
channel: ${{ env.FLUTTER_CHANNEL }}
cache: true
git-source: https://github.com/flutter/flutter.git

- name: Setup Java
if: ${{matrix.platform == 'android'}}
uses: actions/setup-java@v4
Expand All @@ -76,14 +85,8 @@ jobs:
java-version: '17'
cache: 'gradle'
check-latest: true
- name: Set up QEMU
if: ${{matrix.platform == 'linux_arm'}}
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
if: ${{matrix.platform == 'linux_arm'}}
uses: docker/setup-buildx-action@v3

- name: Setup Rust toolchain
if: ${{matrix.platform != 'linux_arm'}}
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
Expand All @@ -105,28 +108,16 @@ jobs:
echo '${{ secrets.KEYSTORE }}' | base64 --decode > android/app/upload-keystore.jks
echo '${{ secrets.KEY_PROPERTIES }}' > android/key.properties

- name: Unessary hosted tools
if: ${{matrix.platform == 'linux_arm'}}
uses: jlumbroso/free-disk-space@main
with:
tool-cache: false
swap-storage: false
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: true

- name: Build ${{matrix.platform}} binaries
run: dart cli/cli.dart build ${{matrix.platform}}
run: dart cli/cli.dart build --arch=${{matrix.arch}} ${{matrix.platform}}
env:
CHANNEL: ${{inputs.channel}}
DOTENV: ${{secrets.DOTENV_RELEASE}}

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
if-no-files-found: error
name: Spotube-Release-Binaries
name: ${{matrix.platform}}-${{matrix.arch}}
path: ${{matrix.files}}

- name: Debug With SSH When fails
Expand All @@ -136,14 +127,13 @@ jobs:
limit-access-to-actor: true

upload:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs:
- build_platform
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: Spotube-Release-Binaries
path: ./Spotube-Release-Binaries

- name: Install dependencies
Expand All @@ -152,18 +142,19 @@ jobs:
- name: Generate Checksums
run: |
tree .
md5sum Spotube-Release-Binaries/* >> RELEASE.md5sum
sha256sum Spotube-Release-Binaries/* >> RELEASE.sha256sum
find Spotube-Release-Binaries -type f -exec md5sum {} \; >> RELEASE.md5sum
find Spotube-Release-Binaries -type f -exec sha256sum {} \; >> RELEASE.sha256sum
sed -i 's|Spotube-Release-Binaries/.*/\([^/]*\)$|\1|' RELEASE.sha256sum RELEASE.md5sum
sed -i 's|Spotube-Release-Binaries/||' RELEASE.sha256sum RELEASE.md5sum

- name: Extract pubspec version
run: |
echo "PUBSPEC_VERSION=$(grep -oP 'version:\s*\K[^+]+(?=\+)' pubspec.yaml)" >> $GITHUB_ENV

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
if-no-files-found: error
name: Spotube-Release-Binaries
name: sums
path: |
RELEASE.md5sum
RELEASE.sha256sum
Expand All @@ -178,7 +169,7 @@ jobs:
omitNameDuringUpdate: true
omitPrereleaseDuringUpdate: true
allowUpdates: true
artifacts: Spotube-Release-Binaries/*,RELEASE.sha256sum,RELEASE.md5sum
artifacts: Spotube-Release-Binaries/**/*,RELEASE.sha256sum,RELEASE.md5sum

- name: Upload Release Binaries (nightly)
if: ${{ !inputs.dry_run && inputs.channel == 'nightly' }}
Expand All @@ -190,9 +181,16 @@ jobs:
omitNameDuringUpdate: true
omitPrereleaseDuringUpdate: true
allowUpdates: true
artifacts: Spotube-Release-Binaries/*,RELEASE.sha256sum,RELEASE.md5sum
artifacts: Spotube-Release-Binaries/**/*,RELEASE.sha256sum,RELEASE.md5sum
body: |
Build Number: ${{github.run_number}}

Nightly release includes newest features but may contain bugs
It is preferred to use the stable version unless you know what you're doing

- name: Debug With SSH When fails
if: ${{ failure() && inputs.debug && inputs.channel == 'nightly' }}
uses: mxschmitt/action-tmate@v3
with:
limit-access-to-actor: true

11 changes: 11 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,17 @@
"request": "launch",
"program": "lib/main.dart",
"flutterMode": "release"
},
{
"name": "spotube (mobile) (release)",
"type": "dart",
"request": "launch",
"program": "lib/main.dart",
"flutterMode": "release",
"args": [
"--flavor",
"dev"
]
}
],
"compounds": []
Expand Down
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"RGBO",
"riverpod",
"Scrobblenaut",
"shadcn",
"skeletonizer",
"songlink",
"speechiness",
Expand All @@ -27,5 +28,5 @@
"README.md": "LICENSE,CODE_OF_CONDUCT.md,CONTRIBUTING.md,SECURITY.md,CONTRIBUTION.md,CHANGELOG.md,PRIVACY_POLICY.md",
"*.dart": "${capture}.g.dart,${capture}.freezed.dart"
},
"dart.flutterSdkPath": ".fvm/versions/3.27.0"
"dart.flutterSdkPath": ".fvm/versions/3.27.3"
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package oss.krtirtho.spotube.glance

import HomeWidgetGlanceState
import HomeWidgetGlanceStateDefinition
import android.R
import android.content.Context
import android.graphics.drawable.Icon
import android.net.Uri
Expand Down Expand Up @@ -119,16 +120,6 @@ class HomePlayerWidget : GlanceAppWidget() {
}
,
) {
Image(
provider = FlutterAssetImageProvider(
context,
"assets/backgrounds/xmas-effect.png"
),
contentDescription = "Background",
modifier = GlanceModifier
.fillMaxSize(),
contentScale = ContentScale.Crop
)
Box(
modifier = GlanceModifier
.background(
Expand Down
27 changes: 27 additions & 0 deletions android/app/src/nightly/res/drawable/ic_launcher_monochrome.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="762"
android:viewportHeight="762">
<path
android:pathData="M309.08,370.99L309.08,479.87C309.08,486.36 314.33,491.6 320.83,491.6C327.31,491.6 332.58,486.36 332.58,479.87L332.58,370.99C332.58,364.51 327.31,359.26 320.83,359.26C314.33,359.26 309.08,364.51 309.08,370.99Z"
android:strokeLineJoin="miter"
android:strokeWidth="14"
android:fillColor="#00000000"
android:strokeColor="#000000"
android:strokeLineCap="butt"/>
<path
android:pathData="M254.59,491.73L280.46,491.73L280.46,362.47C280.53,361.85 280.64,361.23 280.64,360.6C280.64,304.83 325.72,259.46 381.12,259.46C436.51,259.46 481.59,304.83 481.59,360.6C481.59,361.45 481.71,362.27 481.84,363.1L481.84,491.73L507.71,491.73C525.72,491.73 540.33,476.65 540.33,458.03L540.33,390.62C540.33,375.26 530.37,362.33 516.78,358.26C515.53,284.17 455.17,224.26 381.12,224.26C307.05,224.26 246.69,284.18 245.45,358.29C231.88,362.36 221.96,375.29 221.96,390.63L221.96,458.03C221.96,476.64 236.56,491.73 254.59,491.73Z"
android:strokeLineJoin="miter"
android:strokeWidth="20"
android:fillColor="#00000000"
android:strokeColor="#000000"
android:strokeLineCap="butt"/>
<path
android:pathData="M431.08,370.99L431.08,479.87C431.08,486.36 436.33,491.6 442.83,491.6C449.31,491.6 454.58,486.36 454.58,479.87L454.58,370.99C454.58,364.51 449.31,359.26 442.83,359.26C436.33,359.26 431.08,364.51 431.08,370.99Z"
android:strokeLineJoin="miter"
android:strokeWidth="14"
android:fillColor="#00000000"
android:strokeColor="#000000"
android:strokeLineCap="butt"/>
</vector>
11 changes: 4 additions & 7 deletions android/app/src/nightly/res/mipmap-anydpi-v26/ic_launcher.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground>
<inset
android:drawable="@drawable/ic_launcher_foreground"
android:inset="16%" />
</foreground>
</adaptive-icon>
<background android:drawable="@color/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
<monochrome android:drawable="@drawable/ic_launcher_monochrome" />
</adaptive-icon>
Binary file added assets/patterns/black_white_visualized.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/patterns/brazil_carnival.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/patterns/cotton_balls.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/patterns/cute_worms.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/patterns/flash_cross_axis.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/patterns/memphis_shapes.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/patterns/oval_gloomy.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/patterns/oval_sunny.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/patterns/red_nimbuses.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/patterns/tree_bark.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/patterns/vibrant_pentagons.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/patterns/wiring_pattern.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/patterns/zigzags_gloomy.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/patterns/zigzags_sunny.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 6 additions & 2 deletions cli/commands/build.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import 'package:args/command_runner.dart';
import 'build/android.dart';
import 'build/ios.dart';
import 'build/linux.dart';
import 'build/linux_arm.dart';
import 'build/macos.dart';
import 'build/windows.dart';

Expand All @@ -18,8 +17,13 @@ class BuildCommand extends Command {
addSubcommand(AndroidBuildCommand());
addSubcommand(IosBuildCommand());
addSubcommand(LinuxBuildCommand());
addSubcommand(LinuxArmBuildCommand());
addSubcommand(MacosBuildCommand());
addSubcommand(WindowsBuildCommand());
argParser.addOption(
"arch",
abbr: "a",
defaultsTo: "x86",
allowed: ["x86", "arm64", "all"],
);
}
}
2 changes: 2 additions & 0 deletions cli/commands/build/common.dart
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,6 @@ mixin BuildCommandCommonSteps on Command {
""",
);
}

String get architecture => parent?.argResults?.option("arch") as String;
}
Loading