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

Feature/fga/reactions UI improvements #5204

Merged
merged 6 commits into from
Feb 11, 2022

Conversation

ganfra
Copy link
Member

@ganfra ganfra commented Feb 10, 2022

This PR improves the UI of reactions by handling #3344 #4674 and #5149
It also fixes reactions order on Bubble and UI echo.

COLLAPSED EXPANDED
Screenshot_20220210-190439 Screenshot_20220210-190444

@ganfra ganfra requested a review from amshakal February 10, 2022 18:25
Copy link
Contributor

@ariskotsomitopoulos ariskotsomitopoulos left a comment

Choose a reason for hiding this comment

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

It seems fine, I didn't run the code

@github-actions
Copy link

github-actions bot commented Feb 10, 2022

Unit Test Results

  76 files  ±0    76 suites  ±0   52s ⏱️ -6s
144 tests ±0  144 ✔️ ±0  0 💤 ±0  0 ±0 
452 runs  ±0  452 ✔️ ±0  0 💤 ±0  0 ±0 

Results for commit 0a52651. ± Comparison against base commit 00ada67.

♻️ This comment has been updated with latest results.

@amshakal
Copy link

amshakal commented Feb 10, 2022

Looks good! TY!

The designs were made with the assumption that the text in each reaction is black in colour. Can we match the colour and style of '3 more' and 'show less' to match the text style used for reactions? i.e. grey and bold text?

@github-actions
Copy link

github-actions bot commented Feb 10, 2022

Matrix SDK

Integration Tests Results:

  • [org.matrix.android.sdk.session]
    passed="25" failures="17" errors="0" skipped="2"
  • [org.matrix.android.sdk.account]
    passed="1" failures="1" errors="0" skipped="0"
  • [org.matrix.android.sdk.internal]
    passed="1" failures="1" errors="0" skipped="0"
  • [org.matrix.android.sdk.ordering]
    passed="1" failures="1" errors="0" skipped="0"
  • [org.matrix.android.sdk.PermalinkParserTest]
    passed="2" failures="0" errors="0" skipped="0"

@ouchadam
Copy link
Contributor

will this also fix #5149 ?

@ganfra
Copy link
Member Author

ganfra commented Feb 11, 2022

will this also fix #5149 ?

Oh yeah probably!

@@ -83,23 +113,36 @@ abstract class AbsBaseMessageItem<H : AbsBaseMessageItem.Holder> : BaseEventItem
reactionButton.isEnabled = reaction.synced
holder.reactionsContainer.addView(reactionButton)
}
if (reactions.count() > MAX_REACTIONS_TO_SHOW) {
val showReactionsTextView = createReactionTextView(holder, 6)
Copy link
Contributor

@ouchadam ouchadam Feb 11, 2022

Choose a reason for hiding this comment

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

nit: could be handy to have some named arguments for the hardcoded values for some extra context

Copy link
Member Author

Choose a reason for hiding this comment

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

Actually, I'm changing this to a Style as it's shared with ReactionButton

Copy link
Contributor

@ouchadam ouchadam left a comment

Choose a reason for hiding this comment

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

LGTM as well! 💯

Copy link

@amshakal amshakal left a comment

Choose a reason for hiding this comment

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

TY!

@ganfra ganfra merged commit f1376ea into develop Feb 11, 2022
@ganfra ganfra deleted the feature/fga/reactions_ui_improvements branch February 11, 2022 14:17
val showAll: Boolean = false,
val onShowMoreClicked: () -> Unit,
val onShowLessClicked: () -> Unit,
val onAddMoreClicked: () -> Unit
Copy link
Member

Choose a reason for hiding this comment

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

Weird to see some lambda in data class

Copy link
Contributor

Choose a reason for hiding this comment

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

not sure what will happen when we attempt to parcelize 🤔

@@ -3779,4 +3779,7 @@
<string name="tooltip_attachment_poll">Create poll</string>
<string name="tooltip_attachment_location">Share location</string>

<string name="message_reaction_show_less">Show less</string>
<string name="message_reaction_show_more">"%1$d more"</string>
Copy link
Member

@bmarty bmarty Feb 14, 2022

Choose a reason for hiding this comment

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

You should have used a plurals (?)

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.

5 participants