jwstegemann / fritz2

Easily build reactive web-apps in Kotlin based on flows and coroutines.
https://www.fritz2.dev
MIT License
653 stars 28 forks source link

Rename `classes` utility function to `joinClasses` in order to reduce naming confusion #859

Closed haukesomm closed 5 months ago

haukesomm commented 5 months ago

This PR adds a new joinClasses function to replace the current classes function in order to minimize naming confusion. The classes function gets deprecated.

Motivation

The current name was meant to be short, but as it seems quite often it competes with parameters having the same name, which are passed in from higher call sites. This might look confusing:

classes(classes, "... some local added classes", ...)

Migration

Use the added joinClasses function over the now deprecated classes function. This can be done automatically via IntelliJ.

Ideally, optimize your imports after replacing the respective calls.

Closes #828