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

wip: global polls #86

Merged
merged 140 commits into from
May 7, 2024
Merged

wip: global polls #86

merged 140 commits into from
May 7, 2024

Conversation

imorland
Copy link
Member

@imorland imorland commented Jan 30, 2024

Admin setting to enable/disable global polls (disabled by default)
image

Polls showcase page (for global polls)
image

Polls now support an image to be uploaded, as well as a subtitle - both are optional
image

imorland and others added 30 commits January 29, 2024 16:09
* chore: design first iteration of refined polls

* refactor: break code down into components

* refactor: further break code down into components

* chore: dummy implementation

* refactor: use descriptive class names

* chore: minor styling changes

* chore: tinker with typescript

* feat: implement prototype of how results are shown

* chore: minor style changes

* refactor: break down logic

* chore: add dummy content for demo purposes

* chore: minor styling changes

* chore: add boilerplate state and model

* chore: work in progress

* Squashed commit of the following:

commit 69b47f9
Author: IanM <[email protected]>
Date:   Thu Feb 1 09:25:46 2024 +0000

    add isGlobal peroperty to js model

commit d130f6b
Author: IanM <[email protected]>
Date:   Thu Feb 1 09:21:04 2024 +0000

    list polls only shows global polls

commit 0a4dcf4
Author: IanM <[email protected]>
Date:   Wed Jan 31 16:49:15 2024 +0000

    add unauthorized api test

commit 6e52663
Author: IanM <[email protected]>
Date:   Wed Jan 31 16:45:33 2024 +0000

    fix: phpstan error

commit a322750
Author: StyleCI Bot <[email protected]>
Date:   Wed Jan 31 16:42:20 2024 +0000

    Apply fixes from StyleCI

commit c8e60a0
Author: IanM <[email protected]>
Date:   Wed Jan 31 16:42:10 2024 +0000

    feat: allow creation of polls without post id (global poll)

commit 7abeebe
Author: IanM <[email protected]>
Date:   Wed Jan 31 11:49:25 2024 +0000

    ensure poll is associated with postId

commit 20b5917
Author: StyleCI Bot <[email protected]>
Date:   Wed Jan 31 11:45:37 2024 +0000

    Apply fixes from StyleCI

commit fa69a3c
Author: IanM <[email protected]>
Date:   Wed Jan 31 11:45:24 2024 +0000

    test: create post poll via api

commit 97d6348
Author: IanM <[email protected]>
Date:   Wed Jan 31 08:34:08 2024 +0000

    fix: provider visibility

commit 03d355f
Author: IanM <[email protected]>
Date:   Wed Jan 31 08:32:26 2024 +0000

    fix: provider visibility

commit 325cc32
Author: StyleCI Bot <[email protected]>
Date:   Wed Jan 31 08:30:15 2024 +0000

    Apply fixes from StyleCI

commit 822ddbf
Author: IanM <[email protected]>
Date:   Wed Jan 31 08:29:56 2024 +0000

    chore: add test for existing create poll functionality via posts

commit 4799bba
Author: StyleCI Bot <[email protected]>
Date:   Tue Jan 30 14:37:24 2024 +0000

    Apply fixes from StyleCI

commit 4d197f3
Author: IanM <[email protected]>
Date:   Tue Jan 30 14:37:13 2024 +0000

    use sort

commit f897796
Author: IanM <[email protected]>
Date:   Tue Jan 30 14:26:03 2024 +0000

    chore: ts-ignore

commit f1e00db
Author: IanM <[email protected]>
Date:   Tue Jan 30 14:22:36 2024 +0000

    fix: return type

commit d56bf39
Author: StyleCI Bot <[email protected]>
Date:   Tue Jan 30 14:18:49 2024 +0000

    Apply fixes from StyleCI

commit d49c1f9
Author: IanM <[email protected]>
Date:   Tue Jan 30 14:18:37 2024 +0000

    feat: list polls controller

commit 8fb8cc6
Author: IanM <[email protected]>
Date:   Tue Jan 30 14:18:13 2024 +0000

    chore: format

commit ee37ee6
Author: IanM <[email protected]>
Date:   Tue Jan 30 14:15:49 2024 +0000

    fix: some model props incorrect

commit 1857a44
Author: StyleCI Bot <[email protected]>
Date:   Tue Jan 30 08:16:56 2024 +0000

    Apply fixes from StyleCI

commit 4b461a5
Author: IanM <[email protected]>
Date:   Tue Jan 30 08:16:27 2024 +0000

    wip: add polls route, begin to setup state, controls, etc

commit adf5393
Author: IanM <[email protected]>
Date:   Mon Jan 29 16:22:08 2024 +0000

    add nav item

commit d4032dc
Author: IanM <[email protected]>
Date:   Mon Jan 29 16:09:52 2024 +0000

    chore: ts

commit 7365c67
Author: IanM <[email protected]>
Date:   Mon Jan 29 14:01:09 2024 +0000

    chore: add tests for forum serializer props (#85)

    * chore: forum serializer test

    * Apply fixes from StyleCI

    ---------

    Co-authored-by: StyleCI Bot <[email protected]>

commit f460073
Author: IanM <[email protected]>
Date:   Mon Jan 29 11:46:12 2024 +0000

    chore: cleanup extend, create serializer mutators (#84)

    * chore: cleanup extend, create serializer mutators

    * Apply fixes from StyleCI

    ---------

    Co-authored-by: StyleCI Bot <[email protected]>

commit 9acbd74
Author: IanM <[email protected]>
Date:   Mon Jan 29 11:10:32 2024 +0000

    Chore: include discuss link

commit a2af115
Author: IanM <[email protected]>
Date:   Mon Jan 29 11:00:51 2024 +0000

    chore: use 1.x workflows

* create PollForm and adapt Create and EditPollModal

* Apply fixes from StyleCI

* wip

* style: format code

* feat: add start global poll button

* feat: add placeholder string keys

* chore: troubleshooting

* - remove legacy code from directory
- add simple acl abstraction
- add compose polls page

* - add compose poll hero
- adapt CreatePollHandler to the new data structure (similar to edit)
- add translations

* - pseudo fix poll visibility scope, requires review

* - implement frontend list and edit view for poll

* Apply fixes from StyleCI

* - implement poll detail view

* - format code

* - update poll detail view
- enhance poll list view

* refactor: change class name

* refactor: move edit, show results and delete buttons into controls dropdown.

* refactor: remove wrong css classes and add necessary ones

* feat: add missing en text keys

* feat: add link to polls page in session dropdown

* chore: cleanup

* Squashed commit of the following:

commit ce20ae8
Author: StyleCI Bot <[email protected]>
Date:   Thu Feb 15 12:19:33 2024 +0000

    Apply fixes from StyleCI

commit f2e6f32
Author: IanM <[email protected]>
Date:   Thu Feb 15 12:19:14 2024 +0000

    feat: optional poll subtitle

commit 69b47f9
Author: IanM <[email protected]>
Date:   Thu Feb 1 09:25:46 2024 +0000

    add isGlobal peroperty to js model

commit d130f6b
Author: IanM <[email protected]>
Date:   Thu Feb 1 09:21:04 2024 +0000

    list polls only shows global polls

commit 0a4dcf4
Author: IanM <[email protected]>
Date:   Wed Jan 31 16:49:15 2024 +0000

    add unauthorized api test

commit 6e52663
Author: IanM <[email protected]>
Date:   Wed Jan 31 16:45:33 2024 +0000

    fix: phpstan error

commit a322750
Author: StyleCI Bot <[email protected]>
Date:   Wed Jan 31 16:42:20 2024 +0000

    Apply fixes from StyleCI

commit c8e60a0
Author: IanM <[email protected]>
Date:   Wed Jan 31 16:42:10 2024 +0000

    feat: allow creation of polls without post id (global poll)

commit 7abeebe
Author: IanM <[email protected]>
Date:   Wed Jan 31 11:49:25 2024 +0000

    ensure poll is associated with postId

commit 20b5917
Author: StyleCI Bot <[email protected]>
Date:   Wed Jan 31 11:45:37 2024 +0000

    Apply fixes from StyleCI

commit fa69a3c
Author: IanM <[email protected]>
Date:   Wed Jan 31 11:45:24 2024 +0000

    test: create post poll via api

commit 97d6348
Author: IanM <[email protected]>
Date:   Wed Jan 31 08:34:08 2024 +0000

    fix: provider visibility

commit 03d355f
Author: IanM <[email protected]>
Date:   Wed Jan 31 08:32:26 2024 +0000

    fix: provider visibility

commit 325cc32
Author: StyleCI Bot <[email protected]>
Date:   Wed Jan 31 08:30:15 2024 +0000

    Apply fixes from StyleCI

commit 822ddbf
Author: IanM <[email protected]>
Date:   Wed Jan 31 08:29:56 2024 +0000

    chore: add test for existing create poll functionality via posts

commit 4799bba
Author: StyleCI Bot <[email protected]>
Date:   Tue Jan 30 14:37:24 2024 +0000

    Apply fixes from StyleCI

commit 4d197f3
Author: IanM <[email protected]>
Date:   Tue Jan 30 14:37:13 2024 +0000

    use sort

commit f897796
Author: IanM <[email protected]>
Date:   Tue Jan 30 14:26:03 2024 +0000

    chore: ts-ignore

commit f1e00db
Author: IanM <[email protected]>
Date:   Tue Jan 30 14:22:36 2024 +0000

    fix: return type

commit d56bf39
Author: StyleCI Bot <[email protected]>
Date:   Tue Jan 30 14:18:49 2024 +0000

    Apply fixes from StyleCI

commit d49c1f9
Author: IanM <[email protected]>
Date:   Tue Jan 30 14:18:37 2024 +0000

    feat: list polls controller

commit 8fb8cc6
Author: IanM <[email protected]>
Date:   Tue Jan 30 14:18:13 2024 +0000

    chore: format

commit ee37ee6
Author: IanM <[email protected]>
Date:   Tue Jan 30 14:15:49 2024 +0000

    fix: some model props incorrect

commit 1857a44
Author: StyleCI Bot <[email protected]>
Date:   Tue Jan 30 08:16:56 2024 +0000

    Apply fixes from StyleCI

commit 4b461a5
Author: IanM <[email protected]>
Date:   Tue Jan 30 08:16:27 2024 +0000

    wip: add polls route, begin to setup state, controls, etc

commit adf5393
Author: IanM <[email protected]>
Date:   Mon Jan 29 16:22:08 2024 +0000

    add nav item

commit d4032dc
Author: IanM <[email protected]>
Date:   Mon Jan 29 16:09:52 2024 +0000

    chore: ts

commit 7365c67
Author: IanM <[email protected]>
Date:   Mon Jan 29 14:01:09 2024 +0000

    chore: add tests for forum serializer props (#85)

    * chore: forum serializer test

    * Apply fixes from StyleCI

    ---------

    Co-authored-by: StyleCI Bot <[email protected]>

commit f460073
Author: IanM <[email protected]>
Date:   Mon Jan 29 11:46:12 2024 +0000

    chore: cleanup extend, create serializer mutators (#84)

    * chore: cleanup extend, create serializer mutators

    * Apply fixes from StyleCI

    ---------

    Co-authored-by: StyleCI Bot <[email protected]>

commit 9acbd74
Author: IanM <[email protected]>
Date:   Mon Jan 29 11:10:32 2024 +0000

    Chore: include discuss link

commit a2af115
Author: IanM <[email protected]>
Date:   Mon Jan 29 11:00:51 2024 +0000

    chore: use 1.x workflows

* chore: cleanup

* Apply fixes from StyleCI

* Refactor Poll related components and methods for better readability and error handling

* refactor: Add subtitle field to PollForm component

* Add check for undefined voteCount and update localization strings in PollListItem component

* Refactor PollResults component to use real data and add overallVoteCount method to PollState

* bugfix: fix bug about saving polls from posts etc. and add missing texts

* fix tests

* minor cleanup

* switch to yarn

* more cleanup

* fix compose route reload

* fix create poll

* fix edit existing post poll

* create dedicated poll view route

* refactor: add PollViewPage

* refactor: merged Subtitle and title component into PollView using ListItems & the vote button is now showing up and working

* format

* fix poll compose

* update icons, begin removing acl

* fix edit polls

* refactor: use ItemList approach for form part in PollView

* bugfix: fix when which data is provided in the form for the options for create and edit

* remove acl

* export components

* export states

* add nav to poll compose

* refactor: improve markup and css classes assignment for PostListItem

* style: improve Poll list style

* build js for demo/alpha release

* format and build

* style: add basic style for poll result bar and center icon in poll composer icon buttons

* refactor: add class and text key to poll modal delete button

* feat: add percentage position indicator in poll result bar

* format

* feat: use submit button as separate component for possible customization (animation, etc) via extend function

* Build

* fix: change syntax for delete success message

* feat: add sr only text to form

* feat: improve accessibility

* chore: remove comments

* feat: further improve accessibility

* chore: missing code replication

Perhaps it would make sense to refactor this..

* feat: use poll question as meta title

* refactor: use other icons for poll controls

Use the same as when editing or deleting discussions.

* chor: move PollForm to tsx format

* chor: move both Modal to tsx format

* wip: pollshowcase + refactoring

---------

Co-authored-by: Davide Iadeluca <[email protected]>
Co-authored-by: StyleCI Bot <[email protected]>
Co-authored-by: Gianni Guida <[email protected]>
Co-authored-by: IanM <[email protected]>
resources/locale/en.yml Outdated Show resolved Hide resolved
imorland and others added 5 commits April 9, 2024 17:29
* style: run formatter

* chore: remove empty rule

* chore: remove some unused css rules

* chore: remove commented out css rules

* feat!: first attempt to improve accessibility on PollOption

BREAKING CHANGE: The changed markup might have unintended side effects related to styling for third party vendors.

* fix: changes in selected options where not displayed

* chore: remove `aria-describedby` on input

* fix: add missing id to Poll text answer

* chor: update dist files because of merge

---------

Co-authored-by: Simon Hiller <[email protected]>
@imorland imorland merged commit 269bffc into master May 7, 2024
61 checks passed
@imorland imorland deleted the im/global-polls branch May 7, 2024 07:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants