Closed ggordn3r closed 4 years ago
VCMA also requested this: Important for VCMA/Partnerships --- Admin - Save it and edit it before it’s published. The ability to keep a saved draft that would be really helpful on there end, so we can do it in advance.
I propose reworking the "create poll" button and "open/close poll" toggle slightly to be more in line with "save" --> "publish" --> "close poll", which seems to be the expected UX.
Alright, this has been implemented in its first form. Check it out. You might experience it that in some places the checks whether or not polls are already published are not properly in place yet, but this is what testing is for. :)
We now have a "Publish Poll" and "Unpublish Poll" button when you look at your own polls
Looking to @iambateman for the UX design here
@ggordn3r thoughts on this?
Concept
false
(is it called status
in the model?)You can edit your poll as necessary until you receive your first vote.
false
hides the "View Results" button.Question
Preview
@iambateman We have a new attribute is_published
which differentiates from is_open
as that a published poll does not need to be open. The "Publish Poll" button makes is_published
= true
.
@proggeramlug that makes sense! But does anything change when it gets published?
What do you mean @iambateman?
Based on the confusion above, it seems like we may be biting off more than we can chew to ship this in the first release. @proggeramlug if you agree, can you roll back or comment out these changes?
Otherwise, you'll need to call @iambateman asap to sort this out.
@ggordn3r I don't see much confusion other than terms here. I'm not even sure what to comment out really :D
@iambateman can you specify what currently, with the "as is" state needs to change in your opinion?
@proggeramlug I think Stephen is asking whether the "is_published" state actually does anything. For example, If I save my poll without publishing it, I can still do all the things I would do anyway--vote in it, share it, view results, etc.
@ggordn3r Okay got it, as of now this is the case. You can only vote for your own unpublished polls and see your own results if it is unpublished.
Everyone else sees a "Poll not found" (we can change that if we want to).
@proggeramlug Ah, ok. "Poll not found" is good. I'll test that later.
I'm also thinking that is_published
should be irreversible (for reasons I describe above), which changes the way we handle this slightly.
I've added a lot of detail to the issue itself based on Stephen's comment and my own thoughts on how this should work. Basically, we need to hide or disable the features that should be impossible while the poll is not published, and allow the user to make changes to the options on an unpublished poll.
Let me know if you need anything else on this. I think it's fully defined now.
This is now updated and ready to be tested again.
I clicked "Save" from the poll creation menu and it produced a poll where is_open
= true
and is_published
= false
. This is incorrect. If the user clicks "Save", the poll should be created with is_open
and is_published
both set to false
.
Also, when I attempt to switch the toggle to "Closed", the text still reads "Open, Accepting Votes" as in this screenshot:
Restart your browser and test again, this is technically fixed and I think was already then. But since 6h ago I submitted like 10 new deployments ;D
But it should be as expected now.
This worked as expected when I tried again; however, I came across a new issue: when I clicked "Publish poll" and "OK" in the verification, nothing happened on screen. I did this 3 times, but the "Publish poll" button did not disappear.
When I refreshed the page, the poll was published but is_open
was false
, which is incorrect. Publishing the poll should also set is_open
to true
.
Corrected!
@proggeramlug noticed a missed spec when we implemented this feature during Priority 2.0. While is_published is false, the user should see another button at the bottom, [Edit poll] between [Publish poll] and [Delete poll].
Clicking on the [Edit poll] button should allow a user to change any of the options previously selected in .../polls/create and re-save the poll.
A key user story here is that super users want to be able to add their custom branding, then see a preview of what it will look like. Right now, their only option is to save the poll and click "View Results (only you can see). But if they want to change the logo or colors, they have to delete the poll and start all over. If editing the poll proves difficult to implement, an alternative way to satisfy this story would be a preview feature on .../polls/create that showed the user what to expect.
Implemented!
Two quick fixes, see screenshot:
1) The menu is incorrect at the bottom. The new "cancel" button is good, but besides that I expected the same choices: "Save Poll" and "Save and Publish Poll". The "Delete" button should be removed.
2) I saved a poll, then clicked "Edit Poll" and added another choice, then clicked "Save Poll" at the bottom. Expected behavior is to return to the poll management page, but instead there was no visible change on the page. When I clicked "Cancel" and "Edit Poll" again, the change was preserved, so it is saving correctly. Just an issue with the link.
Fixed both but I left the delete button. Logically it is not easy to destinguish here but also it makes no sense. Why would I not be able to delete a draft poll? :)
Fair enough. In that case, can you make it match the style of the "Delete Poll" button on the /polls page? I would add the class to this comment but I can't get the elements to load in dev tools right now.
Should be the case now, I think stephen might have done it because I don't recall me doing it
Hmm... maybe I didn't explain this correctly. Trying again:
The Delete
button on the poll creation page:
Should look identical to the one on the poll management page:
Okay, now! :)
Looks great!
While we intended creating polls to be done in one session, users want the ability to save and come back to their work (see #34). They also want to know that their poll is "hidden" from view.
To prevent anyone from acting on polls that are not "Published", we will need to disable some features as specified below.
On the poll creation page, have two buttons: "Save" and "Save & Publish".
If I click "Save"
is_published
tofalse
is_open
tofalse
Do not show results
Not featured
If I click "Save & Publish"
is_published
totrue
is_open
totrue
Do not show results
While
is_published
=false
Edit poll
button and return to the poll creation page to adjust settings (see Stephen's mockup below)Publish Poll
button with Validation: "Are you sure? Once you publish a poll others will be able to see it and vote on it until you close the poll."There should be no option to unpublish a poll. Once
is_published
is set totrue
the user cannot set it tofalse
again. This is to prevent a user from editing the choices and options of a poll after it has already received votes.