Skip to content

Fix MainActionButton layout for long texts #3158

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

Merged
merged 2 commits into from
Jul 8, 2024

Conversation

jmartinesp
Copy link
Member

@jmartinesp jmartinesp commented Jul 8, 2024

Type of change

  • Feature
  • Bugfix
  • Technical
  • Other :

Content

Make MainActionButton layout have a min and max width, and when such max width is reached, it'll wrap into several lines. Also added support for breaking words using a hyphen () symbol.

Motivation and context

The layout got very broken in languages which used long texts for these actions:

image

Screenshots / GIFs

Before After
image image

Tests

  • Put the app in German.
  • Got to any room details.
  • Check the main actions' text doesn't unlimitedly grow anymore.

Tested devices

  • Physical
  • Emulator
  • OS version(s): 14

Checklist

  • Changes have been tested on an Android device or Android emulator with API 23
  • UI change has been tested on both light and dark themes
  • Accessibility has been taken into account. See https://github.com/element-hq/element-x-android/blob/develop/CONTRIBUTING.md#accessibility
  • Pull request is based on the develop branch
  • Pull request title will be used in the release note, it clearly define what will change for the user
  • Pull request includes screenshots or videos if containing UI changes
  • Pull request includes a sign off
  • You've made a self review of your PR

@jmartinesp jmartinesp added the PR-Bugfix For bug fix label Jul 8, 2024
@jmartinesp jmartinesp requested a review from a team as a code owner July 8, 2024 07:53
@jmartinesp jmartinesp requested review from bmarty and removed request for a team July 8, 2024 07:53
Copy link
Contributor

github-actions bot commented Jul 8, 2024

📱 Scan the QR code below to install the build (arm64 only) for this PR.
QR code
If you can't scan the QR code you can install the build via this link: https://i.diawi.com/m7YETC

Copy link

sonarqubecloud bot commented Jul 8, 2024

Copy link
Member

@bmarty bmarty left a comment

Choose a reason for hiding this comment

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

LGTM thanks. I thought I already reviewed that changes a few days/weeks ago 🤔

@jmartinesp
Copy link
Member Author

LGTM thanks. I thought I already reviewed that changes a few days/weeks ago 🤔

Me too, but I couldn't see them merged anywhere. I think I just uploaded the branch but never created the PR.

@jmartinesp jmartinesp added the Run-Maestro Starts a Maestro Cloud session to run integration tests label Jul 8, 2024
@jmartinesp jmartinesp enabled auto-merge (squash) July 8, 2024 11:25
@github-actions github-actions bot removed the Run-Maestro Starts a Maestro Cloud session to run integration tests label Jul 8, 2024
Copy link

codecov bot commented Jul 8, 2024

Codecov Report

Attention: Patch coverage is 90.90909% with 1 line in your changes missing coverage. Please review.

Project coverage is 76.02%. Comparing base (3a91b4f) to head (b0e72a4).

Files Patch % Lines
...designsystem/components/button/MainActionButton.kt 90.90% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #3158   +/-   ##
========================================
  Coverage    76.01%   76.02%           
========================================
  Files         1635     1635           
  Lines        38552    38559    +7     
  Branches      7457     7457           
========================================
+ Hits         29307    29314    +7     
- Misses        5359     5360    +1     
+ Partials      3886     3885    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jmartinesp jmartinesp merged commit c550436 into develop Jul 8, 2024
30 checks passed
@jmartinesp jmartinesp deleted the fix/jme/fix-main-action-layout-in-room-details branch July 8, 2024 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR-Bugfix For bug fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants