devtools icon indicating copy to clipboard operation
devtools copied to clipboard

Add riverpod tool

Open adsonpleal opened this issue 2 years ago • 9 comments

This PR adds support to Riverpod, the code is heavily based on the current Provider implementation. It uses provider's InstanceViewer widget to show the state values.

https://user-images.githubusercontent.com/11666470/175167035-4027eb48-7f7b-44e6-bb83-af7e8d8feaaf.mp4

The discussion about this solution can be found at riverpod's repo.

TODO: this PR is still a Draft, the tests will be added before opening it for real.

Pre-launch Checklist

  • [X] I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • [X] I read the Tree Hygiene wiki page, which explains my responsibilities.
  • [X] I read the Flutter Style Guide recently, and have followed its advice.
  • [X] I signed the CLA.
  • [ ] I listed at least one issue that this PR fixes in the description above.
  • [X] I updated/added relevant documentation (doc comments with ///).
  • [ ] I added new tests to check the change I am making, or this PR is test-exempt.
  • [ ] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

adsonpleal avatar Jun 22 '22 23:06 adsonpleal

Fyi @rrousselGit.

jacob314 avatar Jun 28 '22 17:06 jacob314

@rrousselGit Just added tests, this PR is ready to be reviewed, but as we need the riverpod one to be merged first I'll leave this one as draft for now.

adsonpleal avatar Aug 12 '22 19:08 adsonpleal

That's great, thanks for your work!

I'll try playing around with it this w-e to see.

rrousselGit avatar Aug 12 '22 19:08 rrousselGit

This is looking great to me.

Any thoughts @jacob314?

rrousselGit avatar Aug 15 '22 14:08 rrousselGit

If that's good for you, I can merge the associated PR adding dart:developer events to Riverpod, then we can remove the git dependency.

rrousselGit avatar Aug 15 '22 14:08 rrousselGit

While we're waiting for a review, it'd be great to add support for the upcoming code-generator

Fancy supporting it?

rrousselGit avatar Sep 20 '22 19:09 rrousselGit

You mean Riverpod 2.0?

adsonpleal avatar Sep 20 '22 20:09 adsonpleal

I mean the "Riverpod_generator" project in the master branch of Riverpod

rrousselGit avatar Sep 20 '22 21:09 rrousselGit

I'll take a look, if I have questions I'll talk to you.

adsonpleal avatar Sep 22 '22 11:09 adsonpleal

I'm confused why this PR is made on the devtool repository itself as riverpod has nothing to do with the dev tools.

I'd have assumed a riverpod_devtools or some extension package. Same if I want to create my own dev tool extension.

Edit: oh right, it does not support extensions yet. In any case I don't think public libraries should be accepted here, even widely used ones.

cedvdb avatar Nov 17 '22 10:11 cedvdb

Since DevTools does not yet support plugins or extensions, we're going to close this for now. DevTools plugin support is something we are hoping to work on later this year (here is an existing design proposal for this). Converting the existing package:provider screen as well as this riverpod screen to a plugin would be great first use cases to work on when plugin support is added. We will definitely reach out when this support is available. Thank you for the contribution!

kenzieschmoll avatar Mar 01 '23 17:03 kenzieschmoll

Hello @adsonpleal and @rrousselGit - now that support for DevTools extensions has officially landed, do you have interest in re-landing this PR on the riverpod repo directly as a DevTools extension? As an example, the Provider related code from DevTools was migrated to a DevTools extension in package:provider here, and published as part of 6.1.0-dev.1

@rrousselGit can you provide some guidance on which riverpod package the extension should live in (I would guess riverpod?)

kenzieschmoll avatar Oct 24 '23 19:10 kenzieschmoll

I'm already working on it :)

rrousselGit avatar Oct 25 '23 09:10 rrousselGit