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

Update compose screen UI #7825

Closed
wants to merge 4 commits into from
Closed

Update compose screen UI #7825

wants to merge 4 commits into from

Conversation

cketti
Copy link
Member

@cketti cketti commented May 8, 2024

  • Changes backgrounds of text inputs
  • Fixes some paddings
Before After
image image
image image

Note: The background drawables are using a feature only available on API 23+. The app still runs on lower API levels, but the input field background is looking off. I'll create a separate PR to increase the minSdkVersion to 23.

@cketti cketti force-pushed the message_compose_text_fields branch from 398cb02 to f50bc66 Compare May 27, 2024 16:58
@cketti cketti force-pushed the message_compose_text_fields branch from f50bc66 to da1ed97 Compare May 27, 2024 17:04
@cketti cketti changed the title Change header area of message compose screen Update compose screen UI May 27, 2024
@cketti cketti marked this pull request as ready for review May 27, 2024 17:37
@cketti cketti requested a review from wmontwe as a code owner May 27, 2024 17:37
@cketti cketti mentioned this pull request May 27, 2024
@wmontwe
Copy link
Collaborator

wmontwe commented May 28, 2024

Which version of the design does this implement?

@cketti
Copy link
Member Author

cketti commented May 28, 2024

"Dev handoff May 21 2024"


<shape android:shape="rectangle">
<size android:height="1dp" />
<solid android:color="?attr/colorSurfaceContainerHighest" />
Copy link
Collaborator

Choose a reason for hiding this comment

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

The Material 3 divider color should be colorOutlinedVariant, see spec

Copy link
Member Author

Choose a reason for hiding this comment

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

It's not a divider. It simulates the "active indicator" of a text field. But the design team made the conscious choice to use surface-container-highest instead of on-surface-variant.

Copy link
Collaborator

Choose a reason for hiding this comment

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

If it's an active indicator then it should be on-surface-variant, then why deviate from the spec?

<item android:gravity="bottom">
<shape android:shape="rectangle">
<size android:height="1dp" />
<solid android:color="?attr/colorSurfaceContainerHighest" />
Copy link
Collaborator

Choose a reason for hiding this comment

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

See above

Comment on lines +32 to +34
android:bottom="-8dp"
android:left="-16dp"
android:right="-16dp">
Copy link
Collaborator

@wmontwe wmontwe May 28, 2024

Choose a reason for hiding this comment

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

This looks like a hack instead of a solution. Why can't the layout use standard view components and arrangements? It's also a suprising behavior when looking at the xml layout.

Copy link
Member Author

Choose a reason for hiding this comment

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

This drawable behaves very similar to the old default background for an EditText (a 9-patch that includes implicit padding).

There are no standard components to build the current layout. We could create a custom component based on TextInputLayout. But why invest time in creating custom views (that look more or less exactly like what we have now) when we want to switch to Compose UI anyway?

Copy link
Collaborator

@wmontwe wmontwe May 28, 2024

Choose a reason for hiding this comment

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

What about a standard text field? And since when do we plan to rewrite this screen to compose?

@cketti
Copy link
Member Author

cketti commented May 29, 2024

In a meeting with the design team we decided to postpone changes to the compose screen.

@cketti cketti closed this May 29, 2024
@cketti cketti deleted the message_compose_text_fields branch May 29, 2024 09:20
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.

None yet

2 participants