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

[video_player] bugfix caption still showing when text is empty #3374

Conversation

vanlooverenkoen
Copy link
Contributor

@vanlooverenkoen vanlooverenkoen commented Dec 27, 2020

Description

Caption widget will still show the dark background if the text is empty. If null it would already be hidden.

Related Issues

#Fixed flutter/flutter#72999

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 breaking change (please indicate a breaking change in CHANGELOG.md and increment major revision).
  • No, this is not a breaking change.

Copy link
Member

@Salakar Salakar left a comment

Choose a reason for hiding this comment

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

Thanks again @vanlooverenkoen - LGTM

CI failure appears to be unrelated - failed to clone flutter git repository.

cc @cyanglaz - this one is good to go

Copy link
Contributor

@russellwheatley russellwheatley left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@stuartmorgan stuartmorgan left a comment

Choose a reason for hiding this comment

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

This looks good, but needs a test. Could you add a widget test covering this case?

# Conflicts:
#	packages/video_player/video_player/CHANGELOG.md
#	packages/video_player/video_player/pubspec.yaml
# Conflicts:
#	packages/video_player/video_player/CHANGELOG.md
#	packages/video_player/video_player/pubspec.yaml
@vanlooverenkoen
Copy link
Contributor Author

build_all_plugins_ipa timedout. How can I fix that?

@vanlooverenkoen
Copy link
Contributor Author

@stuartmorgan the tests are added for this regression issue.

Copy link
Contributor

@stuartmorgan stuartmorgan left a comment

Choose a reason for hiding this comment

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

LGTM, thanks! Sorry for the delay getting back to this review.

@@ -914,11 +914,12 @@ class ClosedCaption extends StatelessWidget {
/// Creates a a new closed caption, designed to be used with
/// [VideoPlayerValue.caption].
///
/// If [text] is null, nothing will be displayed.
/// If [text] is null or empty, nothing will be displayed.
Copy link
Contributor

Choose a reason for hiding this comment

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

Ideally text should be non-nullable with a default to '' so that we don't have two ways of expressing the same thing, but unfortunately that would be a breaking change at this point.

@stuartmorgan
Copy link
Contributor

I've resolved the version bump conflicts; I expect web tests to fail here due to an infra issue we're having at the moment, in which case merging in master again tomorrow should fix it.

@stuartmorgan stuartmorgan added the waiting for tree to go green (Use "autosubmit") This PR is approved and tested, but waiting for the tree to be green to land. label Sep 15, 2021
@fluttergithubbot fluttergithubbot merged commit 5d64092 into flutter:master Sep 16, 2021
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Sep 18, 2021
@vanlooverenkoen vanlooverenkoen deleted the bugfix/#72999-caption-still-showing branch September 21, 2021 07:51
amantoux pushed a commit to amantoux/plugins that referenced this pull request Sep 27, 2021
KyleFin pushed a commit to KyleFin/plugins that referenced this pull request Dec 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes p: video_player waiting for tree to go green (Use "autosubmit") This PR is approved and tested, but waiting for the tree to be green to land.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[video_player] Caption widget is still showing even if the caption is empty.
8 participants