CommunityToolkit / CommunityToolkit/Maui
[BUG] Snackbar vertical size and top location are different on iOS and Android
- Dominant language
- C#
- Stars
- 2.7k
- Forks
- 500
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 7
Description
### Is there an existing issue for this?
- [x] I have searched the existing issues
### Did you read the "Reporting a bug" section on Contributing file?
- [x] I have read the "Reporting a bug" section on Contributing file: https://github.com/CommunityToolkit/Maui/blob/main/CONTRIBUTING.md#reporting-a-bug
### Current Behavior
Previously, snackbar was fixed to equalize the horizontal dimensions on iOS and Android in here: #1901
When the snackbar hosts content (message) that spans about half the vertical space of the screen, I observe inconsistencies in its vertical size and its top-start positioning. The snackbar does not maintain a consistent layout compared to when it hosts smaller content. Additionally, the behavior appears to vary depending on the version of the CommunityToolkit in use. Specific version details are included in the attached screenshots.
The images indicate if the snackbar IS or IS NOT EXPLICETELY anchored to the label in the left lover corner (red label). The snackbar does render differently (top-start position) based on whether it is explicitly anchored to a view.
### Expected Behavior
The snackbar should maintain a consistent vertical size and start position, regardless of the content size or the version of the CommunityToolkit. The preferred behavior is to display as much of the vertical content as the vertical space of the screen allows instead of arbitrary truncating the height of the snackbar.








### Steps To Reproduce
The images indicate if the snackbar was or was not explicitly anchored to the label in the left lover corner (red label)
1) Open and run project referenced here
2) Target different platforms - iOS and Android while changing:
a) size of the snackbar message in code
b) CommunityToolkit version
### Link to public reproduction project repository
https://github.com/MichaelShapiro/MauiBugs/tree/master/SnackbarBug
### Environment
```markdown
- .NET MAUI CommunityToolkit: 9.0.1, 11.0.0, 11.1.1, 11.2.0,
- OS: iOS, Android
- .NET MAUI: 9.0.60
```
### Anything else?
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.