Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fixed action set cut off issue #4058#4108

Merged
jwoo-msft merged 5 commits into
masterfrom
jwoo/ios-fix-actionset
Jun 7, 2020
Merged

Fixed action set cut off issue #4058#4108
jwoo-msft merged 5 commits into
masterfrom
jwoo/ios-fix-actionset

Conversation

@jwoo-msft

@jwoo-msft jwoo-msft commented Jun 4, 2020

Copy link
Copy Markdown
Member

Related Issue

Fixed #4058

Description

ActionsSet's intrinsic content size was not working. When container view that held button were added to UIScrollView, the container view's intrinsic content size didn't work because by the time intrinsic content size was updated to actual value after buttons are rendered, it was too late. Following modifications have been made:

  1. delayed adding the container view until the intrinsic content size is computed.
  2. added insert arranged subview at index method. by making license update #1 change, there was a negative side effect to layout. originally container view was added first, then buttons, followed by subview that is created by ShowCard Action. To preserve the original layout, the insert arranged subview at index method is added. An index is recorded, then after all views including subview is added, container view is inserted at the index.
  3. updated intrinsic content size to dynamically update its size when icons are loaded to buttons. UIKit wasn't updating the size dynamically, so code is added to update it.
  4. if buttons don't fill the space initially, and the buttons grow the container view after icons are loaded, buttons shrank. This is now fixed by dynamically updating content size of UIScroll view as button's icons are loaded.
  5. Host config's action alignment is now honored.
  6. Some minor clean-ups.
  • removed an unused variable
  • updated a custom renderer interface as interface has been updated.

How Verified

  1. cut off issue is fixed as it can be observed below.
    Simulator Screen Shot - iPhone 8 - 2020-06-03 at 20 02 03
    previously, buttons were shrunken, now buttons behave correctly even after images are loaded later
    Simulator Screen Shot - iPhone 8 - 2020-06-03 at 20 03 28

  2. existing units tests were run, and verified with all of the cards with different combinations of action alignment host config values.

Microsoft Reviewers: Open in CodeFlow

- (UIView *)render:(UIView<ACRIContentHoldingView> *)viewGroup
rootView:(ACRView *)rootView
inputs:(NSArray *)inputs
inputs:(NSMutableArray *)inputs

@shalinijoshi19 shalinijoshi19 Jun 5, 2020

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Didnt we make a similar change for 1.2.9? Was it someplace else? Was this missed then? Also is this a breaking change to the renderer interface?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

No, this is applied to sample app's custom renderer.

@shalinijoshi19

Copy link
Copy Markdown

/azp run

@azure-pipelines

Copy link
Copy Markdown
No pipelines are associated with this pull request.

@jwoo-msft

Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
No pipelines are associated with this pull request.

@jwoo-msft

Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
No pipelines are associated with this pull request.

@jwoo-msft jwoo-msft merged commit 4678eb7 into master Jun 7, 2020
@jwoo-msft jwoo-msft deleted the jwoo/ios-fix-actionset branch June 7, 2020 17:08
jwoo-msft added a commit that referenced this pull request Jul 7, 2020
* Fixed action set cut off issue

* updated stretch for vertical distribution

Co-authored-by: shalinijoshi19 <[email protected]>
@shalinijoshi19 shalinijoshi19 added this to the 20.06 milestone Jul 10, 2020
rankush pushed a commit to rankush/AdaptiveCards that referenced this pull request May 8, 2024
* Fixed action set cut off issue

* updated stretch for vertical distribution

Co-authored-by: shalinijoshi19 <[email protected]>
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.

[IOS][Layout] [When put submit button on the right column of the card, it could be cut off]

2 participants