Skip to content

change(design) : New component Announcement #4140

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

Merged
merged 4 commits into from
Jan 15, 2025

Conversation

ganfra
Copy link
Member

@ganfra ganfra commented Jan 13, 2025

Content

Introduce Announcement component with 2 types :

  • Actionable to replace DialogLikeBannerMolecule
  • Informative

Motivation and context

https://www.figma.com/design/G1xy0HDZKJf5TCRFmKb5d5/Compound-Android-Components?node-id=2002-2154&m=dev

Screenshots / GIFs

Tests

  • Step 1
  • Step 2
  • Step ...

Tested devices

  • Physical
  • Emulator
  • OS version(s):

Checklist

  • Changes have been tested on an Android device or Android emulator with API 24
  • UI change has been tested on both light and dark themes
  • Accessibility has been taken into account. See https://github.com/element-hq/element-x-android/blob/develop/CONTRIBUTING.md#accessibility
  • Pull request is based on the develop branch
  • Pull request title will be used in the release note, it clearly define what will change for the user
  • Pull request includes screenshots or videos if containing UI changes
  • You've made a self review of your PR

@ganfra ganfra added PR-Change For updates to an existing feature Record-Screenshots Runs the 'Record Screenshots' CI job and adds a commit with any new screenshots found. labels Jan 13, 2025
@github-actions github-actions bot removed the Record-Screenshots Runs the 'Record Screenshots' CI job and adds a commit with any new screenshots found. label Jan 13, 2025
Copy link
Contributor

github-actions bot commented Jan 13, 2025

📱 Scan the QR code below to install the build (arm64 only) for this PR.
QR code
If you can't scan the QR code you can install the build via this link: https://i.diawi.com/LmWvom

@ganfra ganfra force-pushed the feature/fga/compound_design_announcement branch 2 times, most recently from 33aeb88 to 16117e3 Compare January 13, 2025 19:36
@ganfra ganfra added the Record-Screenshots Runs the 'Record Screenshots' CI job and adds a commit with any new screenshots found. label Jan 13, 2025
@github-actions github-actions bot removed the Record-Screenshots Runs the 'Record Screenshots' CI job and adds a commit with any new screenshots found. label Jan 13, 2025
@ganfra ganfra force-pushed the feature/fga/compound_design_announcement branch from 35cd916 to ba12cdc Compare January 14, 2025 09:38
@ganfra ganfra added the Record-Screenshots Runs the 'Record Screenshots' CI job and adds a commit with any new screenshots found. label Jan 14, 2025
@github-actions github-actions bot removed the Record-Screenshots Runs the 'Record Screenshots' CI job and adds a commit with any new screenshots found. label Jan 14, 2025
@ganfra ganfra changed the title feat(design) : New component Announcement change(design) : New component Announcement Jan 14, 2025
@ganfra ganfra force-pushed the feature/fga/compound_design_announcement branch from ea4944b to b262280 Compare January 14, 2025 15:15
@ganfra ganfra added the Record-Screenshots Runs the 'Record Screenshots' CI job and adds a commit with any new screenshots found. label Jan 14, 2025
@github-actions github-actions bot removed the Record-Screenshots Runs the 'Record Screenshots' CI job and adds a commit with any new screenshots found. label Jan 14, 2025
@ganfra ganfra force-pushed the feature/fga/compound_design_announcement branch from c3365b3 to b8c0e52 Compare January 14, 2025 15:35
@ganfra ganfra added the Record-Screenshots Runs the 'Record Screenshots' CI job and adds a commit with any new screenshots found. label Jan 14, 2025
@github-actions github-actions bot removed the Record-Screenshots Runs the 'Record Screenshots' CI job and adds a commit with any new screenshots found. label Jan 14, 2025
Copy link

codecov bot commented Jan 14, 2025

Codecov Report

Attention: Patch coverage is 95.65217% with 6 lines in your changes missing coverage. Please review.

Project coverage is 83.28%. Comparing base (f31e648) to head (24a1b31).
Report is 14 commits behind head on develop.

Files with missing lines Patch % Lines
.../libraries/designsystem/components/Announcement.kt 95.69% 1 Missing and 3 partials ⚠️
...mpl/components/FullScreenIntentPermissionBanner.kt 88.88% 0 Missing and 1 partial ⚠️
...es/roomlist/impl/components/RoomListContentView.kt 80.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #4140      +/-   ##
===========================================
+ Coverage    83.26%   83.28%   +0.01%     
===========================================
  Files         1885     1886       +1     
  Lines        49121    49188      +67     
  Branches      5770     5777       +7     
===========================================
+ Hits         40901    40965      +64     
- Misses        6144     6145       +1     
- Partials      2076     2078       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ganfra ganfra marked this pull request as ready for review January 14, 2025 17:34
@ganfra ganfra requested a review from a team as a code owner January 14, 2025 17:34
@ganfra ganfra requested review from bmarty and removed request for a team January 14, 2025 17:34
Copy link
Member

@bmarty bmarty left a comment

Choose a reason for hiding this comment

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

Thanks, 2 small remarks, but not blocking!

import io.element.android.libraries.ui.strings.CommonStrings

@Composable
fun Announcement(
Copy link
Member

Choose a reason for hiding this comment

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

Could be nice to comment with the Figma link, for future ref.


@Immutable
sealed interface AnnouncementType {
data class Informative(val isError: Boolean = false) : AnnouncementType
Copy link
Member

Choose a reason for hiding this comment

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

Small note about the parameter isError, maybe rename to isCritical to match the Compound semantic?

@ganfra ganfra enabled auto-merge January 15, 2025 10:17
Copy link

@ganfra ganfra merged commit 46119ae into develop Jan 15, 2025
26 checks passed
@ganfra ganfra deleted the feature/fga/compound_design_announcement branch January 15, 2025 10:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR-Change For updates to an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants