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: extracting commons ui elements - sketch pt3 #2859

Merged

Conversation

yamilmedina
Copy link
Contributor

@yamilmedina yamilmedina commented Apr 4, 2024


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

Introducing modules, and reducing duplication for components needed for sketch

Causes (Optional)

Not done.

Solutions

Create UI components module, preserving package structure, and move only relevant things first.
That will be reused for sure, example, buttons, scaffold, and its dependencies when needed.

The idea of preserving package structure, is to not mess up with the imports of the app, and reduce at the minimum, the changes, preserving history, and other benefits.

For later (if needed) we have a base to continue moving components as needed.

How to Test

The app should compile and start without problems :)


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.

@yamilmedina yamilmedina self-assigned this Apr 4, 2024
@yamilmedina yamilmedina changed the title feat: extracting commons ui elements feat: extracting commons ui elements - sketch pt3 Apr 4, 2024
Copy link
Contributor

github-actions bot commented Apr 4, 2024

Test Results

878 tests  ±0   878 ✅ ±0   15m 30s ⏱️ + 1m 15s
120 suites ±0     0 💤 ±0 
120 files   ±0     0 ❌ ±0 

Results for commit 2cf1290. ± Comparison against base commit 264e8bd.

♻️ This comment has been updated with latest results.

@yamilmedina yamilmedina requested review from a team, typfel, vitorhugods, mchenani, Garzas, saleniuk and alexandreferris and removed request for a team April 5, 2024 07:42
@yamilmedina yamilmedina marked this pull request as ready for review April 5, 2024 07:42
Copy link
Contributor

github-actions bot commented Apr 5, 2024

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

@AndroidBob
Copy link
Collaborator

Build 3987 succeeded.

The build produced the following APK's:

@@ -79,15 +78,15 @@ fun WirePrimaryIconButton(
@Preview
@Composable
fun PreviewWirePrimaryIconButton() {
WirePrimaryIconButton({}, false, R.drawable.ic_add, 0)
WirePrimaryIconButton({}, false, com.google.android.material.R.drawable.m3_password_eye, 0)
Copy link
Contributor

Choose a reason for hiding this comment

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

I suppose the new icon is to be as "default" until we have the project drawables into ui-common module as well, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yup, forgot to mention, this drawable was used for previews only in these components, that's why I replaced it on the components.

The real resource we passed from specific modules, in our case App or new feature modules :D

Copy link
Contributor

@alexandreferris alexandreferris left a comment

Choose a reason for hiding this comment

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

Looking great!

Just have a small nitpick but also curious to see others feedback, anyways amazing work towards the project being modularized 😍

@@ -1,4 +1,4 @@
/*
package com.wire.android.ui.common.snackbar/*
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
package com.wire.android.ui.common.snackbar/*
package com.wire.android.ui.common.snackbar
/*

@@ -18,6 +18,7 @@

package com.wire.android.ui.theme

//import com.wire.android.navigation.rememberNavigator
Copy link
Contributor

Choose a reason for hiding this comment

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

🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I commented it for now, since it was only used for Previews as you can see down below in line ~50.
We need at some point to bring the navigation as well to a separate module, but for now I wanted to keep it simple and less invasive 😅 hope is not a problem for the team. (actually removing it, does not break previews).

Copy link
Member

@vitorhugods vitorhugods left a comment

Choose a reason for hiding this comment

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

Looks good to me. Just a small nit: maybe we could move ui-common to core instead of features?

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 43.83%. Comparing base (264e8bd) to head (2cf1290).

Additional details and impacted files
@@                     Coverage Diff                      @@
##           feat/sketching-proto-pt2    #2859      +/-   ##
============================================================
+ Coverage                     43.75%   43.83%   +0.08%     
============================================================
  Files                           424      422       -2     
  Lines                         14068    14056      -12     
  Branches                       2501     2499       -2     
============================================================
+ Hits                           6156     6162       +6     
+ Misses                         7195     7176      -19     
- Partials                        717      718       +1     

see 4 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 264e8bd...2cf1290. Read the comment docs.

Copy link
Contributor

github-actions bot commented Apr 5, 2024

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

@yamilmedina yamilmedina merged commit f404125 into feat/sketching-proto-pt2 Apr 5, 2024
11 of 12 checks passed
@yamilmedina yamilmedina deleted the feat/sketching-proto-pt2-commons branch April 5, 2024 10:50
@AndroidBob
Copy link
Collaborator

Build 3993 succeeded.

The build produced the following APK's:

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.

5 participants