Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improves and enhances the reactive styling #823

Merged
merged 4 commits into from Dec 1, 2023

Conversation

Lysander
Copy link
Collaborator

@Lysander Lysander commented Nov 29, 2023

The description of the improved styling can be found in our documentation:

  • General Function

  • Avoid Flicker Effects

  • removes addToClasses functions. Migration: Just rename all occurrences to className.

  • substitutes the internal class name management with a MutableStateFlow based approach, where the former manages all different portions of the overall class names, so those can get merged appropriately and mounted only once into the tag's class attribute.

  • add a new className-function variant: This generic function accepts some Flow[T], which is then be used by some lamba expression to generate the class names. Additionally the calles must also provide some initial T, which is used to create the
      initial class names that gets set immediately to the DOM, without needing to wait for the flow's first value.

  • add unit tests for new className-function

  • add and adapt documentation

  • updates Playwright to version 1.40.1

@Lysander Lysander added this to the 1.0-RC13 milestone Nov 29, 2023
@Lysander Lysander self-assigned this Nov 29, 2023
@Lysander Lysander marked this pull request as draft November 30, 2023 08:04
@Lysander
Copy link
Collaborator Author

Documentation is still missing, so I reset this do draft.

@Lysander Lysander marked this pull request as ready for review November 30, 2023 13:15
@Lysander Lysander force-pushed the chausknecht/tryBetterReactiveStyling branch from 1d50c34 to 1998af2 Compare November 30, 2023 14:51
metin-kale
metin-kale previously approved these changes Nov 30, 2023
@Lysander Lysander dismissed metin-kale’s stale review December 1, 2023 08:16

The merge-base changed after approval.

@Lysander Lysander force-pushed the chausknecht/tryBetterReactiveStyling branch 3 times, most recently from 8ee4855 to 9f29db6 Compare December 1, 2023 09:19
- removes `addToClasses` functions. Migration: Just rename all occurrences to `className`.
- substitutes the internal class name management with a `MutableStateFlow` based approach,
  where the former manages all different portions of the overall class names, so those can
  get merged appropriately and mounted only once into the tag's `class` attribute.
- add a new `className`-function variant: This generic function accepts some `Flow[T]`,
  which is then be used by some lamba expression to generate the class names.
  Additionally the calles must also provide some initial `T`, which is used to create the
  initial class names that gets set immediately to the DOM, without needing to wait for
  the flow's first value.
- add unit tests for new `className`-functions
- add and adapt documentation
- updates Playwright to version 1.40.1
@Lysander Lysander force-pushed the chausknecht/tryBetterReactiveStyling branch from 9f29db6 to 8ecdcbe Compare December 1, 2023 09:27
@jamowei jamowei added the api breaking Forces client sources to change label Dec 1, 2023
@jamowei
Copy link
Collaborator

jamowei commented Dec 1, 2023

This PR is api-breaking please provide a migration guide for the release notes (addToClasses -> className)

@Lysander Lysander merged commit cb53814 into master Dec 1, 2023
2 checks passed
@Lysander Lysander deleted the chausknecht/tryBetterReactiveStyling branch December 1, 2023 15:31
EvaBS added a commit that referenced this pull request Dec 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api breaking Forces client sources to change api improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants