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

[ShadowContainer][All Platforms] ShadowContainer not resizing properly #807

Merged
merged 4 commits into from
Sep 5, 2023

Conversation

rafael-rosa-knowcode
Copy link
Contributor

@rafael-rosa-knowcode rafael-rosa-knowcode commented Sep 4, 2023

GitHub Issue (If applicable): closes: #798

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Refactoring (no functional changes, no api changes)

What is the current behavior?

ShadowContainer is correctly stretching iwhen the content is changed to be larger but if the content is then shrunk, the ShadowContainer does not resize:

See Shadow Builder control inside of the Toolkit sample app:

shadowcontainerstretch

What is the new behavior?

Removed some commented code and conditional layout refactoring.

Now the Canvas free up allocated space so content can reduce in size.

CanvasSize.mp4

PR Checklist

Please check if your PR fulfills the following requirements:

Copy link
Contributor

@agneszitte agneszitte left a comment

Choose a reason for hiding this comment

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

Can we add some tests for this @rafael-rosa-knowcode please?

@agneszitte agneszitte marked this pull request as draft September 4, 2023 16:06
@roubachof
Copy link
Contributor

seems to be something weird happening with the positioning of the shadows when removing one (reducing size)

image

@rafael-rosa-knowcode
Copy link
Contributor Author

Related to resizing, I updated the internal logic to fit the TextBox issue as the problem seemed similar.
However, the resizing situation in calculator still happens in android.

I isolated the ItemsControl and removed the shadows from it.
And it has the same behavior as Shadows.
Can you validate that it's a failure of the ItemsControl? Well, and I'm not finding a workaround.

Works on Skia. The isolated one and the shadows.

ItemsControlSkia.mp4

But on Android does not.

ItemsControlAndroid.mp4

@rafael-rosa-knowcode
Copy link
Contributor Author

@roubachof can you validate again?

@rafael-rosa-knowcode rafael-rosa-knowcode marked this pull request as ready for review September 5, 2023 17:00
@github-actions
Copy link

github-actions bot commented Sep 5, 2023

Azure Static Web Apps: Your stage site is ready! Visit it here: https://polite-field-01aa64f0f-807.eastus2.azurestaticapps.net

@agneszitte
Copy link
Contributor

@Mergifyio backport legacy/3x release/stable/3.1

@mergify
Copy link
Contributor

mergify bot commented Sep 5, 2023

backport legacy/3x release/stable/3.1

✅ Backports have been created

@agneszitte agneszitte merged commit 42a5be8 into main Sep 5, 2023
24 checks passed
@agneszitte agneszitte deleted the dev/ramr/issue798resizing branch September 5, 2023 18:33
mergify bot pushed a commit that referenced this pull request Sep 5, 2023
#807)

Co-authored-by: Rafael Rosa <rafaelmendesrosa@gmail.com>
(cherry picked from commit 42a5be8)
mergify bot pushed a commit that referenced this pull request Sep 5, 2023
#807)

Co-authored-by: Rafael Rosa <rafaelmendesrosa@gmail.com>
(cherry picked from commit 42a5be8)
agneszitte pushed a commit that referenced this pull request Sep 5, 2023
…y (backport #807) (#820)

Co-authored-by: Rafael Rosa <rafaelmendesrosa@gmail.com>
Co-authored-by: Rafael Rosa <116665025+rafael-rosa-knowcode@users.noreply.github.com>
agneszitte pushed a commit that referenced this pull request Sep 5, 2023
…y (backport #807) (#819)

Co-authored-by: Rafael Rosa <rafaelmendesrosa@gmail.com>
Co-authored-by: Rafael Rosa <116665025+rafael-rosa-knowcode@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ShadowContainer][All Platforms] ShadowContainer not resizing properly
6 participants