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][UI] [Action/Button is not visible when it's title text is long] #4739

Closed
Jageen opened this issue Sep 5, 2020 · 4 comments · Fixed by #5320
Closed

[iOS][UI] [Action/Button is not visible when it's title text is long] #4739

Jageen opened this issue Sep 5, 2020 · 4 comments · Fixed by #5320
Assignees
Labels
Area-Inconsistency Bugs around renderer inconsistencies across different platforms Bug High Priority Platform-iOS
Milestone

Comments

@Jageen
Copy link

Jageen commented Sep 5, 2020

Platform

What platform is your issue or question related to? (Delete other platforms).

  • iOS

host

Version of SDK

1.2.9
What version are you using? Ex: NuGet 1.0.2, or latest main, etc...

Details

When there is a long title set to action/button it is not viable upto parent's width.
Please refer image for the same
bug

FYI

  • I have configured to render button vertically using host config file ("actionsOrientation": "vertical").
  • In android title is truncated from tail.

What I want is even if title is long for a button it should not increase it's width.

@Jageen Jageen added the Bug label Sep 5, 2020
@ghost ghost added this to the 20.09 milestone Sep 5, 2020
@ghost ghost added the Area-Inconsistency Bugs around renderer inconsistencies across different platforms label Sep 5, 2020
@ghost
Copy link

ghost commented Sep 5, 2020

please review issue# 4739 for Inconsistencies & priority upon triage.

@ghost ghost added this to Needs triage in Bug Triage Sep 5, 2020
@Jageen
Copy link
Author

Jageen commented Sep 5, 2020

I found similar issue
#4107

But it is also open and patch given by merge is not satisfactory , Can we have similar behavior as it is in android ?

@paulcam206 paulcam206 moved this from Needs triage to Investigate in Bug Triage Sep 10, 2020
@ghost ghost removed the Triage-Needed label Sep 10, 2020
@ghost
Copy link

ghost commented Sep 10, 2020

Hi @Jageen. We have acknowledged this issue report. Please continue to follow this issue for updates/progress/questions.

@ghost ghost added the Triage-Investigate label Sep 10, 2020
@shalinijoshi19 shalinijoshi19 removed this from the 20.09 milestone Sep 21, 2020
@ghost ghost added the AdaptiveCards v20.09 label Sep 21, 2020
@shalinijoshi19 shalinijoshi19 added this to the 20.09 milestone Sep 21, 2020
@jwoo-msft jwoo-msft added this to To do in Joseph's Tasks via automation Sep 21, 2020
@jwoo-msft jwoo-msft modified the milestones: 20.09, 20.10 Sep 28, 2020
@ghost ghost removed the AdaptiveCards v20.09 label Sep 29, 2020
@Jageen
Copy link
Author

Jageen commented Oct 8, 2020

Just adding my workaround for this issue.

  1. Create custom renderer by implementing ACRBaseActionElementRenderer
  2. Inside function call renderButton change title text by using utility method utl_adjustString (I created)

inside utl_adjustString function write code to adjust string base on available width.

`
func utl_adjustString(target: NSString, font: UIFont, fitToWidth: CGFloat) -> String {
var _target = target;
let size = _target.size(withAttributes: [NSAttributedString.Key.font : font])

            if (size.width > fitToWidth) {
                _target = String(_target).dropLast() as NSString
                _target = utl_adjustString(target: _target, font: font, fitToWidth: fitToWidth) as NSString;
            }
            return String(_target)
    }

`

@jwoo-msft jwoo-msft modified the milestones: 20.10, 20.11 Oct 19, 2020
@jwoo-msft jwoo-msft moved this from To do to Next Milestone in Joseph's Tasks Oct 21, 2020
@jwoo-msft jwoo-msft moved this from Next Milestone to To do in Joseph's Tasks Nov 2, 2020
@ghost ghost added the AdaptiveCards v20.11 label Nov 5, 2020
@ghost ghost removed the AdaptiveCards v20.11 label Nov 20, 2020
@shalinijoshi19 shalinijoshi19 changed the title [iOS][UI] [Action/Button is not visable when it's title text is long] [iOS][UI] [Action/Button is not visible when it's title text is long] Nov 23, 2020
@ghost ghost added the AdaptiveCards v20.11 label Nov 23, 2020
@jwoo-msft jwoo-msft modified the milestones: 20.11-12, 21.01 Nov 30, 2020
@ghost ghost removed the AdaptiveCards v20.11 label Dec 1, 2020
@ghost ghost added the AdaptiveCards v21.01 label Dec 18, 2020
jwoo-msft added a commit that referenced this issue Jan 23, 2021
@ghost ghost moved this from Investigate to In Code Review in Bug Triage Jan 23, 2021
Bug Triage automation moved this from In Code Review to Closed Jan 27, 2021
Joseph's Tasks automation moved this from To do to Done Jan 27, 2021
jwoo-msft added a commit that referenced this issue Jan 27, 2021
* Fixed #4739 #4107

* complete

Co-authored-by: RebeccaAnne <rebecch@microsoft.com>
rankush pushed a commit to rankush/AdaptiveCards that referenced this issue May 8, 2024
* Fixed microsoft#4739 microsoft#4107

* complete

Co-authored-by: RebeccaAnne <rebecch@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Inconsistency Bugs around renderer inconsistencies across different platforms Bug High Priority Platform-iOS
Projects
No open projects
Bug Triage
  
Closed
Development

Successfully merging a pull request may close this issue.

3 participants