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/poll styles #5479

Merged
merged 12 commits into from
Nov 27, 2024
Merged

Feature/poll styles #5479

merged 12 commits into from
Nov 27, 2024

Conversation

JcMinarro
Copy link
Member

@JcMinarro JcMinarro commented Nov 18, 2024

🎯 Goal

Add style configuration for Poll on UI-Components

Now, it can be configured by adding a custom theme:

<style name="AppTheme" parent="Theme.MaterialComponents.DayNight.NoActionBar">
     [....]
    <item name="streamUiTheme">@style/StreamTheme</item>
</style>

<style name="StreamTheme" parent="@style/StreamUiTheme">
    [...]
    <item name="streamUiMessageListPollStyle">@style/PollTheme</item>
</style>

<style name="PollTheme" parent="StreamUi.MessageList.Poll" >
    <item name="streamUiPollTitleTextSize">@dimen/stream_ui_text_large</item>
    <item name="streamUiPollTitleTextColor">@color/stream_ui_text_color_primary</item>
    <item name="streamUiPollTitleTextStyle">normal</item>
    <item name="streamUiPollOptionCheckDrawable">@drawable/stream_ui_poll_option_selector</item>
    <item name="streamUiPollSubtitleTextSize">@dimen/stream_ui_text_medium</item>
    <item name="streamUiPollSubtitleTextColor">@color/stream_ui_text_color_secondary</item>
    <item name="streamUiPollSubtitleTextStyle">normal</item>
    <item name="streamUiPollOptionTextSize">@dimen/stream_ui_text_medium</item>
    <item name="streamUiPollOptionTextColor">@color/stream_ui_text_color_primary</item>
    <item name="streamUiPollOptionTextStyle">normal</item>
    <item name="streamUiPollVotesTextSize">@dimen/stream_ui_text_medium</item>
    <item name="streamUiPollVotesTextColor">@color/stream_ui_text_color_primary</item>
    <item name="streamUiPollVotesTextStyle">normal</item>
    <item name="streamUiPollCloseTextSize">@dimen/stream_ui_text_large</item>
    <item name="streamUiPollCloseTextColor">@color/stream_ui_accent_blue</item>
    <item name="streamUiPollCloseTextStyle">normal</item>
    <item name="streamUiPollResultsTextSize">@dimen/stream_ui_text_large</item>
    <item name="streamUiPollResultsTextColor">@color/stream_ui_accent_blue</item>
    <item name="streamUiPollResultsTextStyle">normal</item>
    <item name="streamUiPollShowAllOptionsTextSize">@dimen/stream_ui_text_large</item>
    <item name="streamUiPollShowAllOptionsTextColor">@color/stream_ui_accent_blue</item>
    <item name="streamUiPollShowAllOptionsTextStyle">normal</item>
</style>

🎉 GIF

@JcMinarro JcMinarro requested a review from a team as a code owner November 18, 2024 15:35
@JcMinarro JcMinarro enabled auto-merge (squash) November 27, 2024 15:50
@JcMinarro JcMinarro merged commit 7b4956a into develop Nov 27, 2024
9 checks passed
@JcMinarro JcMinarro deleted the feature/poll-styles branch November 27, 2024 15:59
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.

2 participants