[Closed] Should the Properties of Snackbar
be Immutable?
#284
Closed
TheCodeTraveler
started this conversation in
General
Replies: 2 comments 1 reply
-
@brminnick I believe that we can resolve this discussion already, we're on 🔥 |
Beta Was this translation helpful? Give feedback.
1 reply
-
Closed as answered. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Current Situation
Currently, the Properties in
Snackbar
are mutable.I.e., a dev can change
Snackbar.Text
after initializingSnackbar
:Problem
However, if a
Snackbar
is currently displayed, changing the value of its properties, e.g.Snackbar.Text = "New Text";
, does not update the displayed Snackbar; the new text will only be displayed onceSnackbar.Show()
is called again.This is different from the behavior of
ILabel
, for example;Label.Text
updates on screen immediately when a dev changes its value.Proposal
I propose that we make
Snackbar
properties immutable before we promoteCommunityToolkit.Maui
from preview to stable.After we debut the first Stable Release of
CommunityToolkit.Maui
, we can always makeSnackbar
mutable without breaking changes. However, if we releaseSnackbar
with mutable properties, changing it to be immutable will be a breaking change.Beta Was this translation helpful? Give feedback.
All reactions