Kaiteki-Fedi / Kaiteki

The comfy SNS client for everything, everywhere
https://kaiteki.app
GNU Affero General Public License v3.0
490 stars 31 forks source link

Material Design 3 (where/when possible) #141

Closed ThatOneCalculator closed 2 years ago

ThatOneCalculator commented 2 years ago

Components that are Material 3 ready should opt-in to Material Design 3 with useMaterial3.

https://api.flutter.dev/flutter/material/ThemeData/useMaterial3.html

Material 3 support in Flutter is currently in pretty early stages, but staying ahead of the curve on design can't hurt too much :)

Craftplacer commented 2 years ago

I have already tried to see what I could change to adapt Material Design 3 but as it stands, M3 seems to be way more limited in design than M2. It takes a lot of the choices you had in M2.

But I'll continue looking into it.

ThatOneCalculator commented 2 years ago

Yea, I see this as being a more down-the-road addition, as (hopefully) by the time 1.0 rolls around, there will be far more options with Material 3

Craftplacer commented 2 years ago

ColorScheme.fromSeed using Kaiteki's pink leaves a lot to be desired.

image

ThatOneCalculator commented 2 years ago

Well for fromSeed to look good, the whole UI should use it. I think Aliucord is a good example of this.

Screenshot_20220524-101622.png Screenshot_20220524-102035.png

Craftplacer commented 2 years ago

Well for fromSeed to look good, the whole UI should use it. I think Aliucord is a good example of this.

Uhh, Flutter is technically using it everywhere since the app theme propagates globally throughout the app. This nothing more than a color scheme. I also tried setting useMaterial3 to true but apparently nothing is happening.

ThatOneCalculator commented 2 years ago

When I say "everywhere", I'm also referring to the accent color and background, which will probably be easier to set once Material Design 3 is better implemented in Flutter.

Craftplacer commented 2 years ago

I found out why useMaterial3 wasn't applied, still mixed feelings though.

ThatOneCalculator commented 2 years ago

Maybe have it toggleable in settings? I actually kinda like it.

Craftplacer commented 2 years ago

Maybe have it toggleable in settings? I actually kinda like it.

The settings are broken lmao.

(I still have nobody who can properly assist me in state management and data persistence)

ThatOneCalculator commented 2 years ago

I wish I could help but I've literally never used dart or flutter before :(

For settings, maybe the key value schema could work?

https://www.raywenderlich.com/5965747-data-persistence-on-flutter

Craftplacer commented 2 years ago

I wish I could help but I've literally never used dart or flutter before :(

For settings, maybe the key value schema could work?

https://www.raywenderlich.com/5965747-data-persistence-on-flutter

I am aware of using shared_preferences to store simple data types as key-value, but it's going to suck real hard later on with more complex settings, as the code maintenance will shoot through the roof. (This is my main gripe with Flutter tutorials and apps, that they don't actually attempt to be massive)

ThatOneCalculator commented 2 years ago

Perhaps with SQLite then? Seems to be better for bigger data. For the one desktop app I've ever written (in Electron), I used key-value stores for settings but SQLite seems to makes more sense for this.

If you are writing an app that needs to persist and query large amounts of data on the local device, consider using a database instead of a local file or key-value store. In general, databases provide faster inserts, updates, and queries compared to other local persistence solutions.

https://docs.flutter.dev/cookbook/persistence/sqlite

Craftplacer commented 2 years ago

Perhaps with SQLite then? Seems to be better for bigger data.

If you are writing an app that needs to persist and query large amounts of data on the local device, consider using a database instead of a local file or key-value store. In general, databases provide faster inserts, updates, and queries compared to other local persistence solutions.

https://docs.flutter.dev/cookbook/persistence/sqlite

The problem is that we aren't aiming for storing large amounts of data, or tables. Kaiteki might store several themes, boolean flags, strings, ints, arrays of compound data, etc in the future.

ThatOneCalculator commented 2 years ago

The only thing I can think of then is key-value stores combined with some custom files for things like themes :/

Craftplacer commented 2 years ago

Sneak peek of M3