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

Jwoo/ios compact style update #6020

Merged
merged 15 commits into from
Jun 30, 2021
Merged

Jwoo/ios compact style update #6020

merged 15 commits into from
Jun 30, 2021

Conversation

jwoo-msft
Copy link
Member

@jwoo-msft jwoo-msft commented Jun 18, 2021

Related Issue

fixed #5985

Description

Implemented static filtering for choiceset compact style

Sample Card

https://github.com/microsoft/AdaptiveCards/blob/main/samples/v1.5/Elements/Input.ChoiceSet.Filtered.json

How Verified

Screen Shot 2021-06-29 at 5 07 19 PM

Screen Shot 2021-06-29 at 5 07 32 PM

Screen Shot 2021-06-29 at 5 08 41 PM

  • Verified with sample cards
  • Added new unit tests
Microsoft Reviewers: Open in CodeFlow
ezgif.com-gif-maker.2.mov

@jwoo-msft jwoo-msft enabled auto-merge (squash) June 19, 2021 01:11
@ghost ghost added the no-recent-activity label Jun 27, 2021
@ghost
Copy link

ghost commented Jun 27, 2021

Hi @jwoo-msft. This non-spec pull request has had no recent activity for the past 5 days . Please take the necessary actions (review, address feedback or commit if reviewed already) to move this along.

@ghost ghost removed the no-recent-activity label Jun 29, 2021
@ghost
Copy link

ghost commented Jun 29, 2021

Hi @jwoo-msft; Thanks for taking action on your previously stale pull request. Resetting staleness.

Copy link
Member

@golddove golddove left a comment

Choose a reason for hiding this comment

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

A screenshot or gif of the control would be nice!

Comment on lines 136 to 152
- (void)testCanSetShowFilterListViewControlState
{
ACOFilteredListStateManager *stateManager = [[ACOFilteredListStateManager alloc] init];
[stateManager expanded];
XCTAssertTrue(stateManager.isShowFilteredListControlSelected);
[stateManager collapsed];
XCTAssertFalse(stateManager.isShowFilteredListControlSelected);
}

- (void)testShowFilterListViewControlState
{
ACOFilteredListStateManager *stateManager = [[ACOFilteredListStateManager alloc] init];
[stateManager expanded];
XCTAssertTrue(stateManager.isShowFilteredListControlSelected);
[stateManager collapsed];
XCTAssertFalse(stateManager.isShowFilteredListControlSelected);
}
Copy link
Member

Choose a reason for hiding this comment

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

Are these tests intended to be identical?

Copy link
Member Author

Choose a reason for hiding this comment

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

thanks, it must have been added after a refactoring.

return _showFilstedListControlState;
}

- (void)expanded
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
- (void)expanded
- (void)expand

Copy link
Member Author

Choose a reason for hiding this comment

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

thanks for the suggestion. the state manager merely keeps the state. so it is letting the state manager know that the state has changed.

_showFilstedListControlState = YES;
}

- (void)collapsed
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
- (void)collapsed
- (void)collapse


CGFloat x = (viewController.view.superview) ? [viewController.view.superview convertPoint:self.frame.origin toView:nil].x : 0;
CGPoint inputPosition = [self convertPoint:self.frame.origin toView:_rootView];
CGRect rootViewFrame = [self.superview convertRect:_rootView.frame toView:nil];
Copy link
Member

Choose a reason for hiding this comment

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

I'm not following this series of calculation - is the goal to place the list to fill up the entire window?

Copy link
Member Author

Choose a reason for hiding this comment

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

yes, I borrowed it from FluentUI logic. depending on where the input field is, FulentUI's control fills the entire screen starting from the input field.

"id": "myColor1",
"style": "compact",
"isMultiSelect": false,
"placeholder": "Please choose",
Copy link
Member

Choose a reason for hiding this comment

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

Spaces should be tabs. Also, question - is placeholder going to work with filtered choiceset?

Copy link
Member Author

@jwoo-msft jwoo-msft Jun 30, 2021

Choose a reason for hiding this comment

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

it's part of the test sample files that's is local to iOS unit tests.
yes, place holder does work.

@jwoo-msft jwoo-msft merged commit 990043a into main Jun 30, 2021
@jwoo-msft jwoo-msft deleted the jwoo/ios-compact-style-update branch June 30, 2021 00:58
michaelfarnsworth pushed a commit to michaelfarnsworth/AdaptiveCards that referenced this pull request Nov 10, 2022
* [iOS] implemented static filtering

* [iOS] integrated shared model changes

* [iOS] added text wrap support

* [iOS] Added filtering to default value

* [iOS] refactored and added unit test for static filtering
rankush pushed a commit to rankush/AdaptiveCards that referenced this pull request May 8, 2024
* [iOS] implemented static filtering

* [iOS] integrated shared model changes

* [iOS] added text wrap support

* [iOS] Added filtering to default value

* [iOS] refactored and added unit test for static filtering
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] Input.ChoiceSet static filtering
2 participants