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

[iOS] Updated vertical content alignment, height and toggle Visibility #6329

Merged
merged 22 commits into from
Sep 28, 2021

Conversation

jwoo-msft
Copy link
Member

@jwoo-msft jwoo-msft commented Sep 16, 2021

Related Issue

Fixed #6083, Fixed #4063, Fixed #2942, Fixed #2839, Fixed #3749

Description

Problem Description

  • UIStackView doesn't support alignment perpendicular to a distribution axis; this makes implementation of vertical content alignment difficult. The UIStackView fills the available spaces by stretching subviews. To implement the alignment, a spacer view is necessary, however, this creates few issues. Combined with toggle visibility, spacer view has to be tracked and managed along with the separator. We have to be careful about when to add a spacer as well, and setting constraints for the padding has to be updated when views change their visibility along with their intrinsic content size.

Changes Description

  • This pr adds two new modules, spacer manager and visibility manager.
  • spacer manager tracks the padding and their owner
  • spacer manager configures padding's hugging and stretch properties along with associated constraints.
  • visibility manager manages visibility changes
  • it maintains an ordered list of visible views, and the first element is the head
  • its order is maintained, and search and insertion is done via binary search.
  • when a new head view is added to and removed from the visible view list, the visibility manager does what's necessary.
  • In other cases, changing visibility is simple.

Sample Card

How Verified

How you verified the fix, including one or all of the following:

  1. new unit tests are added
  2. all scenario cards and relevant sample cards were run.

125573128-22647d17-a94e-4d83-b0b0-461c82003603

Screen Shot 2021-09-15 at 4 57 23 PM

Screen Shot 2021-09-15 at 10 44 57 PM
Screen Shot 2021-09-15 at 10 45 19 PM

Screen Shot 2021-09-15 at 10 45 42 PM
Screen Shot 2021-09-15 at 4 57 47 PM

Screen Shot 2021-09-15 at 10 41 09 PM
Screen Shot 2021-09-15 at 10 40 01 PM

Microsoft Reviewers: Open in CodeFlow

@jwoo-msft jwoo-msft requested review from almedina-ms, RebeccaAnne and paulcam206 and removed request for almedina-ms and RebeccaAnne September 16, 2021 23:05
Copy link
Contributor

@almedina-ms almedina-ms left a comment

Choose a reason for hiding this comment

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

🕐

@ghost ghost removed the Needs: Author Feedback label Sep 27, 2021
Copy link
Contributor

@almedina-ms almedina-ms left a comment

Choose a reason for hiding this comment

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

:shipit:

@jwoo-msft jwoo-msft enabled auto-merge (squash) September 28, 2021 17:43
@paulcam206 paulcam206 merged commit 0039351 into main Sep 28, 2021
@paulcam206 paulcam206 deleted the jwoo/ios-unit-test-update branch September 28, 2021 18:27
vivekvijayakrishnan added a commit to BigThinkcode/AdaptiveCards that referenced this pull request Sep 30, 2021
* Toggle input in c++/winrt! (microsoft#6303)

* Toggle input in c++/winrt!

* PR Feedback

* Fix return value

* Merge Jonwis' object model conversion into UWP (microsoft#6322)

* Merge u/jonwis/winui3 from fork

* Copy object model changes from winappsdk to uwp

* Delete winappsdk directory

* Rename WinUI3 to Uwp - everything builds

* Testing, bug fixes, and cleanup

* Fix propert_opt setter

* Version and package changes

* Remove nuget source from nuget config

* version changes

* Update package pushing readme

Co-authored-by: Jon Wiswall <jonwis@microsoft.com>
Co-authored-by: almedina-ms <35784165+almedina-ms@users.noreply.github.com>

* [Designer] Make everything accessible at high zoom levels (microsoft#6320)

* [Designer] Make small-x-dimension scenario basically work

Fixes microsoft#6263

* Tabs feedback

* Fix drag/drop and random scrolling

* Per triage, Xamarin is deprecated, so no need to hold on to this old unsupported code (microsoft#6255)

* [Shared] Add `password` `Input.Text` support (microsoft#6377)

* [Shared] Add `password` `Input.Text` support

Fixes microsoft#6340

* PR feedback

* [iOS] removed custom background color to return to system default (microsoft#6378)

* [iOS] Updated Radio Buttons / Check Boxes Contrast Ratio (microsoft#6372)

Co-authored-by: Paul Campbell <paulcam@microsoft.com>

* Set wrapping to true for accessibility fix (microsoft#6324)

Co-authored-by: Paul Campbell <paulcam@microsoft.com>

* Fix link traversal (microsoft#6317)

Co-authored-by: Paul Campbell <paulcam@microsoft.com>

* [iOS] Updated vertical content alignment, height and toggle Visibility (microsoft#6329)

* [iOS] Fixed microsoft#6219

* [iOS] adding padding support to toggle visibility

* [Padding] Update

* [iOS] work in progress

* mostly done need to refactor and update padding management code

* [iOS] refactored

* [iOS] added padding test

* refactored the padding configuration in FactSet to Padding Handler

* [iOS] Updated VerticalContentAlignment and Height

* Reverts samples card changes

* [iOS] code clean-up

* [iOS] CR update

* [iOS] CR update

* Add implementation and tests (microsoft#6406)

Co-authored-by: Paul Campbell <paulcam@microsoft.com>

* [UWP] Fix risky cast in `GenerateElementProjection()` (microsoft#6412)

* [UWP] Fix risky cast in `GenerateElementProjection()`

Fixes microsoft#6394

* Fix PR feedback

* Fix style behaviour (microsoft#6419)

Co-authored-by: Paul Campbell <paulcam@microsoft.com>

* [JS] Add Password support to Input.Text (microsoft#6407)

* Add Password to style list

* Fix comparator

* Change property implementation to contain version info in new enum value

Co-authored-by: Paul Campbell <paulcam@microsoft.com>

* [iOS] Password Masking (microsoft#6411)

* [iOS] Password implementation

* [iOS] Updated unit tests and added sample json

* Update Input.Text.PasswordStyle.json

Co-authored-by: almedina-ms <35784165+almedina-ms@users.noreply.github.com>

* [iOS] Table Horizontal Alignment Update (microsoft#6401)

* [iOS] Fixed microsoft#6219

* [iOS] adding padding support to toggle visibility

* [Padding] Update

* [iOS] work in progress

* mostly done need to refactor and update padding management code

* [iOS] refactored

* [iOS] added padding test

* refactored the padding configuration in FactSet to Padding Handler

* [iOS] Updated VerticalContentAlignment and Height

* Reverts samples card changes

* [iOS] code clean-up

* [iOS] Table Update

* [iOS] Updated Table with better Horizontal Alignment

Co-authored-by: Paul Campbell <paulcam@microsoft.com>

* [iOS/Android/UWP/Shared] Fix handling of orphaned table child elements (microsoft#6408)

* [Shared] Fix parsing of `TableRow` and `TableCell` outside of `Table`

Fixes microsoft#6393

* SWIG updates

* Fix up Android rendering

* Fix up iOS

* Fix up UWP

Co-authored-by: Paul Campbell <paulcam@paulcam-mac.local>

* Enabling blank issues for internal team use (microsoft#6445)

Co-authored-by: RebeccaAnne <rebecch@microsoft.com>
Co-authored-by: Jon Wiswall <jonwis@microsoft.com>
Co-authored-by: almedina-ms <35784165+almedina-ms@users.noreply.github.com>
Co-authored-by: Paul Campbell <paulcam@microsoft.com>
Co-authored-by: Joseph Woo <Joseph.Woo@microsoft.com>
Co-authored-by: Paul Campbell <paulcam@paulcam-mac.local>
Co-authored-by: Jonathan Miller <jonmil@microsoft.com>
michaelfarnsworth pushed a commit to michaelfarnsworth/AdaptiveCards that referenced this pull request Nov 10, 2022
microsoft#6329)

* [iOS] Fixed microsoft#6219

* [iOS] adding padding support to toggle visibility

* [Padding] Update

* [iOS] work in progress

* mostly done need to refactor and update padding management code

* [iOS] refactored

* [iOS] added padding test

* refactored the padding configuration in FactSet to Padding Handler

* [iOS] Updated VerticalContentAlignment and Height

* Reverts samples card changes

* [iOS] code clean-up

* [iOS] CR update

* [iOS] CR update
rankush pushed a commit to rankush/AdaptiveCards that referenced this pull request May 8, 2024
microsoft#6329)

* [iOS] Fixed microsoft#6219

* [iOS] adding padding support to toggle visibility

* [Padding] Update

* [iOS] work in progress

* mostly done need to refactor and update padding management code

* [iOS] refactored

* [iOS] added padding test

* refactored the padding configuration in FactSet to Padding Handler

* [iOS] Updated VerticalContentAlignment and Height

* Reverts samples card changes

* [iOS] code clean-up

* [iOS] CR update

* [iOS] CR update
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment