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][Image Rendering][ResourceResolvers] Card elongation #4665

Closed
akaashdev opened this issue Aug 26, 2020 · 8 comments · Fixed by #4897
Closed

[iOS][Image Rendering][ResourceResolvers] Card elongation #4665

akaashdev opened this issue Aug 26, 2020 · 8 comments · Fixed by #4897
Assignees
Labels
Bug Partner-CiscoWebEx Bugs impacting CiscoWebEx integration scenarios Platform-iOS
Milestone

Comments

@akaashdev
Copy link
Contributor

Platform

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

  • iOS

Version

v1.2.11

Details

Cards seems to get long empty spaces when image is set via ResourceResolvers. This sporadically happens on Simulators, but can be frequently noticed on Real Devices in Release Config. (Our Release config is mostly similar to the default Release config)

payloads.zip
card-images.zip

IMG_3087
IMG_3088

Steps to Reproduce

This happens in Release mode and on real devices

  • Configure a tableView with cards in every cell. (Sample payloads provided)
  • Populate images using ResourceResolvers

This is noticed on cards that has images contributing to the height of the card. Cards with fixed height don't seem to have this issue.

Visual Debugger Screenshot

Screenshot 2020-08-26 at 3 07 54 PM

@akaashdev akaashdev added the Bug label Aug 26, 2020
@ghost ghost added the Triage-Needed label Aug 26, 2020
@jwoo-msft jwoo-msft added Partner-CiscoWebEx Bugs impacting CiscoWebEx integration scenarios Platform-iOS labels Aug 26, 2020
@jwoo-msft
Copy link
Member

@akaashdev
Hi,

  1. Does this happen if you don't use placeholder image via resource resolver, in other word, can you try set the image without setting the place holder image?
  2. Does this happen without image?

@akaashdev
Copy link
Contributor Author

akaashdev commented Aug 27, 2020

@jwoo-msft

  1. Yep. This happens even when the original is directly set, without having a placeholder first.
  2. The cards get empty spaces without an image also. But, the places are different. Without an image, the imageView gets a abnormal height, whereas with an image there is a new UIView in-between the buttons that takes some extra height.

Behaviour when image is not set

elongation-of-card

@jwoo-msft jwoo-msft changed the title [iOS][Image Rendering][ResourceResolvers] Card elongation happens when image set via ResourceResolver [iOS][Image Rendering][ResourceResolvers] Card elongation Aug 27, 2020
@jwoo-msft
Copy link
Member

jwoo-msft commented Aug 28, 2020

@akaashdev
Hi,

For the first case,
It appears that the constraints may not have been set properly on the image view. Can you ensure that you enqued the task of setting an image to the image view in the main queue to remove the synchronization as a factor as mentioned in #4650?

In 2nd case, was the image view on the card? Maybe the empty image view might have caused the issue. You can also try to remove extra view by removing the container that wraps ActionSet.

If you could share constraints between the stack view that holds AdaptiveCard view and a contentView, and compression resistance and hugging priority values via e-mail, that will be very helpful.

 {
         "items":[
            {
               "actions":[
                  {
                     "data":{
                        "lessonIndex":2,
                        "nextLesson":true
                     },
                     "title":"Next Lesson: Advantages of Using Cards",
                     "type":"Action.Submit"
                  }
               ],
               "horizontalAlignment":"Center",
               "type":"ActionSet"
            }
         ],
         "type":"Container"
 }

The whole payload.

{
   "$schema":"http://adaptivecards.io/schemas/adaptive-card.json",
   "actions":[
      {
         "card":{
            "$schema":"http://adaptivecards.io/schemas/adaptive-card.json",
            "body":[
               {
                  "items":[
                     {
                        "text":"Available Lessons:",
                        "type":"TextBlock"
                     },
                     {
                        "choices":[
                           {
                              "title":"Introduction",
                              "value":"0"
                           },
                           {
                              "title":"Lesson 1: What is a Card?",
                              "value":"1"
                           },
                           {
                              "title":"Lesson 2: Advantages of Using Cards",
                              "value":"2"
                           },
                           {
                              "title":"Lesson 3: Card Specifications",
                              "value":"3"
                           },
                           {
                              "title":"Lesson 4: Designing a Card",
                              "value":"4"
                           },
                           {
                              "title":"Lesson 5: Webex Card Designer Tool",
                              "value":"5"
                           },
                           {
                              "title":"Lesson 6: Sending A Card to Webex Teams",
                              "value":"6"
                           },
                           {
                              "title":"Lesson 7: How This App Sends Cards",
                              "value":"7"
                           },
                           {
                              "title":"Lesson 8: Displaying Dynamic Content",
                              "value":"8"
                           },
                           {
                              "title":"Lesson 9: Buttons and Actions",
                              "value":"9"
                           },
                           {
                              "title":"Lesson 10: Registering for Button Press Events",
                              "value":"10"
                           },
                           {
                              "title":"Lesson 11: Processing Button Events",
                              "value":"11"
                           },
                           {
                              "title":"Lesson 12: How This App Handles Events",
                              "value":"12"
                           },
                           {
                              "title":"Lesson 13: Form with Buttons Demo",
                              "value":"13"
                           },
                           {
                              "title":"Lesson 14: Lesson 14: Guidelines & Best Practices",
                              "value":"14"
                           }
                        ],
                        "id":"jumpToLessonIndex",
                        "type":"Input.ChoiceSet",
                        "value":"2"
                     },
                     {
                        "actions":[
                           {
                              "data":{
                                 "nextLesson":false,
                                 "pickAnotherLesson":true
                              },
                              "id":"gotoLesson",
                              "title":"Go To Lesson!",
                              "type":"Action.Submit"
                           }
                        ],
                        "type":"ActionSet"
                     }
                  ],
                  "type":"Container"
               }
            ],
            "type":"AdaptiveCard"
         },
         "title":"Pick Another Lesson",
         "type":"Action.ShowCard"
      },
      {
         "card":{
            "$schema":"http://adaptivecards.io/schemas/adaptive-card.json",
            "body":[
               {
                  "text":"* [Join the 'Ask B&C School' Webex Teams Space](https://eurl.io/#SJiS9VKTH)\n* [View the Source for This Card](https://developer.webex.com/buttons-and-cards-designer/lesson-1)\n* [View the Source for This App](https://github.com/WebexSamples/webex-card-school)\n* [Official Developer Guide](https://developer.webex.com/docs/api/guides/cards)\n* [Buttons and Cards Designer](https://developer.webex.com/buttons-and-cards-designer)\n* [Adaptive Card Schema Explorer](https://adaptivecards.io/explorer/)\n* [Cisco DevNet: Card Sample App](https://developer.cisco.com/codeexchange/github/repo/CiscoDevNet/webex-card-sample/) ",
                  "type":"TextBlock",
                  "wrap":true
               },
               {
                  "items":[
                     {
                        "text":"Do you have questions, comments or suggestions?\n\nWe'd love to get your feedback on this bot or any aspect of the Webex Teams Buttons and Cards feature.",
                        "type":"TextBlock",
                        "wrap":true
                     },
                     {
                        "id":"feedback",
                        "isMultiline":true,
                        "placeholder":"Enter your feedback",
                        "type":"Input.Text"
                     },
                     {
                        "actions":[
                           {
                              "data":{

                              },
                              "title":"Send Feedback",
                              "type":"Action.Submit"
                           }
                        ],
                        "type":"ActionSet"
                     }
                  ],
                  "type":"Container"
               }
            ],
            "type":"AdaptiveCard"
         },
         "title":"Helpful Resources",
         "type":"Action.ShowCard"
      }
   ],
   "body":[
      {
         "size":"medium",
         "text":"Lesson 1: What is a Card?",
         "type":"TextBlock",
         "weight":"bolder"
      },
      {
         "altText":"",
         "id":"0",
         "type":"Image",
         "url":"customscheme://cardcontents/info?contentId=xyz0"
      },
      {
         "text":"Cards provide a way for Applications (bots or integrations) to share and collect information in Webex Teams.\n\n",
         "type":"TextBlock",
         "wrap":true
      },
      {
         "text":"Cards can display rich information including images, formatted text and links. They can also be used to collect detailed information from Webex Teams users that would be difficult to obtain using a purely text based interface. ",
         "type":"TextBlock",
         "wrap":true
      },
      {
         "text":"Even cards that only show informational messages, such as the current weather conditions, flight statuses, or internal service alerts really stand out over text-only dialogue. ",
         "type":"TextBlock",
         "wrap":true
      },
      {
         "text":"Where they really shine though, are in the interactions that solicit complex feedback from the user, such as responding to a poll or submitting a registration form.  We'll demonstrate this in the next lesson.",
         "type":"TextBlock",
         "wrap":true
      },
      {
         "choices":[
            {
               "title":"This hidden choice ensures that myCardIndex is returned with every Action.Submit attachmentAction",
               "value":"1"
            }
         ],
         "id":"myCardIndex",
         "isMultiSelect":false,
         "isVisible":false,
         "type":"Input.ChoiceSet",
         "value":"1"
      },
      {
        "actions":[
            {
                "data":{
                "lessonIndex":2,
                "nextLesson":true
                },
                "title":"Next Lesson: Advantages of Using Cards",
                "type":"Action.Submit"
            }
        ],
        "horizontalAlignment":"Center",
        "type":"ActionSet"
    }     
   ],
   "type":"AdaptiveCard",
   "version":"1.0"
}

@akaashdev
Copy link
Contributor Author

@jwoo-msft
We're sure that it has been properly enqueued in the main thread while setting the image (we should have ran into several other issues if it wasn't). This happens only on few cards where the image contributes to the height of the card.
Will share you the requested constraints via e-mail.
Thanks 👍

@ghost
Copy link

ghost commented Aug 31, 2020

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

@jwoo-msft jwoo-msft added this to the 20.09 milestone Sep 3, 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
Copy link
Member

@jwoo-msft what's the work pending on us here?

@shalinijoshi19 shalinijoshi19 added this to the 20.09 milestone Sep 21, 2020
@jwoo-msft jwoo-msft modified the milestones: 20.09, 20.10 Sep 25, 2020
@ghost ghost removed the AdaptiveCards v20.09 label Sep 26, 2020
@ghost ghost added the Status-In Code Review label Oct 9, 2020
@ghost
Copy link

ghost commented Oct 31, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Partner-CiscoWebEx Bugs impacting CiscoWebEx integration scenarios Platform-iOS
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants