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

[Chips] Add MDCChipField snapshot test to show placeholder width is being miscalculated #9847

Conversation

bryanoltman
Copy link
Contributor

Adds a snapshot test to demonstrate #9846

@material-automation
Copy link

material-automation commented Mar 5, 2020

bazel detected changes to the following targets:

//components/Chips:snapshot_tests
//components/Chips:snapshot_tests_test_bundle

@@ -108,6 +108,21 @@ - (void)testTextFieldWithZeroMinimumWidthIsOnSameLineAsWideChips {
[self snapshotVerifyView:self.chipField];
}

- (void)testEmptyPlaceholderSizeDoesNotAccountForContentInsets {
Copy link
Contributor

Choose a reason for hiding this comment

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

Will this test title be accurate once the issue is fixed? I'd expect this test to eventually be "testEmptyPlaceholderSizeAccountsForContentInsets"; may be better to have the right name with the wrong screenshot so that when you fix it the screenshot matches the name.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep! Right now, this title is inaccurate and is exposing a bug. An empty placeholder should not account for insets in its requested size, but should only require the minimum hit target size. A PR to fix this will be published immediately after this one lands :)

@bryanoltman bryanoltman merged commit 992d235 into material-components:develop Mar 5, 2020
@bryanoltman bryanoltman deleted the MDCChipField-placeholder-insets branch March 5, 2020 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants