Travis Griggs11/06/2023, 9:02 PM
) or 2) xyxAction (e.g.
). Is there any convention (published or not) for how others tend to name these? I feel like I should pick and stick with one or the other. Vote 1️⃣ for the first, and 2️⃣ for the second. Or answer a third type :D
Zach Klippenstein (he/him) [MOD]11/06/2023, 9:11 PM
Francesc11/06/2023, 9:13 PM
as opposed to
Travis Griggs11/06/2023, 9:13 PM
Francesc11/06/2023, 9:15 PM
Travis Griggs11/06/2023, 9:21 PM
? Or are other prepositions admissable? For example, I have a
currently, changing that to
makes a little less sense (to me) than
Francesc11/06/2023, 9:28 PM
Travis Griggs11/06/2023, 9:30 PM
Chris Fillmore11/07/2023, 12:19 AM
Stylianos Gakis11/08/2023, 2:32 PM
. Like we got a chat feature, and often I name that
and it feels quite natural. But seeing this thread it does make me wonder that maybe I should just go ahead and start using
navigateToChat: () -> Unit
. Consistency is a good thing in general, but I haven’t convinced myself yet 😄
onNavigateToChat: () -> Unit
, which proves that I am undecided for no reason I think 😄
Marcin Wisniowski11/09/2023, 12:35 PM
telling the ViewModel what event happened vs telling the ViewModel what to do
Stylianos Gakis11/09/2023, 12:39 PM
but then good luck understanding 5 composables down what the button click even means.
Marcin Wisniowski11/09/2023, 12:43 PM
but then good luck understanding 5 composables down what the button click even means. That sounds like a good thing. When I reuse the Composable later and the button does something else, or change the behaviour so it navigates to a confirmation screen instead of sending the request, then that’s all details that the Composable doesn’t need to know about. At that level of abstraction the submit button was clicked, what happens due to that is not it’s concern.
Stylianos Gakis11/09/2023, 12:44 PM
. The screen-specific composable, which is
and won’t be used anywhere else, which has a hard-coded svg icon which is of a chat, will never do anything else 😄
Marcin Wisniowski11/09/2023, 12:44 PM
Stylianos Gakis11/09/2023, 12:46 PM
Maybe your user needs to log in to be able to use the chat feature, and so the chat button actually navigates to the login screen, etc.That’s solved on a different place anyway. The navigation to chat would happen, then the chat would figure out that they are logged out, and do the proper navigation. Just like a deep link to the chat would function the same exact way.
Marcin Wisniowski11/09/2023, 12:47 PM
That’s solved on a different place anyway.Sure, I don’t question the naming works perfectly fine for you, just thinking about some what ifs that make me use the naming I use.
Stylianos Gakis11/09/2023, 12:49 PM
Marcin Wisniowski11/09/2023, 12:52 PM
Stylianos Gakis11/09/2023, 12:56 PM
, the indirection of naming them
and then wondering what it does really has been a net negative in my experience.
Marcin Wisniowski11/09/2023, 1:00 PM