Skip to content

FEATURE: Add the title attribute to polls #10759

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

Merged
merged 3 commits into from
Oct 2, 2020
Merged

FEATURE: Add the title attribute to polls #10759

merged 3 commits into from
Oct 2, 2020

Conversation

CvX
Copy link
Contributor

@CvX CvX commented Sep 28, 2020

Adds an optional title attribute to polls. The rationale for this addition is that polls themselves didn't contain context/question and relied on post body to explain them. That context wasn't always obvious (e.g. when there are multiple polls in a single post) or available (e.g. when you display the poll breakdown - you see the answers, but not the question)

As a side note, here's a word on how poll plugin works:

We have a markdown poll renderer, which we use in the builder UI and the composer preview, but… when you submit a post, raw markdown is cooked into html (twice), then we extract data from the generated html and save it to the database. When it's render time, we first display the cooked html poll, and then extract some data from that html, get the data from the post's JSON (and identify that poll using the extracted html stuff) to then render the poll using widgets and the JSON data.

Screen Shot 2020-09-28 at 14 44 45 Screen Shot 2020-09-28 at 15 09 53

Screen Shot 2020-09-28 at 15 10 30

@CvX CvX requested a review from ZogStriP September 28, 2020 13:26
Copy link
Member

@ZogStriP ZogStriP left a comment

Choose a reason for hiding this comment

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

LGTM 👍

Co-authored-by: Régis Hanol <regis@hanol.fr>
@CvX CvX merged commit babbebf into master Oct 2, 2020
@CvX CvX deleted the poll-title branch October 2, 2020 07:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants