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: polls implementation #2719

Merged
merged 178 commits into from
Oct 31, 2024
Merged

feat: polls implementation #2719

merged 178 commits into from
Oct 31, 2024

Conversation

isekovanic
Copy link
Contributor

@isekovanic isekovanic commented Oct 23, 2024

🎯 Goal

This PR adds support for Polls within the SDK. It goes paired with this one in the LLC.

It includes:

  • The Poll component (essentially Poll message)
  • All of the various screens the Poll exposes (results, answers, full option votes, poll creation and the dialogs)
  • We allow customizability and the exposure of our own components (that work OOTB through using the default hooks) for the Poll component in separate segments; its header, options and then the buttons section
  • Each button can have its onPress handler overriden which allows for customizability whenever this happens
  • If the onPress handler is overriden, both poll and message are passed so that the PollContext can be reconstructed on each screen
  • Each screen comes with its own mechanism to reconstruct its top level context and requires poll and message specifically
  • Various utility hooks that can be used to consume the poll state for convenience

TODO:

  • Clean up some parts of the code (specifically component overrides)
  • Double check that theming is working well
  • If there is time, maybe try to make the animation logic on the poll creation screen at least a bit customizable
  • Use capabilities

🛠 Implementation details

🎨 UI Changes

iOS
Before After
Android
Before After

🧪 Testing

☑️ Checklist

  • I have signed the Stream CLA (required)
  • PR targets the develop branch
  • Documentation is updated
  • New code is tested in main example apps, including all possible scenarios
    • SampleApp iOS and Android
    • Expo iOS and Android

@isekovanic isekovanic merged commit c770854 into develop Oct 31, 2024
4 of 5 checks passed
@isekovanic isekovanic deleted the feat/polls-impl branch October 31, 2024 17:34
@github-actions github-actions bot mentioned this pull request Oct 31, 2024
6 tasks
@stream-ci-bot
Copy link
Contributor

🎉 This PR is included in version 5.40.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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.

4 participants