Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

Conversation

@mklim
Copy link
Contributor

@mklim mklim commented Nov 22, 2019

Description

Also adds a lint to prevent undocumented DartDocs from being added in
the future.

Some of the APIs were public when they really should have been
@visibleForTesting or even private. Added some @visibleForTesting
annotations as well.

Related Issues

Fixes flutter/flutter#44399.

Checklist

Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • My PR includes unit or integration tests for all changed/updated/fixed behaviors (See Contributor Guide).
  • All existing and new tests are passing.
  • I updated/added relevant documentation (doc comments with ///).
  • The analyzer (flutter analyze) does not report any problems on my PR.
  • I read and followed the Flutter Style Guide.
  • The title of the PR starts with the name of the plugin surrounded by square brackets, e.g. [shared_preferences]
  • I updated pubspec.yaml with an appropriate new version according to the pub versioning philosophy.
  • I updated CHANGELOG.md to add a description of the change.
  • I signed the CLA.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

Does your PR require plugin users to manually update their apps to accommodate your change?

  • Yes, this is a [potentially] breaking change (please indicate a breaking change in CHANGELOG.md and increment major revision).
  • No, this is not a breaking change.

Comment on lines 73 to 75
/// This is only exposed for the unit tests. Do not rely on it, it may break
/// without warning in the future.
@visibleForTesting
@deprecated
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@collinjackson @diesersamat as far as I can tell this method isn't intended to be part of the public API, but I'm not sure if I'm misunderstanding the original intent here. From what I could tell reading through the codebase this looks like it's purely a helper method for intialize, and users of the plugin are never expected to call this on its own. I think it was originally added to help with testing. If my reading is wrong, what's the intended use case of this and calling getLaunchAction outside of initialize? It was added in #1800. if that helps.

Also adds a lint to prevent undocumented DartDocs from being added in
the future.

Some of the APIs were public when they really should have been
`@visibleForTesting` or even private. Added some `@visibleForTesting`
annotations as well.
Copy link
Contributor

@collinjackson collinjackson left a comment

Choose a reason for hiding this comment

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

lgtm with some minor nits

Co-Authored-By: Collin Jackson <jackson@google.com>
/// This is only exposed for the unit tests. Do not rely on it, it may break
/// without warning in the future.
@visibleForTesting
@deprecated
Copy link
Contributor

Choose a reason for hiding this comment

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

Since we're making a breaking change anyway (removing channel) and this is a pre-1.0 plugin I think that we can probably skip the deprecated step and just remove this from the public API.

Copy link
Contributor

@collinjackson collinjackson left a comment

Choose a reason for hiding this comment

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

This is a minor nit but IMO when we make breaking changes we should be explicit in the CHANGELOG about exactly what changed, even if we think it's unlikely to affect anyone. Something like this:

- Added missing documentation.
- **Breaking change**. `channel` and `withMethodChannel` are now `@visibleForTesting`. These methods are for plugin unit tests only and may be removed in the future.
- **Breaking change**. Removed `runLaunchAction` from public API. This method was not meant to be used by consumers of the plugin.

@mklim
Copy link
Contributor Author

mklim commented Nov 26, 2019

@collinjackson good call, updated to use your wording.

@collinjackson collinjackson self-requested a review November 26, 2019 00:43
@mklim mklim merged commit 43f14ab into flutter:master Nov 26, 2019
@mklim mklim deleted the quick_actions_polish branch November 26, 2019 17:37
sungmin-park pushed a commit to sungmin-park/flutter-plugins that referenced this pull request Dec 17, 2019
Also adds a lint to prevent undocumented DartDocs from being added in
the future.

Some of the APIs were public when they really should have been
`@visibleForTesting` or even private. Added some `@visibleForTesting`
annotations as well.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[quick_actions] Polish issues

3 participants