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: add wrap with observer assist #949

Merged
merged 9 commits into from
Dec 27, 2023
Merged

Conversation

amondnet
Copy link
Collaborator

@amondnet amondnet commented Oct 28, 2023

Describe the changes proposed in this Pull Request.

If the PR fixes a specific issue, reference the issue with Fixes #.

wrap_with_observer


Pull Request Checklist

  • If the changes are being made to code, ensure the version in pubspec.yaml is updated.
  • Increment the major/minor/patch/patch-count, depending on the complexity of change
  • Add the necessary unit tests to ensure the coverage does not drop
  • Update the Changelog to include all changes made in this PR, organized by version
  • Run the melos run set_version command from the root directory
  • Include the necessary reviewers for the PR
  • Update the docs if there are any API changes or additions to functionality

@codecov
Copy link

codecov bot commented Oct 28, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (827bb5d) 99.00% compared to head (27a6bd1) 99.00%.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #949   +/-   ##
=======================================
  Coverage   99.00%   99.00%           
=======================================
  Files          57       57           
  Lines        2006     2006           
=======================================
  Hits         1986     1986           
  Misses         20       20           
Flag Coverage Δ
flutter_mobx 100.00% <ø> (ø)
mobx 98.56% <ø> (ø)
mobx_codegen 100.00% <ø> (ø)
mobx_lint ∅ <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 827bb5d...27a6bd1. Read the comment docs.

mobx_lint/pubspec.yaml Outdated Show resolved Hide resolved
@pavanpodila
Copy link
Member

Looks like a cool addition. We could do a lot more with this I think. A few ideas:

  1. Flag Observers that don't have an observable in the builder?
  2. Add reaction in the initState of a StatefulWidget with proper dispose
  3. Generate stubs for wrapping an observable mutation to happen inside a runInAction()

@amondnet amondnet added this to the mobx_lint-1.0.0 milestone Nov 2, 2023
@amondnet amondnet added the enhancement New feature or request label Nov 2, 2023
@subzero911
Copy link
Contributor

subzero911 commented Nov 7, 2023

image

Already exists in flutter_mobx VsCode extension.
But! it fails on some very large pieces of code: Flutterando/flutter_mobx_extension#17

mobx_lint/pubspec.yaml Show resolved Hide resolved
Copy link

netlify bot commented Nov 25, 2023

👷 Deploy request for mobx pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 27a6bd1

@@ -0,0 +1,52 @@
mobx_lint is a developer tool for users of mobx, designed to help stop common issues and simplify repetitive tasks.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should mention this in the docs as well so folks can see it easily on the website ... perhaps it can be a separate PR

@pavanpodila pavanpodila merged commit 60f07a0 into mobxjs:main Dec 27, 2023
10 checks passed
@pavanpodila
Copy link
Member

Hi @amondnet, can we move this package under the mobx publisher ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants