Skip to content

feat: reduce amount of vote placeholders#17

Merged
LukasForst merged 1 commit intowireapp:stagingfrom
vitorhugods:feat/reduce_amount_of_vote_placeholders
Oct 20, 2022
Merged

feat: reduce amount of vote placeholders#17
LukasForst merged 1 commit intowireapp:stagingfrom
vitorhugods:feat/reduce_amount_of_vote_placeholders

Conversation

@vitorhugods
Copy link
Copy Markdown
Contributor


PR Submission Checklist for internal contributors

  • The PR Title

    • conforms to the style of semantic commits messages¹ supported in Wire's Github Workflow²
    • 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

Fixes #16

Solutions

Use the most popular option as a guidance to grow the size of the formatted votes, limited by the number of participants in the conversation.

Examples:
With 5 members in the conversation:

  • ⬛⬜⬜⬜⬜ A (1)
  • ⬛⬛⬛⬜⬜ B (3)
  • ⬛⬛⬜⬜⬜ C (2)

Members = 4:

  • ⬜⬜⬜⬜ A (0)
  • ⬛⬛⬛⬜ B (3)
  • ⬛⬜⬜⬜ C (1)

Members = 3:

  • ⬛⬛⬛ A (3)
  • ⬜⬜⬜ B (0)

Testing

Test Coverage (Optional)

  • I have added automated test to this contribution

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.

@vitorhugods
Copy link
Copy Markdown
Contributor Author

I tried writing tests but for whatever reason I couldn't have Gradle figure out the @Test annotations. Tried adding multiple JUnit dependencies there but nothing.

Ended up testing manually in a sketch file 🤷🏼‍♂️ as I was wasting too much time on this minor tweak 😅

Copy link
Copy Markdown
Contributor

@LukasForst LukasForst left a comment

Choose a reason for hiding this comment

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

Thanks for this!

Regarding tests - well, this was originally quick PoC something like 3 years ago. It was not really meant to production, but here we're..

@LukasForst LukasForst merged commit 1bf9956 into wireapp:staging Oct 20, 2022
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.

Unnecessary line breaking when there are few votes

2 participants