-
Notifications
You must be signed in to change notification settings - Fork 23
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
Config rework #318
Config rework #318
Conversation
- removed `shared/common/` - implemented new data models for the settings - implemented a new `LocalDatabaseService` Why: The new code will allow use to better utilize flutter's ractivenes. `HiveDB` (our new database backend) will give us `ValueListenable`, `Streams` and real time storage access. The sriliazation for the models is generated by `build_runner` and even the old seriliazation for the storage migration is generated (json_serializable). TODO: - implement reactivenes. We currently don't utilize this functionality to it's full potential (`Consumer`) :) - implement migration. The migration service for the old database service isn't there yet.
I've been in touch with the author of NineChess from the upstream repository, and he knows that Sanmill has evolved into a mobile app. He says he no longer maintains the NineChess project and is happy to see Sanmill continue to grow, and expects the community to continue to make the Mill app great. Now I found a way to unfork: https://stackoverflow.com/questions/18390249/github-make-fork-an-own-project and create a ticket: https://support.github.com/ticket/personal/0/1362284 |
47213ad
to
98f2362
Compare
ok never mind the migration works just fine. also when this is merged we can also nearly merge #306 |
OK I will do a test. |
I ran $ flutter build apk --debug
Running Gradle task 'assembleDebug'...
lib/models/color.dart:26:6: Error: Error when reading 'lib/models/color.g.dart': No such file or directory
part 'color.g.dart';
^
lib/services/storage/storage.dart:79:41: Error: Method not found: 'ColorSettingsAdapter'.
Hive.registerAdapter<ColorSettings>(ColorSettingsAdapter());
^^^^^^^^^^^^^^^^^^^^ |
Do I need to rebase the dev branch first? But there are a lot of conflicts between the two branches. |
Can build after merging the branch dev and is now testing. |
After launching the app, after about a few seconds, an exception appears without clicking on the screen, as follows. exception = {LateError} LateInitializationError: Field '_drawSoundId@1008306828' has already been initialized.
_stackTrace = null
_message = "Field '_drawSoundId@1008306828' has already been initialized."
fieldName = "_drawSoundId@1008306828"
LateError._throwFieldAlreadyInitialized (internal_patch.dart:211)
Audios._drawSoundId (audios.dart:47)
Audios.loadSounds (audios.dart:65)
<asynchronous gap> This problem happened by chance and has occurred 2 times so far. See #326 |
When choosing a different algorithm, the value stored in LocalDatabase doesn't feel right? Since testing whether the algorithm works is a bit tricky, I didn't try the actual validity of the different algorithms for now but just saw from the log that it doesn't seem to work as expected.
From the Status: Fixed |
I know about the problem. But that is something that got introduced by #284. I'll fix that but in a separate commit. And yes this commit depends on build_runner but as this branch was still based on master and not dev the build_runner wasn't activated in the build script. Did the migration work? |
I'll have a look |
src/ui/flutter_app/lib/screens/game_settings/game_settings_page.dart
Outdated
Show resolved
Hide resolved
Restoring the default settings now doesn't require quitting the app, which is fantastic! It would be nice to add a confirmation dialog, though. This can be left to be refined later. Status: Invalid Dynamic switching of languages does not work correctly now. Status: Pending |
Yes. |
The setting of mainToolbarBackgroundColor does not take effect. |
This is going to be done in the gen-l10n branch (#306) I already have it working over there |
I had a typo there. Might still be related to that. I'll have a look. |
There already is a confirmation dialog. |
Sorry, this is a false alarm. There is indeed a dialog box. |
The passive option is not in effect, and when the passive switch is tapped, the log prints out:
|
Every commit should work to be expected, so it is unnecessary to ensure that every branch is based on the master branch, and I suggest that this branch be rebased to the dev branch later. |
The piecesCount option is not in effect, and when the piecesCount setting is changed, the log prints out:
From the verification results of the function, it is also true that it does not take effect. Status: Fixed
|
works for me
also works for me
I see what happened there. The EDIT: |
The nMoveRule is 100. But in the following move list, less than ten moves and the game is over, which means there is also a problem with this configuration. The reason may be the same as the one you just mentioned.
Status: Fixed I've paused the test on the |
Many entries in the See #324 |
When developer mode is enabled, the original behavior of restoring default settings is disabled and is now in effect. The reason why the function of restoring default settings needs to be disabled is that in the Monkey test, it is necessary to prevent Monkey from randomly clicking on some links that lead to jumping to the web browser and cannot return to the app GUI. If the function of restoring default settings is not disabled, the default settings may be restored randomly in the Monkey test and it will turn off the developer mode, resulting in the following Monkey test appears abnormal. Status: Fixed |
Double-clicking on the big word Mill should only show the configuration items for the developer options instead of turning on developer mode by default. As stated in a post above, the reason for this is that when developer mode is enabled, some features will not respond to user taps. And the user is likely to double-click on Mill by accident, and everything that follows may make the user think that an exception has occurred. Status: Fixed |
This round of testing is complete, pending regression testing after the following code update. Hopefully, the next code round can rebase multiple branches to one line, so I don't need to merge again locally. Thanks a lot! |
For file naming, toolbar is an English word and does not need to be written as tool_bar. See #325 |
ups. My bad. |
I am not sure if these two lines can be removed from .gitignore.
See: #327 |
Okay, I will create a few issues that are not related to this change. |
ok I've done a few things:
TODO:
Yes I just started the branch before
I don't know either. I don't even know what the heck they exclude in the first place 🙃
just add them in a list to #303 or assign them to me so I'll find them easier Also for future code testings: |
98f2362
to
6a0e6bd
Compare
You can continue to use the current dev branch.
OK, I'll put it all together, I posted multiple posts before because it was like getting you a quick email alert. |
6a0e6bd
to
334367b
Compare
the developer mode stuff should be fixed (this should be everything ...) |
334367b Buglist: Unsloved:
New:
|
You've worked hard! I have regression tested the problems that appeared in the previous tests and have found two unresolved issues and one new issue as above. Please take a look. Thanks! |
another one where the engine isn't informed about changes in the DB (we should probably fund a new method of this later). Fix is coming...
seems to be there even before the commit (can't find a reference to this color anywhere in the code) probably something for a separate issue
it was like this before. I don't think that much logging is needed anyways. P.s. you don't need to ping me with more comments. I'll see it sooner or later. It just floods my inbox xD |
Confirm that this problem does not exist in git tag v1.1.38. apk: https://github.com/calcitem/Sanmill/actions/runs/1304450821
OK! |
334367b
to
67fc96c
Compare
an issue should be opened for that. the other bug should be resolved. |
67fc96c
to
fcfaa08
Compare
- make new storage reactive - add Database Migrator change how the developerMode reacts
fcfaa08
to
dc19874
Compare
DO NOT MERGE!
this is the first proposed version for the new storage backend.
You can audit and test the new code.
Currently the migration does not seem to work so I'll debug this tomorrow.
Also sorry for the PR in the other repo. GH auto selected it as we are still marked as a fork. As this project seems to independent we should probably remove the fork dependency all together.