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

feat: composable scoped view model and handle message buttom sheet menu #2002

Merged

Conversation

MohamadJaara
Copy link
Member


PR Submission Checklist for internal contributors

  • The PR Title

    • conforms to the style of semantic commits messages¹ supported in Wire's Github Workflow²
    • contains a reference JIRA issue number like SQPIT-764
    • answers the question: If merged, this PR will: ... ³
  • The PR Description

    • is free of optional paragraphs and you have filled the relevant parts to the best of your ability

What's new in this PR?

Issues

  1. implement a composable scoped viewModel
  2. hide like and reply option to the composite message
  3. refactor the copy feature so it does not crash if it was called for messages other than text

Causes (Optional)

Briefly describe the causes behind the issues. This could be helpful to understand the adopted solutions behind some nasty bugs or complex issues.

Solutions

Briefly describe the solutions you have implemented for the issues explained above.

Dependencies (Optional)

If there are some other pull requests related to this one (e.g. new releases of frameworks), specify them here.

Needs releases with:

  • GitHub link to other pull request

Testing

Test Coverage (Optional)

  • I have added automated test to this contribution

How to Test

Briefly describe how this change was tested and if applicable the exact steps taken to verify that it works as expected.

Notes (Optional)

Specify here any other facts that you think are important for this issue.

Attachments (Optional)

Attachments like images, videos, etc. (drag and drop in the text box)


PR Post Submission Checklist for internal contributors (Optional)

  • Wire's Github Workflow has automatically linked the PR to a JIRA issue

PR Post Merge Checklist for internal contributors

  • If any soft of configuration variable was introduced by this PR, it has been added to the relevant documents and the CI jobs have been updated.

References
  1. https://sparkbox.com/foundry/semantic_commit_messages
  2. https://github.com/wireapp/.github#usage
  3. E.g. feat(conversation-list): Sort conversations by most emojis in the title #SQPIT-764.

dependabot bot and others added 2 commits July 25, 2023 08:20
#2001)

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@github-actions
Copy link
Contributor

github-actions bot commented Jul 25, 2023

Test Results

513 tests  +513   512 ✔️ +512   22s ⏱️ +22s
  75 suites +  75       1 💤 +    1 
  75 files   +  75       0 ±    0 

Results for commit ff2a955. ± Comparison against base commit 32ff217.

♻️ This comment has been updated with latest results.

@AndroidBob
Copy link
Collaborator

Build 644 failed.

@MohamadJaara MohamadJaara changed the base branch from develop to feat/composite_messages/epic July 25, 2023 08:44
@AndroidBob
Copy link
Collaborator

Build 647 failed.

@AndroidBob
Copy link
Collaborator

Build 648 failed.

Comment on lines +57 to 63
val onCopyItemClick: (() -> Unit)? = remember(message.header.messageId) {
(message.messageContent as? Copyable)?.textToCopy(localContext.resources)?.let {
{
hideEditMessageMenu { onCopyClick(it) }
}
}
}
Copy link
Member Author

Choose a reason for hiding this comment

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

The idea here is only Copyable messages will have the copy option displayed, and if we want to implement it to other messages we can do so by simply implementing the interface and we will be good to go
because before it will crash if it was called for anything that is not text message

MohamadJaara and others added 2 commits July 25, 2023 11:06
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Mohamad Jaara <[email protected]>
@AndroidBob
Copy link
Collaborator

Build 651 failed.

@github-actions
Copy link
Contributor

APKs built during tests are available here. Scroll down to Artifacts!

@github-actions
Copy link
Contributor

APKs built during tests are available here. Scroll down to Artifacts!

@AndroidBob
Copy link
Collaborator

Build 667 succeeded.

The build produced the following APK's:

Copy link
Contributor

@trOnk12 trOnk12 left a comment

Choose a reason for hiding this comment

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

Impressive work ! I think you are not frequently working on the UI side, but you handled it like a champ ! I left a tiny suggestion to maybe find a middle ground :P

@MohamadJaara MohamadJaara merged commit e965629 into feat/composite_messages/epic Jul 26, 2023
4 of 5 checks passed
@MohamadJaara MohamadJaara deleted the feat/composite_messages/imptovments branch July 26, 2023 10:22
@MohamadJaara MohamadJaara mentioned this pull request Jul 26, 2023
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants