Skip to content

feat: Snackbar support for any children#3412

Merged
lukewalczak merged 4 commits intomainfrom
feat/snackbar-with-icon
Oct 17, 2022
Merged

feat: Snackbar support for any children#3412
lukewalczak merged 4 commits intomainfrom
feat/snackbar-with-icon

Conversation

@hurali97
Copy link
Copy Markdown
Member

@hurali97 hurali97 commented Oct 12, 2022

Summary

This PR adds support to snackbar to allow laying out it's non-text children gracefully, without overflowing the view. This effort fixes #3360.

Web web
Android android
iOS ios

Discussion:

With introducing these changes, we get the desired results without breaking the previous functionality. However, the text overflows behind the Undo button due to the icon view in snackbar.

This can be handled by the users by configuring the text styles like so:

text: { 
    ...other properties,
    flexWrap: 'wrap',
    flexShrink: 1 
}

Test plan

Unit test coverage and tested on Web, Android & iOS. (screenshots above)

@github-actions
Copy link
Copy Markdown

The mobile version of example app from this branch is ready! You can see it here

.

@hurali97 hurali97 force-pushed the feat/snackbar-with-icon branch from a278aa4 to 92a30cd Compare October 13, 2022 13:23
@github-actions
Copy link
Copy Markdown

The mobile version of example app from this branch is ready! You can see it here

.

@callstack-bot
Copy link
Copy Markdown

callstack-bot commented Oct 13, 2022

Hey @hurali97, thank you for your pull request 🤗. The documentation from this branch can be viewed here.

@lukewalczak lukewalczak changed the title feat: snackbar support for any children feat: Snackbar support for any children Oct 17, 2022
@hurali97 hurali97 force-pushed the feat/snackbar-with-icon branch from 278366d to 92a30cd Compare October 17, 2022 09:55
@github-actions
Copy link
Copy Markdown

The mobile version of example app from this branch is ready! You can see it here

.

@lukewalczak lukewalczak merged commit ff56bec into main Oct 17, 2022
@lukewalczak lukewalczak deleted the feat/snackbar-with-icon branch October 17, 2022 10:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Snackbar dosent wrap long text to multiline, if children is a view with icon + text

3 participants