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

Reduce the risk of text truncation in buttons. #3209

Merged
merged 3 commits into from
Jul 18, 2024

Conversation

bmarty
Copy link
Member

@bmarty bmarty commented Jul 17, 2024

Content

Introduce ButtonSize.MediumLowPadding and ButtonSize.LargeLowPadding to reduce the risk of text truncation. Translation can be quite longer that English words.

Motivation and context

Less truncated text in buttons. Fix issue in German for accept/decline invitation in room list and in the room preview screen for invitation.

Screenshots / GIFs

See recorded one.

Tests

  • Switch the language to German
  • Use a device with a small screen
  • have an invitation in the room list and observe that the button to accept and decline the invitation are not truncated anymore.
  • click on the invite and observe the same effect on the displayed screen.

Can also be tested by replacing in the code @PreviewsDayNight by @Preview(locale = "de", widthDp = 360) for JoinRoomViewPreview and for RoomListViewPreview

Tested devices

  • Physical
  • Emulator
  • OS version(s):

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

@bmarty bmarty added Record-Screenshots Runs the 'Record Screenshots' CI job and adds a commit with any new screenshots found. PR-Bugfix For bug fix labels Jul 17, 2024
@bmarty bmarty requested a review from a team as a code owner July 17, 2024 15:56
@bmarty bmarty requested review from ganfra and removed request for a team July 17, 2024 15:56
@github-actions github-actions bot removed the Record-Screenshots Runs the 'Record Screenshots' CI job and adds a commit with any new screenshots found. label Jul 17, 2024
Copy link
Contributor

github-actions bot commented Jul 17, 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/qYSW1V

Copy link

codecov bot commented Jul 17, 2024

Codecov Report

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

Project coverage is 76.15%. Comparing base (f5e866e) to head (2126556).
Report is 14 commits behind head on develop.

Files Patch % Lines
.../libraries/designsystem/theme/components/Button.kt 91.66% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #3209   +/-   ##
========================================
  Coverage    76.14%   76.15%           
========================================
  Files         1644     1644           
  Lines        38768    38776    +8     
  Branches      7501     7503    +2     
========================================
+ Hits         29521    29529    +8     
  Misses        5350     5350           
  Partials      3897     3897           

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

@bmarty bmarty requested a review from ganfra July 17, 2024 16:42
@bmarty bmarty added the Run-Maestro Starts a Maestro Cloud session to run integration tests label Jul 17, 2024
@github-actions github-actions bot removed the Run-Maestro Starts a Maestro Cloud session to run integration tests label Jul 17, 2024
Copy link

sonarcloud bot commented Jul 17, 2024

@bmarty bmarty merged commit 2216c11 into develop Jul 18, 2024
30 checks passed
@bmarty bmarty deleted the feature/bma/fixTruncatedButtons branch July 18, 2024 08:32
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