dwyl / app

Clear your mind. Organise your life. Ignore distractions. Focus on what matters.
http://dwyl.github.io/app/
143 stars 22 forks source link

[PR] `Bloc` code refactor #338

Closed LuchoTurtle closed 11 months ago

LuchoTurtle commented 11 months ago

closes #337

This should add Bloc dependencies (properly updated) with fully documented and tested code. People should be able to create todo items and timers locally. The web version should also be working.

Added analyzing code step on GH action as well.

LuchoTurtle commented 11 months ago

This took longer than I thought because the web counterpart was crashing upon testing. This was mainly because of how the script was being invoked within the patch_web.sh script and the patching wasn't occurring properly. Updating the dependencies in pubspec.lock fixed outdated deps and fixed this issue.

It now works properly.

image

Tests weren't initially working as well because of this dependency mismatch.

The dependencies have been updated accordingly and the pubspec.lock file has been repaired. I've also added proper comments and documentation in the source files.

LuchoTurtle commented 11 months ago

Should be reviewable/mergeable. 🆗

LuchoTurtle commented 11 months ago

Cheers for the advice @freitzzz ❤️ . It seems a bunch of these pertain to linter rules. Any set of rules you recommend that I should enable?

nelsonic commented 11 months ago

@freitzzz thanks very much for taking a look at this. 🎉 As @LuchoTurtle says, if you can give us some guidance on what Linter rules we should apply it would be great! 🙏

LuchoTurtle commented 11 months ago

Made the changes needed and updated the code. Should be reviewable now @nelsonic 👌

LuchoTurtle commented 11 months ago

Was having a bit of trouble getting the Github Action working. I was getting an error during the flutter analyze stage, as per https://stackoverflow.com/questions/68643564/flutter-analyze-works-on-local-but-fails-in-github-actions.

I've switched the machine that it runs-on to macos-latest, as per https://stackoverflow.com/questions/65827050/flutter-analyze-build-fails-in-github-action/70056450#70056450.

LuchoTurtle commented 11 months ago

This should be mergeable now 👌

nelsonic commented 11 months ago

22:16 and the house is quiet. Going to review this now. 🧑‍💻 🤞 image

nelsonic commented 11 months ago

FYI:

git pull
git checkout bloc_#337
studio .

Then in Android Studio I'm prompted to run flutter pub get and I get the following error:

/opt/homebrew/Caskroom/flutter/3.3.8/flutter/bin/flutter --no-color pub get
Running "flutter pub get" in app...
Resolving dependencies...
The current Dart SDK version is 2.19.6.

Because responsive_framework 1.1.0 requires SDK version >=3.0.0 <4.0.0 
and no versions of responsive_framework match >1.1.0 <2.0.0, 
responsive_framework ^1.1.0 is forbidden.
So, because dwyl_todo depends on responsive_framework ^1.1.0, version solving failed.
pub get failed
command: "/opt/homebrew/Caskroom/flutter/3.3.8/flutter/bin/cache/dart-sdk/bin/dart 
__deprecated_pub --directory . get --example"
pub env: {
  "FLUTTER_ROOT": "/opt/homebrew/Caskroom/flutter/3.3.8/flutter",
  "PUB_ENVIRONMENT": "flutter_cli:get",
  "PUB_CACHE": "/Users/n/.pub-cache",
}
exit code: 1

Process finished with exit code 1

Going to do the updates on my localhost now.

nelsonic commented 11 months ago

Running on Sim:

image
nelsonic commented 11 months ago

If I tap/click on the dwyl logo I get a Black Screen of Death that I cannot escape from:

https://github.com/dwyl/app/assets/194400/384d2a2e-2fe8-4861-9b62-c94092443f58

I understand that this is the Menu... 💭 But as someone new to the App, this would be an instant Quit & Delete. ✂️