datitisev Great !

Your fix will also work for images ? I also noticed that if we put images of different sizes, options weren't aligned either 🙂

    Wlork Yes, they look fine. In addition, to improve the grid, options with images will be shown before options without, that way non-image options aren't sprinkled in and making the poll use up more space.

    screenshot

    Honestly, not too sure about grouping the image options (either before or after non-image) as it does not follow the order visible in the poll settings... but otherwise there's a lot of empty space. It might make more sense to put image options at the end instead of at the beginning, though 🤔 Or perhaps to not reorder them at all.

      datitisev Great ! 🙂

      Regarding the order of answers, I give my personal opinion:

      I wouldn't reorder them at all (or at best, put an option in Admin to allow automatic reorder, if possible).

      I think that the member who will make a poll, will classify the answers naturally 🙂

      1.4.2

      Various UI & UX improvements in FriendsOfFlarum/polls71.
      These changes may affect any theme or custom LESS targeting FoF Polls!

      • Improve layouts of poll's options list and content of options themselves
      • Fix duplicate timing message when the poll timer has ended
      • Load votes for votes modal after opening, instead of before
      • Improve layout margin & image positioning
      • Use grid for voters list in modal

      screenshot

        datitisev

        It works great :

        Thanks for this improvement.

        I'm glad this extension is evolving. We use it often, and their reviews are very positive because the polls integrate very well and are minimalist (there's just what's needed).

        We hope soon to be able to put a poll in any post (as you know, I've already made a proposal).

        In the meantime, congratulations and thanks again for the improvements 🙂

        8 days later

        datitisev

        m4v3rick

        Updated to 1.4.2 still doesn't work. The user trying is supermod and can even change the poll but can't vote for more than one option. Admin is able to select more than 1.
        Tried it with Max votes per user=0 and Max votes per user=4 - still only 1 vote possible if not admin.

        Flarum info:
        +------------------------------------+---------+--------+
        | flarum-flags | v1.8.0 | |
        | flarum-suspend | v1.8.0 | |
        | flarum-approval | v1.8.0 | |
        | flarum-tags | v1.8.0 | |
        | flarum-markdown | v1.8.0 | |
        | afrux-forum-widgets-core | v0.1.7 | |
        | fof-spamblock | 1.1.0 | |
        | fof-pages | 1.0.5 | |
        | flarum-subscriptions | v1.8.0 | |
        | fof-byobu | 1.3.1 | |
        | v17development-seo | v1.8.0 | |
        | therealsujitk-gifs | v4.1.1 | |
        | sycho-move-posts | v0.1.7 | |
        | rob006-last-post-avatar | 1.2.4 | |
        | luceos-dofollow | v1.0 | |
        | justoverclock-welcomebox | 2.0.2 | |
        | justoverclock-staff-members-widget | 0.1.3 | |
        | justoverclock-popular-tags | 0.1.3 | |
        | justoverclock-guestengagement | 1.0.3 | |
        | justoverclock-country-flags | 0.2.1 | |
        | justoverclock-contactme | 0.2.3 | |
        | fof-username-request | 1.1.2 | |
        | fof-user-directory | 1.2.3 | |
        | fof-upload | 1.2.3 | |
        | fof-terms | 1.2.1 | |
        | fof-stopforumspam | 1.2.3 | |
        | fof-split | 1.1.0 | |
        | fof-sitemap | 2.2.0 | |
        | fof-share-social | 1.1.2 | |
        | fof-recaptcha | 1.2.0 | |
        | fof-pretty-mail | 1.1.1 | |
        | fof-polls | 1.4.2 | |
        | fof-nightmode | 1.5.2 | |
        | fof-merge-discussions | 1.4.0 | |
        | fof-links | 1.1.4 | |
        | fof-linguist | 1.1.1 | |
        | fof-ignore-users | 1.2.0 | |
        | fof-html-errors | 1.1.1 | |
        | fof-forum-statistics-widget | 1.1.0 | |
        | fof-formatting | 1.0.3 | |
        | fof-follow-tags | 1.1.7 | |
        | fof-drafts | 1.2.2 | |
        | fof-disposable-emails | 1.0.0 | |
        | fof-default-user-preferences | 1.2.0 | |
        | fof-cookie-consent | 1.1.1 | |
        | fof-bbcode-details | 1.1.1 | |
        | fof-ban-ips | 1.0.3 | |
        | fof-analytics | 1.1.0 | |
        | flarum-sticky | v1.8.0 | |
        | flarum-statistics | v1.8.0 | |
        | flarum-mentions | v1.8.0 | |
        | flarum-lock | v1.8.0 | |
        | flarum-likes | v1.8.0 | |
        | flarum-lang-german | 1.6.0 | |
        | flarum-lang-french | v4.12.1 | |
        | flarum-lang-english | v1.8.0 | |
        | flarum-emoji | v1.8.0 | |
        | flarum-bbcode | v1.8.0 | |
        | extiverse-mercury | 0.2.0 | |
        | datitisev-maintenance | 1.1.0 | |
        | darkle-fancybox | 1.1.2 | |
        | clarkwinkelmann-emojionearea | 1.0.0 | |
        | clarkwinkelmann-circle-groups | 1.0.1 | |
        | blomstra-usercard-stats | 0.1.2 | |
        | askvortsov-moderator-warnings | v0.6.1 | |
        | afrux-top-posters-widget | v0.1.4 | |
        | afrux-online-users-widget | v0.1.6 | |
        | acpl-mobile-tab | 1.1.1 | |
        +------------------------------------+---------+--------+
        Base URL:
        Installation path:
        Queue driver: sync
        Session driver: file
        Scheduler status: Aktiv
        Mail driver: smtp
        Debug mode: off

        One more info - just checked a few settings:

        It won't work with:
        Participate
        Vote on polls - all members
        Change vote - admin

        Works with:
        Participate
        Vote on polls - all members
        Change vote - all members

        So basically users can vote and change their votes which shouldn't be working because sometimes they shouldn't be allowed to change their votes.

        But in order to work for multiple options it might be the problem if the possibility of changing a vote is restricted. Maybe this could be handled differently?

          m4v3rick Hm, that is indeed a problem. I don't know what the best way of handling "changing vote" would be... Perhaps just not letting users 'unvote' options but still voting for more? Because options are voted for individually, so I don't know how else this would be done without changing that whole system for, I think, worse UX 🤔

            datitisev I'm not sure I understood his request ?

            But why not add an option to allow or not a change vote. And if you click on OK, a button appears "Click to change your vote(s)" ? 🙂

              Wlork What I believe they said is that if a user doesn't have "change vote" permission, they can't currently vote for more than 1 option. How the extension currently works is that you vote for one option, then either vote for more (if you can) or unvote from that one and vote for another. Thus, a user without "change vote" permission can only vote for that first option in polls that allow multiple votes.

              Adding a button to confirm votes would fix this, but that seems like worse UI to me. Where'd you put that button? At the bottom of a long list of poll options that people on mobile phones might miss? UX wise, I believe the current implementation is best, but that does cause issues with changing votes.

              I think the "change vote" permission could be refactored into not allowing vote changes after some time, similar to editing tags. That would probably make it work without degrading the user's experience 🤔

                datitisev You're right !

                Polls are easy to use thanks to the light interface and I think it's important not to break this.

                Change or not our votes for a limited time.... Yes, your idea seems better to me 🙂

                Wlork I'm not sure I understood his request ?

                Sry, it was late and I was tired. Guess that's why it sounded really awkward. 🙁

                Wlork OK, a button

                datitisev Adding a button

                Yep, I thought the same, but I can totally understand your ( @datitisev ) concerns.

                datitisev I think the "change vote" permission could be refactored into not allowing vote changes after some time, similar to editing tags. That would probably make it work without degrading the user's experience 🤔

                It would be the same as "Allow post editing" (Indefinitely, 10min, until next reply) but maybe with a custom time interval. This solutions sounds great actually.

                6 days later

                I'm sorry to ask again, but I haven't had a reply 🙁

                Several weeks ago, I made a proposal to be able to post a poll in any post. And I'd like to know if this was feasible (I suppose so, otherwise you wouldn't have opened a bounty.) or if this is something that is difficult or not to develop ?

                Thanks in advance 🙂

                  Wlork I believe it's definitely possible. However, it'd require changing the association of polls from discussions to polls, which would be a large refactor of both backend & frontend -- at least this is how I would accomplish this feature.

                  Wlork please understand that a bounty opens a possibility to provide money as an incentive to implement this. Developers decide depending on complexity when that is the case. If you want to have something implemented on a contract basis you need to make a request inServices

                  Hello all!

                  I've been hard at work refactoring this extension and adding new features for a v2. Some of the often request changes included are: adding polls to posts, and having multiple polls per discussion/poll.

                  The operation that converts the poll association from discussions to posts is destructive in the case that fof/polls cannot find an associated 'first post'. I don't believe this is an issue, since in those cases the poll shouldn't be currently appearing in the forum anyways (aside from the badge).

                  However, just to be safe, I would prefer that others (with a lot more "old data") test these changes. Just to be safe that everything seems to work as it should migrating to this new version.

                  🛑 DISCLAIMER: THIS IS NOT BACKWARDS COMPATIBLE. DO NOT TEST IN PRODUCTION. BACKUP DATA 🛑

                  That out of the way, there's one PR to test: FriendsOfFlarum/polls73. This PR contains potentially destructive behavior that is unwanted - I want to verify that it only deletes what it should, and nothing else unintentionally. I also have a 2nd PR that builds off this first one, but that one doesn't require testing to avoid unintentional data loss.

                  If you know how to clone extensions & test their PRs already - great, feel free to do that. If not, you can test these PRs by running composer require fof/polls:dev-ds/move-polls-to-posts.

                  With a DB backup ready to restore (!), running php flarum migrate will perform the migrations that have a chance to delete polls. You'll know if it does if the logs contain a line with a count of how many polls were deleted - and their IDs. Knowing their IDs, you can restore the backup, go back to the latest v1 version of fof/polls, and check whether the poll showed up in its discussion. If it didn't, then there's no issue. If there is an issue, please provide info on what the discussions whose polls were deleted when they shouldn't have been.

                  Note: the purpose of testing this is to verify that migrating from v1 to v2 works as intended. Testing this PR in a new, blank installation won't be nearly as helpful.

                    datitisev and having multiple polls per discussion/poll.

                    You mean it will be possible to create several polls in any post ? If yes, that's great news! Thank !

                    I won't be able to test it 🙁 I don't meet the conditions and, above all, I don't have the skills yet. Flarum is still new to me, I'm still learning. I hope you will find volunteers.

                    I can't wait to install and use it in its final version 🙂

                      Wlork Those conditions are mainly to get the best data. Data that has been through a lot of other extension use for a long period of time, as it'd lead to more unpredictable scenarios. You can test it if you want; any amount of testing is helpful.

                      Wlork You mean it will be possible to create several polls in any post ?

                      Indeed! See FriendsOfFlarum/polls74.

                        datitisev

                        I'd like to test, but I don't have much data (I have only two polls that are actually used) and as I'm not 100% familiar with Flarum yet, I don't want to take any risks on my forum which is active 🙁

                        The best I can do is create a test forum, create 10 or 20 polls with v1 and then test v2. But I don't know if that would be as effective?

                        I like the changes you've made to the buttons 🙂

                        Hi @datitisev would it be possible to show the number of votes in a poll? Right now you can only see the activity of a poll by entering the voters, it's not a problem when there are few votes, but if a poll has a lot of activity (100 votes, for example) you wouldn't be able to see that data.

                        I was wondering if it would be possible to add a line of text below the poll "Total votes: 100".