Skip to content

Latest commit

 

History

History
224 lines (144 loc) · 14.6 KB

README.md

File metadata and controls

224 lines (144 loc) · 14.6 KB
google-summer-of-code

Poll App Mega Extensions: Revamping the Poll App on Rocket.Chat



Project Abstract    Deliverables    Demo    Contributions    Blog    Mentors    Links



I got a chance to work on the most downloaded App on Rocket.Chat - The Poll App!

From not having used Typescript before, to building an entire App completely in Typescript - 3 months of Google Summer of Code passed.

I intend to maintain this repository as a final report summary of my GSoC work and a quick guide for all future GSoC aspirants.

⭐ Project Abstract

The Rocket.Chat Poll App is the go-to app for teams and channel members of any Rocket.Chat room for a rich interactive poll. This project aims to hugely expand its scope making it a tool for enhancing participant's engagement with interactive quizzes / trivia / live-polls.

🚢 Deliverables

The following are the deliverables of this project:

  • Improving upon the user-experience of existing response visualizations.
    • Highlight winner response [IMPROVEMENT].
    • Displaying dynamically updated total votes both during voting and after results. [IMPROVEMENT]
  • Word cloud generation for both predefined and user-defined poll responses. [NEW]
  • Feature for Mixed Visibility on responses (voters visible for selected number of responses only) in addition to Open and Confidential visibility types [NEW]
  • Ability to add user-options by channel members after poll creation. [NEW]
  • Implementations for additional poll modes [NEW]
    • 1-5 poll.
    • 1-10 poll.
    • Agree/Disagree poll.
    • Overrated/Underrated poll.
  • Adding Live Poll Feature [NEW]
    • Multi-question polls.
    • Time limit for answering each question

All of the above deliverables were completed within the GSoC period. Yay! 🎉

📺 Demo

📊 Improved Response Visualizations of Poll Results

The Poll App currently offers a basic grayscale visualization of responses in the form of a bar graph. This has been significantly improved to better the user experience through the following implementations:

Highlight Winner Response

If you’ve used the Poll App before you would know how boring grayscale gets. It is impossible to identify which vote is the winner. This subfeature improves upon this by using unicode characters to display winner responses in blue and the remaining in black. This theme has been inspired by Twitter Polls.

Now this has a tricky edge case. What if more than two responses have the same number of votes? Which one becomes blue then? Answer: All of them!

Dynamically Updated Total Votes

In the current Poll App the only way to estimate the total number of votes is to manually count total votes received per response. Moreover, since the numbers of votes for each response keep changing asynchronously as members vote it is cumbersome to keep count of the total votes. This subfeature eliminates this hurdle and provides dynamically updated total votes. It also displays a "Final Results" label when the Poll has ended.

Response.Visualizations.mp4

👀 Mixed Visibility Mode

The Poll App offered two visibilities of voter identities for responses - Open and Confidential. This implementation adds another visibility - Mixed. The Mixed visibility mode now allows the Poll creator to decide beforehand for which options the voter identities should be revealed and for which ones they should stay anonymous.

Mixed.Visibility.Responses.mp4

🙌 Ability to Add User-Defined Options

Polls posted in groups on platforms such as Facebook allow group members to add options after the poll has been created. This better involves the community and evokes ideas and opinions from the entire group, not limited to only the poll creator. Through this implementation a similar functionality has been extended to the Rocket.Chat Poll App.

Add.Option.mp4

☁️ Word Cloud Generation for Poll Responses

Until now the only way to view responses was a bar graph. Bar graphs are simple. Bar graphs do the job and bar graphs are just OK. Introducing word clouds for poll responses. Wordcloud make can make use of a specific user-defined API to fetch wordclouds. An option is to use the Quickchart wordcloud API which works well on Rocket.Chat servers with Internet access.

In case you're running a Rocket.Chat server locally in an isolated environment, I have created an API for fetching wordclouds (which works better than Quickchart enterpise 🚀). This API even allows you to customize your wordcloud responses and also factors in number of votes for size of each word within the wordcloud. I have open-sourced the word-cloud API here. Feel free to use and contribute!

Word.Cloud.mp4

✨ Additional Poll Modes

Currently the Poll App has two modes of poll creation - Multiple Choice and Single Choice. This implementation extends these modes to the following types:

  • 1-to-5 Poll.
  • 1-to-10 Poll.
  • Agree/Disagree Poll.
  • Overrated/Underrated Poll.

The benefit that these polls provide to the users is that the users get a template of poll options without having to fill them out themselves. For example, if it is a poll to “rate your favorite movie out of 10” instead of typing in all the numbers from 1 to 10, the user simply selects the 1-10 poll mode and the Poll App automatically fills out the options for the user.

Additional.Poll.Modes.mp4

❤️ Live Polls

We come to our final feature. Live Polls. This is like a mini-GSoC project on its own. If you have ever seen live quizzes where the user needs to vote before the time ends. Well this is it!

Live Polls are a collection of multiple polls that are also timed. They allow the Poll creator to either jump to the next poll or wait for a Time to vote number of seconds to let the Poll App automatically finish the current poll and post the next Poll. The data is pulled from the persistent storage and the Scheduler API is used to schedule Poll finishes. Live Polls can be triggered through the /poll live <number of polls> command.

A very good use-case of Live Polls is through schools and colleges to conduct timed-exams and quizzes on Rocket.Chat.

Live.Poll.mp4

Another feature of Live Polls is late retrieval. This allows the poll creator to pre-initialize the polls with questions, options and time to vote and retrieve them at a later time using and id. The id generated is unique to each Live Poll.

Live Polls can be saved for later through the /poll live save <number of polls> command and can be retrieved through the /poll live load <id> command.

Live.Poll.Late.Retrieval.mp4

Live Polls can be retrieved by anyone within the room provided they possess the Live Poll id. On using the /poll live load command with a wrong or a non-existent Live Poll id an error message is shown to the user executing the command.

🚀 Contributions

PRs

PR Link Description Status
PR #2 [IMPROVEMENT] Poll Response Visualizations.

Highlights include:
  • Highlighting winner response
  • Dynamic display of Total Votes.
PR #5 [NEW] Mixed visibility for poll responses
PR #8 [NEW] Add user defined options
PR #6 [NEW] Word cloud generation for poll responses
PR #11 [NEW] Additional poll modes
PR #13 [NEW] Live Poll

Highlights include
  • Multi-Question Polls
  • Timed Polls
  • Late Retrieval of Live Poll

Issues

Issue Link Description Status
ISSUE #4 [FEATURE] Mixed Visibility for Poll Responses
ISSUE #7 [FEATURE] Allow adding user-defined choices after Poll creation
ISSUE #3 [FEATURE] Word Cloud Generation for Poll Responses
ISSUE #10 [FEATURE] Additional Poll Modes Template
ISSUE #12 [FEATURE] Live Poll: Multi-Question and Timed Polls

My overall contributions at Rocket.Chat

Besides my GSoC project I have been contributing prolifically to other Rocket.Chat projects - RC4Git, RC4Community, Opensource-Contribution-Leaderboard, Rocket.Chat.

😎 Blog

I have been writing blogs regarding each stage of GSoC.

Fun fact: One of my blogs got published on HackerNoon as well! 🕕

🎓 Mentors

A big big thank you to my mentors for their guidance before and throughout GSoC. 🙏

I learned beyond GSoC from them and am forever grateful to be mentored by them.

🔗 Links

  • Read my Poll App project proposal that got me accepted to GSoC here.

  • I also complemented it with Figma designs. Check them out here.

  • Community Collaborations: Improvements was the second project I applied to. Find the proposal here.

  • Designs for the Community Collaboration project reside here.

  • My GSoC Presentation can be found here.

  • Watch the above presentation in video - here !

  • We maintained a Kanban board to track our progress. Take a look

❤️ Support

Learned something new today? Reciprocate the love. ⭐ this repo for good karma.

💬 Connect With Me

Want to discuss about GSoC / Rocket.Chat / Open-source ? Let's connect!

Student Rohan Lekhwani
Organization Rocket.Chat
Project Poll App Mega Extensions
GitHub @RonLek
LinkedIn rohanlekhwani
Twitter rohanlekhwani
Medium rohanlekhwani
Website ronlek.github.io
Email [email protected]
Rocket.Chat rohan.lekhwani