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

Show the date on a room when the last message is older than today. #484

Merged
merged 4 commits into from
Jan 24, 2023

Conversation

pixlwave
Copy link
Member

@pixlwave pixlwave commented Jan 24, 2023

This PR makes the following changes:

  • Conditionally formats the timestamp in the room list cell to show different components depending on its age.
  • Restructures the home screen room cell so that the last message text can expand right to the edge of the cell rather than being compressed by the timestamp text's width.
  • Adds a hidden 2-line label for the last message to provide consistent cell height that scales with dynamic type.
  • Makes the last message font weight and colour consistent regardless of read state.
  • Uses a custom button style for the cells that looks more like an inset UITableView.

Note: Snapshots not updated for UI Tests as @gileluard is going to update the cells again as part of #430.

Pressed State
Simulator Screen Recording - iPhone 14 - 2023-01-24 at 10 28 52

Fix an issue where the longer the date got the smaller the last message width was.
@github-actions
Copy link

github-actions bot commented Jan 24, 2023

Warnings
⚠️ Some of the commits are missing ticket numbers. Please consinder using them for better tracking.
⚠️ You seem to have made changes to views. Please consider adding screenshots.

Generated by 🚫 Danger Swift against 772d464

@codecov
Copy link

codecov bot commented Jan 24, 2023

Codecov Report

Base: 41.64% // Head: 41.91% // Increases project coverage by +0.27% 🎉

Coverage data is based on head (772d464) compared to base (7e1593d).
Patch coverage: 64.10% of modified lines in pull request are covered.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #484      +/-   ##
===========================================
+ Coverage    41.64%   41.91%   +0.27%     
===========================================
  Files          275      276       +1     
  Lines        15528    15579      +51     
  Branches      9943     9980      +37     
===========================================
+ Hits          6466     6530      +64     
+ Misses        8839     8814      -25     
- Partials       223      235      +12     
Flag Coverage Δ
unittests 20.93% <19.04%> (+0.43%) ⬆️

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

Impacted Files Coverage Δ
...urces/Screens/HomeScreen/HomeScreenViewModel.swift 59.68% <0.00%> (ø)
...X/Sources/Screens/HomeScreen/View/HomeScreen.swift 49.02% <50.00%> (-0.24%) ⬇️
...s/Screens/HomeScreen/View/HomeScreenRoomCell.swift 48.36% <58.69%> (-10.84%) ⬇️
ElementX/Sources/Other/Extensions/Date.swift 90.90% <90.90%> (ø)
...ne/TimelineItems/RoomStateEventStringBuilder.swift 26.03% <0.00%> (+26.03%) ⬆️

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 at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Jan 24, 2023

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
0.0% 0.0% Duplication

@pixlwave pixlwave requested a review from gileluard January 24, 2023 10:31
@pixlwave pixlwave marked this pull request as ready for review January 24, 2023 10:33
Copy link
Contributor

@gileluard gileluard left a comment

Choose a reason for hiding this comment

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

lgtm 👍

@pixlwave pixlwave merged commit b8e2d6f into develop Jan 24, 2023
@pixlwave pixlwave deleted the doug/room-cell branch January 24, 2023 11:02
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