Migrate Resonate to Feature Based MVVM with Riverpod - #839
Conversation
feat: Refactored Auth feature to Riverpod and MVVM
* fix: Fixed the state error in app prefs page * feat: Refactor Profile feature to Riverpod and MVVM * fix: fixed broken workflow --------- Co-authored-by: Madhav Gupta <114633095+M4dhav@users.noreply.github.com>
* fix: Fixed the state error in app prefs page * feat: MIGRATED ROOMS FROM GETX TO RIVERPOD * feat: Refactor Profile feature to Riverpod and MVVM * chore: regenerate code-gen outputs after merge * fix: fixed broken workflow * fix: added left localizations & subfolders for repo and service in data * fix: fixed search overlay bug and room deleation --------- Co-authored-by: Madhav Gupta <114633095+M4dhav@users.noreply.github.com>
…827) * fix: Fixed the state error in app prefs page * feat: MIGRATED ROOMS FROM GETX TO RIVERPOD * feat: Refactor Profile feature to Riverpod and MVVM * chore: regenerate code-gen outputs after merge * feat: friends migration * fix: fixed broken workflow * fix: added left localizations & subfolders for repo and service in data * fix: fixed search overlay bug and room deleation * feat: commit for untranslated.txt --------- Co-authored-by: Madhav Gupta <114633095+M4dhav@users.noreply.github.com>
…re (#829) * fix: Fixed the state error in app prefs page * feat: MIGRATED ROOMS FROM GETX TO RIVERPOD * feat: Refactor Profile feature to Riverpod and MVVM * chore: regenerate code-gen outputs after merge * feat: friends migration * fix: fixed broken workflow * fix: added left localizations & subfolders for repo and service in data * fix: fixed search overlay bug and room deleation * feat: commit for untranslated.txt * feat: initial migartion from Stories and Chapter Logic * feat: Added tests for stories and chapters * feat: added widgte tests and fixed bugs --------- Co-authored-by: Madhav Gupta <114633095+M4dhav@users.noreply.github.com>
* fix: Fixed the state error in app prefs page * feat: MIGRATED ROOMS FROM GETX TO RIVERPOD * feat: Refactor Profile feature to Riverpod and MVVM * chore: regenerate code-gen outputs after merge * feat: friends migration * fix: fixed broken workflow * fix: added left localizations & subfolders for repo and service in data * fix: fixed search overlay bug and room deleation * feat: commit for untranslated.txt * feat: initial migartion from Stories and Chapter Logic * feat: Added tests for stories and chapters * feat: added widgte tests and fixed bugs * feat: Migrated themes, snackbar and removed the Getx dependencies * fix: fixed snackbar, static sizing and live chapter bug --------- Co-authored-by: Madhav Gupta <114633095+M4dhav@users.noreply.github.com>
* fix: Fixed the state error in app prefs page * feat: MIGRATED ROOMS FROM GETX TO RIVERPOD * feat: Refactor Profile feature to Riverpod and MVVM * chore: regenerate code-gen outputs after merge * feat: friends migration * fix: fixed broken workflow * fix: added left localizations & subfolders for repo and service in data * fix: fixed search overlay bug and room deleation * feat: commit for untranslated.txt * feat: initial migartion from Stories and Chapter Logic * feat: Added tests for stories and chapters * feat: added widgte tests and fixed bugs * feat: Migrated themes, snackbar and removed the Getx dependencies * fix: fixed snackbar, static sizing and live chapter bug * feat: Added the leftover tests after complete migration --------- Co-authored-by: Madhav Gupta <114633095+M4dhav@users.noreply.github.com>
* fix: Fixed the state error in app prefs page * feat: MIGRATED ROOMS FROM GETX TO RIVERPOD * feat: Refactor Profile feature to Riverpod and MVVM * chore: regenerate code-gen outputs after merge * feat: friends migration * fix: fixed broken workflow * fix: added left localizations & subfolders for repo and service in data * fix: fixed search overlay bug and room deleation * feat: commit for untranslated.txt * feat: initial migartion from Stories and Chapter Logic * feat: Added tests for stories and chapters * feat: added widgte tests and fixed bugs * feat: Migrated themes, snackbar and removed the Getx dependencies * fix: fixed snackbar, static sizing and live chapter bug * feat: Added the leftover tests after complete migration * refactor: post migration cleanup --------- Co-authored-by: Madhav Gupta <114633095+M4dhav@users.noreply.github.com>
|
🎉 Welcome @M4dhav!
We appreciate your contribution! 🚀 |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…rop redundant GetX edits, resolve l10n)
M4dhav
left a comment
There was a problem hiding this comment.
I noticed that in some places in the implementation, A view accesses multiple ViewModels and ViewModels sometimes access each other. This is not consistent with the MVVM pattern, according to which each View should have a 1-1 relationship with ViewModels, and ViewModels should only access the Repository Layer.
Please make changes to restructure the code.
There was a problem hiding this comment.
Leave the client as a riverpod keep alive provider but for the rest of them make them static classes
There was a problem hiding this comment.
I'd recommend to keep it this way only as it'll make our life vey easy while injecting them in mocks
There was a problem hiding this comment.
Make it a static function instead of a riverpod provider
There was a problem hiding this comment.
I'd recommend to keep it this way only as mentioned above
There was a problem hiding this comment.
GetStorage isn't referenced in many places so the provider shouldn't be keepAlive
There was a problem hiding this comment.
Making an enum for this is unnecessary as we only use this list to reference pickable audio files
There was a problem hiding this comment.
This is also unnecessary similar to AudioFormat enums
There was a problem hiding this comment.
This is already present in utils
| String _placeholderIdFor(String themeName) { | ||
| switch (themeName) { | ||
| case 'amber': | ||
| return amberUserProfileImagePlaceholderID; | ||
| case 'vintage': | ||
| return vintageUserProfileImagePlaceholderID; | ||
| case 'time': | ||
| return timeUserProfileImagePlaceholderID; | ||
| case 'classic': | ||
| return classicUserProfileImagePlaceholderID; | ||
| case 'forest': | ||
| return forestUserProfileImagePlaceholderID; | ||
| case 'cream': | ||
| return creamUserProfileImagePlaceholderID; | ||
| default: | ||
| return creamUserProfileImagePlaceholderID; | ||
| } | ||
| } |
There was a problem hiding this comment.
Change themes to use an enum instead of a string
There was a problem hiding this comment.
Move the search story functionality to explore story notifier
| import 'package:resonate/utils/constants.dart'; | ||
|
|
||
| // Converts the response from the createPairChat API into the parameters needed to join a LiveKit room. | ||
| // Temporary, when the full livekit cluster is migrated, it'll be added to core |
There was a problem hiding this comment.
This comment mentions a migration which is never done
There was a problem hiding this comment.
Instead of this special mapper just add these conversions to Story's freezed model
|
@Mayank4352 Please check the review comments above. Feel free to push directly to the state_migration branch for your changes now |
|
Hey @M4dhav, Kindly review this PR |
Description
This PR merges all state migration changes to port Resonate to Riverpod by @Mayank4352
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Tests passing
Checklist:
Maintainer Checklist