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

Desktop widget representation #542

Merged

Conversation

manuel-martos
Copy link
Contributor

@manuel-martos manuel-martos commented Jul 25, 2023

Description

Create specific representation for Desktop Widget sample.

Fixes #529

Check list

  • I have updated CHANGELOG.md if required.
  • I have updated documentation if required.

Comment on lines 32 to 54
private val created: TargetUiState = TargetUiState(
rotationX = RotationX.Target(0f),
position = Position.Target(DpOffset(0.dp, height)),
scale = Scale.Target(2.5f),
alpha = Alpha.Target(0f),
zIndex = ZIndex.Target(0f),
)

private val standard: TargetUiState = TargetUiState(
rotationX = RotationX.Target(0f),
position = Position.Target(DpOffset.Zero),
scale = Scale.Target(1f),
alpha = Alpha.Target(1f),
zIndex = ZIndex.Target(0f),
)

private val destroyed: TargetUiState = TargetUiState(
rotationX = RotationX.Target(0f),
position = Position.Target(DpOffset(0.dp, -height)),
scale = Scale.Target(0.25f),
alpha = Alpha.Target(0f),
zIndex = ZIndex.Target(0f),
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose these don't affect the rendering since the widget doesn't trigger Spotlight's element state change operations, only scroll change, and then most of the UI is functional in TargetUiState::toMutableUiState? In that case we could just remove this as a red herring.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right. I'll just leave a default one inside private companion object as we still need it for toUiTargets method.

@manuel-martos manuel-martos merged commit ec1952d into bumble-tech:2.x Jul 26, 2023
5 checks passed
@manuel-martos manuel-martos deleted the desktop-widget-representation branch July 26, 2023 05:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Restore desktop sample looks
3 participants