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

Sh/form UI #90

Merged
merged 92 commits into from
Feb 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
92 commits
Select commit Hold shift + click to select a range
ca72c92
chore: design first iteration of refined polls
DavideIadeluca Jan 29, 2024
82e0d20
refactor: break code down into components
DavideIadeluca Jan 29, 2024
d425ec5
refactor: further break code down into components
DavideIadeluca Jan 29, 2024
9233b03
chore: dummy implementation
DavideIadeluca Jan 29, 2024
96ce155
refactor: use descriptive class names
DavideIadeluca Jan 29, 2024
c07cd44
chore: minor styling changes
DavideIadeluca Jan 29, 2024
62ae284
chore: tinker with typescript
DavideIadeluca Jan 29, 2024
bbc5d09
feat: implement prototype of how results are shown
DavideIadeluca Jan 29, 2024
e1270ea
chore: minor style changes
DavideIadeluca Jan 29, 2024
6063223
refactor: break down logic
DavideIadeluca Jan 29, 2024
ea38914
chore: add dummy content for demo purposes
DavideIadeluca Jan 29, 2024
6ef1d94
chore: minor styling changes
DavideIadeluca Jan 30, 2024
9b404b9
chore: add boilerplate state and model
DavideIadeluca Jan 30, 2024
1bcfee8
chore: work in progress
DavideIadeluca Jan 30, 2024
d2eb935
Squashed commit of the following:
DavideIadeluca Feb 1, 2024
52bb246
Merge remote-tracking branch 'origin/di/polls-ui-prototype' into sh/f…
novacuum Feb 1, 2024
35c297d
create PollForm and adapt Create and EditPollModal
novacuum Feb 1, 2024
ab9dfe2
Apply fixes from StyleCI
StyleCIBot Feb 1, 2024
3d0e0bc
wip
DavideIadeluca Feb 1, 2024
532e530
Merge branch 'di/polls-ui-prototype' of github.com:FriendsOfFlarum/po…
DavideIadeluca Feb 1, 2024
29269d5
style: format code
DavideIadeluca Feb 2, 2024
418677b
feat: add start global poll button
DavideIadeluca Feb 2, 2024
16cba9b
feat: add placeholder string keys
DavideIadeluca Feb 2, 2024
3dd4843
chore: troubleshooting
DavideIadeluca Feb 2, 2024
0d13895
Merge remote-tracking branch 'origin/di/polls-ui-prototype' into sh/f…
novacuum Feb 6, 2024
be398e3
- remove legacy code from directory
novacuum Feb 6, 2024
26618f1
- add compose poll hero
novacuum Feb 6, 2024
3eacfeb
- pseudo fix poll visibility scope, requires review
novacuum Feb 6, 2024
9d299a9
- implement frontend list and edit view for poll
novacuum Feb 6, 2024
2eb0358
Apply fixes from StyleCI
StyleCIBot Feb 6, 2024
b3c7cc4
- implement poll detail view
novacuum Feb 6, 2024
57afdcf
Merge remote-tracking branch 'origin/sh/form-ui' into sh/form-ui
novacuum Feb 6, 2024
e02459c
- format code
novacuum Feb 6, 2024
7c2f830
- update poll detail view
novacuum Feb 8, 2024
96cb3f5
refactor: change class name
gianniguida Feb 16, 2024
13001fe
refactor: move edit, show results and delete buttons into controls dr…
gianniguida Feb 16, 2024
e78787c
refactor: remove wrong css classes and add necessary ones
gianniguida Feb 18, 2024
c4c9705
feat: add missing en text keys
gianniguida Feb 18, 2024
aaeee51
feat: add link to polls page in session dropdown
gianniguida Feb 18, 2024
f5c34f3
chore: cleanup
DavideIadeluca Feb 19, 2024
313ebfc
Squashed commit of the following:
DavideIadeluca Feb 19, 2024
03fa9fa
chore: cleanup
DavideIadeluca Feb 19, 2024
e4d779c
Apply fixes from StyleCI
StyleCIBot Feb 19, 2024
2b204a7
Refactor Poll related components and methods for better readability a…
novacuum Feb 19, 2024
72d4dc0
Merge remote-tracking branch 'origin/im/global-polls' into sh/form-ui
novacuum Feb 19, 2024
f0b9f88
refactor: Add subtitle field to PollForm component
novacuum Feb 19, 2024
ab91275
Merge remote-tracking branch 'origin/gg/form-ui' into sh/form-ui
novacuum Feb 19, 2024
0b9216e
Merge remote-tracking branch 'origin/di/polls-ui-prototype' into sh/f…
novacuum Feb 19, 2024
63a1bee
Add check for undefined voteCount and update localization strings in …
novacuum Feb 19, 2024
acf1139
Refactor PollResults component to use real data and add overallVoteCo…
novacuum Feb 19, 2024
24db3ae
bugfix: fix bug about saving polls from posts etc. and add missing texts
novacuum Feb 20, 2024
ea9b390
fix tests
imorland Feb 20, 2024
0bdbbbd
minor cleanup
imorland Feb 20, 2024
9b6e121
switch to yarn
imorland Feb 20, 2024
ab2341f
more cleanup
imorland Feb 20, 2024
2898600
fix compose route reload
imorland Feb 21, 2024
b90c18d
fix create poll
imorland Feb 21, 2024
812745a
fix edit existing post poll
imorland Feb 21, 2024
05c18eb
create dedicated poll view route
imorland Feb 21, 2024
8bc4235
refactor: add PollViewPage
novacuum Feb 21, 2024
7b31b24
refactor: merged Subtitle and title component into PollView using Lis…
novacuum Feb 21, 2024
cb6d8bc
format
imorland Feb 21, 2024
4a96ad0
fix poll compose
imorland Feb 21, 2024
cbc5011
update icons, begin removing acl
imorland Feb 21, 2024
6a9d97f
fix edit polls
imorland Feb 21, 2024
0cabe24
refactor: use ItemList approach for form part in PollView
novacuum Feb 21, 2024
4b1f45e
bugfix: fix when which data is provided in the form for the options f…
novacuum Feb 21, 2024
9b3197b
remove acl
imorland Feb 21, 2024
87e4d48
export components
imorland Feb 21, 2024
0d78029
export states
imorland Feb 21, 2024
e7abc4c
add nav to poll compose
imorland Feb 21, 2024
f40eb58
refactor: improve markup and css classes assignment for PostListItem
gianniguida Feb 21, 2024
4de123a
style: improve Poll list style
gianniguida Feb 21, 2024
86da69a
build js for demo/alpha release
imorland Feb 22, 2024
8add202
format and build
imorland Feb 22, 2024
193bb52
style: add basic style for poll result bar and center icon in poll co…
gianniguida Feb 22, 2024
d406b75
refactor: add class and text key to poll modal delete button
gianniguida Feb 22, 2024
c5ae902
feat: add percentage position indicator in poll result bar
gianniguida Feb 22, 2024
8fe37ae
format
gianniguida Feb 22, 2024
98de352
feat: use submit button as separate component for possible customizat…
gianniguida Feb 23, 2024
2642bdc
Build
gianniguida Feb 23, 2024
6ba5348
fix: change syntax for delete success message
DavideIadeluca Feb 26, 2024
34f6332
feat: add sr only text to form
DavideIadeluca Feb 27, 2024
a51ebac
feat: improve accessibility
DavideIadeluca Feb 27, 2024
519da8e
chore: remove comments
DavideIadeluca Feb 27, 2024
8f35161
feat: further improve accessibility
DavideIadeluca Feb 27, 2024
49ce742
chore: missing code replication
DavideIadeluca Feb 27, 2024
830e203
feat: use poll question as meta title
DavideIadeluca Feb 27, 2024
a6cfaaf
refactor: use other icons for poll controls
DavideIadeluca Feb 27, 2024
e2bbb21
chor: move PollForm to tsx format
novacuum Feb 27, 2024
29ea10a
chor: move both Modal to tsx format
novacuum Feb 27, 2024
a23bb81
wip: pollshowcase + refactoring
imorland Feb 27, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:

frontend_directory: ./js
backend_directory: .
js_package_manager: npm
js_package_manager: yarn
main_git_branch: master

secrets:
Expand Down
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"title": "FoF Polls",
"category": "discussion",
"icon": {
"name": "fas fa-signal",
"name": "fas fa-poll",
"backgroundColor": "#e74c3c",
"color": "#fff"
}
Expand All @@ -59,7 +59,8 @@
},
"require-dev": {
"flarum/phpstan": "*",
"flarum/testing": "^1.0.0"
"flarum/testing": "^1.0.0",
"fof/upload": "*"
},
"scripts": {
"analyse:phpstan": "phpstan analyse",
Expand Down
8 changes: 5 additions & 3 deletions extend.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,15 @@
use Flarum\Post\Post;
use Flarum\Settings\Event\Saved as SettingsSaved;
use FoF\Polls\Api\Controllers;
use FoF\Polls\Api\Serializers\PollSerializer;

return [
(new Extend\Frontend('forum'))
->js(__DIR__.'/js/dist/forum.js')
->css(__DIR__.'/resources/less/forum.less')
->route('/polls', 'fof_polls_directory', Content\PollsDirectory::class),
->route('/polls', 'fof.polls.showcase')
->route('/polls/all', 'fof.polls.list', Content\PollsDirectory::class)
->route('/polls/view/{id}', 'fof.poll.view')
->route('/polls/composer', 'fof.polls.composer'),

(new Extend\Frontend('admin'))
->js(__DIR__.'/js/dist/admin.js')
Expand Down Expand Up @@ -57,7 +59,7 @@
->attributes(Api\AddDiscussionAttributes::class),

(new Extend\ApiSerializer(PostSerializer::class))
->hasMany('polls', PollSerializer::class)
->hasMany('polls', Api\Serializers\PollSerializer::class)
->attributes(Api\AddPostAttributes::class),

(new Extend\ApiSerializer(ForumSerializer::class))
Expand Down
2 changes: 1 addition & 1 deletion js/dist/admin.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion js/dist/admin.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion js/dist/forum.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/dist/forum.js.map

Large diffs are not rendered by default.

Loading
Loading