Skip to content

Conversation

@TGazica
Copy link
Contributor

@TGazica TGazica commented Feb 7, 2023

🎯 Goal

Closes #4657

🛠 Implementation details

Apply fitXY scaling if the image height on the screen is smaller than the max container height. Otherwise centerCrop so scaling is not broken.

🎨 UI Changes

Before After
Screenshot_20230207_122025_Chat Sample Android Screenshot_20230207_121935_Chat Sample Android

🧪 Testing

Test image 1 Test image 2 Test image 3
Screenshot 2023-02-06 at 12 13 19 216983320-179eec7b-aa7b-4e0e-9043-cbd83d0413b6 Screenshot 2023-02-08 at 10 14 14
  1. Run v5
  2. Rry sending or opening channels with images above, the scale will not be correct
  3. Run this branch and repeat step 2, the scale should be ok

☑️Contributor Checklist

General

  • Assigned a person / code owner group (required)
  • Thread with the PR link started in a respective Slack channel (#android-chat-core or #android-chat-ui) (required)
  • PR targets the develop branch
  • PR is linked to the GitHub issue it resolves

Code & documentation

  • Changelog is updated with client-facing changes
  • New code is covered by unit tests
  • Comparison screenshots added for visual changes
  • Affected documentation updated (KDocs, docusaurus, tutorial)

☑️Reviewer Checklist

  • UI Components sample runs & works
  • Compose sample runs & works
  • UI Changes correct (before & after images)
  • Bugs validated (bugfixes)
  • New feature tested and works
  • Release notes and docs clearly describe changes
  • All code we touched has new or updated KDocs

🎉 GIF

giphy (1)

@TGazica TGazica added bug Something isn't working ui-components sdk-issue Used for issues/bugs opened/reported by customers or us. labels Feb 7, 2023
@TGazica TGazica marked this pull request as ready for review February 7, 2023 11:26
@TGazica TGazica requested a review from a team as a code owner February 7, 2023 11:26
@TGazica TGazica requested review from a team and bychkovdmitry February 7, 2023 11:26
Copy link
Contributor

@MarinTolic MarinTolic left a comment

Choose a reason for hiding this comment

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

Changes requested in the comments.

@TGazica TGazica force-pushed the fix/4657-image-scaling branch from 4f00de0 to f82d345 Compare February 9, 2023 08:50
Copy link
Contributor

@MarinTolic MarinTolic left a comment

Choose a reason for hiding this comment

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

☑️Reviewer Checklist

  • UI Components sample runs & works
  • Compose sample runs & works
  • UI Changes correct (before & after images)
  • Bugs validated (bugfixes)
  • New feature tested and works
  • Release notes and docs clearly describe changes
  • All code we touched has new or updated KDocs

@TGazica TGazica merged commit 5e6cb33 into v5 Feb 9, 2023
@TGazica TGazica deleted the fix/4657-image-scaling branch February 9, 2023 12:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working sdk-issue Used for issues/bugs opened/reported by customers or us. ui-components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Images are getting cropped when loading for the first time in MessageListView

4 participants