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

Fix: Calculation of the frame for a component of a bubble #7512

Merged
merged 1 commit into from
Apr 20, 2023

Conversation

nimau
Copy link
Contributor

@nimau nimau commented Apr 20, 2023

This PR fixes some issues with the calculation of the frame for a bubble component.

  • the height of the text is not calculated with the correct width, resulting in an incorrect calculated Y position when using the bubble timeline style.
  • the component's position may be calculated with an extra positioning space (to make room for the timestamp above the component), even for cells of kind TextMessageOutgoingWithoutSenderInfoBubbleCell

These issues result in the sent confirmation icon being misplaced and make it difficult to run to detect the sent confirmation icon in UITests.

Examples:

First message in a room:

Current implementation:
1st message

after a restart of the app, the sent confirmation icon has moved:
1st message - relaunch

With this PR:
1st message - fix

after a restart, the icon stays at the same position:
1st message - relaunch - fix

Second message in a room:

Current implementation: the icon position is not a the same place
2nd message

With this PR: the icon remains aligned with the bottom of the component.
2nd message - fix

Long message:

Current implementation:
long message

With this PR:
long message - fix

With pagination:

Current implementation:
with pagination

With this PR:
with pagination - fix

@nimau nimau force-pushed the nimau/PSB308_sent_confirmation_icon branch from 31a9897 to e3ae9ca Compare April 20, 2023 08:15
@nimau nimau marked this pull request as ready for review April 20, 2023 08:16
@nimau nimau requested a review from stefanceriu April 20, 2023 08:16
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@codecov
Copy link

codecov bot commented Apr 20, 2023

Codecov Report

Patch coverage has no change and project coverage change: +0.14 🎉

Comparison is base (f23575e) 12.21% compared to head (e3ae9ca) 12.36%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #7512      +/-   ##
===========================================
+ Coverage    12.21%   12.36%   +0.14%     
===========================================
  Files         1644     1644              
  Lines       162969   162986      +17     
  Branches     66863    66880      +17     
===========================================
+ Hits         19905    20148     +243     
+ Misses      142425   142179     -246     
- Partials       639      659      +20     
Flag Coverage Δ
uitests 55.26% <ø> (ø)
unittests 6.21% <0.00%> (+0.14%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
Riot/Categories/MXKRoomBubbleTableViewCell+Riot.m 0.00% <0.00%> (ø)
...ules/MatrixKit/Models/Room/MXKRoomBubbleCellData.h 0.00% <ø> (ø)
...ules/MatrixKit/Models/Room/MXKRoomBubbleCellData.m 15.88% <0.00%> (-0.15%) ⬇️
...xtMessageOutgoingWithoutSenderInfoBubbleCell.swift 0.00% <0.00%> (ø)

... and 14 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Member

@stefanceriu stefanceriu left a comment

Choose a reason for hiding this comment

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

Very nice 👏

@nimau nimau merged commit ffc1a43 into develop Apr 20, 2023
@nimau nimau deleted the nimau/PSB308_sent_confirmation_icon branch April 20, 2023 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants