Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
425 commits
Select commit Hold shift + click to select a range
c9c7c73
feat: add support for resetting hidden nodes in elimination tree
Mirrorgo Oct 12, 2024
4d23e00
Merge pull request #94 from DemocracyDevelopers/feature/sample-dashbo…
Mirrorgo Oct 12, 2024
a819a4c
Merge branch 'release' into feature/sprint2
Mirrorgo Oct 12, 2024
a5ca5ef
fix: use tooltip component from shadcn instead
ylimezhang Oct 12, 2024
6e2f083
Merge pull request #96 from DemocracyDevelopers/feature/sample-dashbo…
ylimezhang Oct 12, 2024
a96ba49
feat: add highlight circle for the selected candidate and integrate i…
ylimezhang Oct 12, 2024
d61f071
Merge pull request #97 from DemocracyDevelopers/feature/sample-dashbo…
ylimezhang Oct 12, 2024
c6b101c
feat: update applied assertion button text in elimination tree
Mirrorgo Oct 12, 2024
8cc9458
Merge pull request #95 from DemocracyDevelopers/feature/sprint2
Mirrorgo Oct 12, 2024
115e7ce
Merge remote-tracking branch 'origin/release'
ylimezhang Oct 12, 2024
8fb922e
chore: change the search bar text
ylimezhang Oct 12, 2024
63b5f38
fix: change the selected candidate id to selected winner id
ylimezhang Oct 12, 2024
9e300c1
fix: commented the option for now, make the avatar text smaller and a…
ylimezhang Oct 12, 2024
eeb7502
Merge pull request #98 from DemocracyDevelopers/feature/sample-dashbo…
Mirrorgo Oct 12, 2024
63b4bf5
feat: add loading in sample page before jumping to the dashboard
ylimezhang Oct 12, 2024
3a1b1b3
Merge remote-tracking branch 'origin/release'
ylimezhang Oct 12, 2024
f916fd4
Merge pull request #99 from DemocracyDevelopers/feature/sample-dashbo…
ylimezhang Oct 12, 2024
9eec445
Merge pull request #100 from DemocracyDevelopers/feature/sample-dashb…
Mirrorgo Oct 12, 2024
caf7de0
feat: add a breadcrumb on each tutorial page; add a scroll listener
lvyl9909 Oct 13, 2024
403dc15
chore: delete the second-level title for get started page
lvyl9909 Oct 13, 2024
eef7458
fix: fixed get started page can not be accessed from toc
lvyl9909 Oct 13, 2024
251c124
chore: submit pnpm-lock
lvyl9909 Oct 13, 2024
e782f02
Merge branch 'release' into feature/yilin2
lvyl9909 Oct 13, 2024
62a91da
feat: add margin and difficulty in tutorial/margin
lvyl9909 Oct 13, 2024
ee8c0e5
fix: change the typed arrow to an icon arrow
lvyl9909 Oct 13, 2024
5a27c8e
chore: added a margincontainer for breadcrumb
lvyl9909 Oct 13, 2024
5bc4a96
chore: reuse tc component from upload folder
lvyl9909 Oct 14, 2024
49940dd
Merge pull request #101 from DemocracyDevelopers/feature/yilin2
ylimezhang Oct 14, 2024
a39f69d
chore: update versions of @radix-ui/react-checkbox and @radix-ui/reac…
Mirrorgo Oct 14, 2024
81b091a
Merge pull request #102 from DemocracyDevelopers/feature/sprint2
clliu13 Oct 14, 2024
ee2f743
feat: add AuditProgressAnimation component and integrate with dashboa…
Linkgls Mar 26, 2025
0642ed6
feat: show revert button only after scissors click
Mirrorgo Mar 31, 2025
4ddf224
Update app/dashboard/page.tsx
Linkgls Apr 1, 2025
72c0caa
chore: add @reactour/tour dependency to package.json
Linkgls Apr 1, 2025
0c86d50
feat: enhance AuditProgressAnimation component with improved styling …
Linkgls Apr 1, 2025
9f1137a
feat: bug version integrate guided tour functionality in dashboard an…
Linkgls Apr 1, 2025
9e03fa4
feat: integrate guided tour functionality in dashboard layout and add…
Linkgls Apr 1, 2025
fe20977
Revert "chore: add @reactour/tour dependency to package.json"
Linkgls Apr 1, 2025
a9c6991
feat: integrate guided tour functionality in dashboard layout and add…
Linkgls Apr 1, 2025
fb8b399
fix: React Hook "useState" is called conditionally
Mirrorgo Apr 1, 2025
d51b2eb
chore: scroll candidate list bar
SlimYoungShady Apr 1, 2025
3e1dac8
Merge pull request #105 from DemocracyDevelopers/feature/refactor
ylimezhang Apr 1, 2025
700418c
Merge remote-tracking branch 'origin/test/emily-test'
ylimezhang Apr 1, 2025
9dacc51
Merge remote-tracking branch 'origin/feature/yangxu'
ylimezhang Apr 1, 2025
fdd6608
Merge remote-tracking branch 'origin/release'
ylimezhang Apr 1, 2025
1a0c920
feat: add crown to the winner in the candidate list bar
ylimezhang Apr 2, 2025
f6f4f4f
fix: fix the avatar scroll problem based on code review
ylimezhang Apr 2, 2025
cbe5a1d
Merge pull request #104 from DemocracyDevelopers/feature/function_ver…
Mirrorgo Apr 2, 2025
5fe9630
Merge pull request #107 from DemocracyDevelopers/feature/avatar-scrol…
Mirrorgo Apr 2, 2025
67a7b2b
feat:add tour guide
lvyl9909 Apr 2, 2025
be33ca3
feat: enhance guided tour functionality with session management and c…
Linkgls Apr 2, 2025
30b192b
feat:add tour guide function
lvyl9909 Apr 2, 2025
edf4705
feat: add tour button to dashboard for guided tour initiation
Linkgls Apr 2, 2025
058b990
refactor: adjust grid layout and spacing in dashboard component
Linkgls Apr 2, 2025
978bbe7
refactor: update grid layout and spacing in dashboard component
Linkgls Apr 2, 2025
634b43c
fix: center align Terms and Privacy section at tutorial bottom
maoyuling-hash Apr 2, 2025
5de0bcd
fix: improved the sidebar UI and fixed the scroll issue when navigating
maoyuling-hash Apr 3, 2025
5840edc
fix: term and privacy on the using assertion page
maoyuling-hash Apr 3, 2025
81c7466
feat delete svg
fuxingz Apr 4, 2025
7683f9f
feat delete svg
fuxingz Apr 4, 2025
8b33162
feat: lazy load 4.5
Mirrorgo Apr 5, 2025
4b87487
feat: simple version lazy load
Mirrorgo Apr 5, 2025
8d56b6a
feat: remove unused test components from Home page
Mirrorgo Apr 5, 2025
43584a0
feat: remove unused import for assertion description
Mirrorgo Apr 5, 2025
9c185f5
feat: add guided tour steps for user navigation
Linkgls Apr 6, 2025
abffc17
Merge branch 'feature/lazy-load' of https://github.com/DemocracyDevel…
Mirrorgo Apr 6, 2025
ae7f87e
fix: change the logic of avatar showing
Auroraphile Apr 6, 2025
a268ba4
Merge pull request #109 from DemocracyDevelopers/feature/avatar-new-kwj
Auroraphile Apr 6, 2025
d24a5c2
Merge pull request #110 from DemocracyDevelopers/release
Auroraphile Apr 6, 2025
9105c03
fix: update pnpm file
Auroraphile Apr 6, 2025
82e8d42
Merge pull request #111 from DemocracyDevelopers/test/weijia-test
Auroraphile Apr 6, 2025
ccfc10a
Merge pull request #112 from DemocracyDevelopers/feature/tutorial-myl
Auroraphile Apr 6, 2025
0694fdb
Create lazy_explain.tsx
Jiamin-Gu Apr 6, 2025
adea4b9
Create lazy_explain.test.ts
Jiamin-Gu Apr 6, 2025
64ac49a
fix: make all avatar logic work in the same way
Auroraphile Apr 7, 2025
639ccf7
fix: changed the "start guide" button style on uploader.tsx
lvyl9909 Apr 7, 2025
9e9c31b
chore: merge release
lvyl9909 Apr 7, 2025
bdb5d73
Update lazy_explain.tsx
Jiamin-Gu Apr 7, 2025
fa998e9
Merge pull request #118 from DemocracyDevelopers/feature/reactour
Mirrorgo Apr 7, 2025
c86f181
Merge pull request #116 from DemocracyDevelopers/feature/avatar-new-kwj
Mirrorgo Apr 7, 2025
6deaf97
feat: add new section to display the full name of candidates in the m…
ylimezhang Apr 7, 2025
3a7efd0
feat: add new section to display the full name of candidates in the m…
ylimezhang Apr 7, 2025
5303ce6
feat: add new section to display the full name of candidates in the m…
ylimezhang Apr 7, 2025
0dcbfca
fix: based on the request from copilot
ylimezhang Apr 7, 2025
f34ef64
fix: based on the request from copilot
ylimezhang Apr 7, 2025
67ec590
Merge pull request #119 from DemocracyDevelopers/feature/avatar-scrol…
Mirrorgo Apr 7, 2025
6df3637
Merge branch 'release' into feature/lazy-load
Mirrorgo Apr 10, 2025
7a6517b
Create step_by_step.tsx
Jiamin-Gu Apr 16, 2025
c6fd8c8
feat: add pagination to the assertion table
ylimezhang Apr 22, 2025
0f3ef3c
feat: Refactor dashboard layout and add new UI components
Mirrorgo Apr 23, 2025
dcaed53
Merge branch 'feature/lazy-load-jg' into feature/muilti-mode
Mirrorgo Apr 23, 2025
fd971d6
refactor: rename EnhancedAuditAnimation to AuditProgressAnimation and…
Linkgls Apr 23, 2025
2cadcc6
refactor: Clean up Home and Dashboard components by removing unused i…
Mirrorgo Apr 23, 2025
27d387e
fix: fix the bug of smart name function, add scroll feature to assert…
ylimezhang Apr 23, 2025
01774e4
fix: change the font size of avatar
ylimezhang Apr 23, 2025
c37a75f
Separate format validation and core algorithms
Jiamin-Gu Apr 23, 2025
6caa2f1
feat: enhance AuditProgressAnimation with dynamic validation messages…
Linkgls Apr 23, 2025
c8d9995
fix: update confirmation message styling in AuditProgressAnimation
Linkgls Apr 23, 2025
1f89898
Update explain-process.tsx
Jiamin-Gu Apr 25, 2025
9f01744
Merge branch 'feature/lazy-load-jg' into feature/muilti-mode
Mirrorgo Apr 25, 2025
e99b1ee
Update step_by_step.tsx
Jiamin-Gu Apr 25, 2025
e0ae1fd
Update explain-process.tsx
Jiamin-Gu Apr 25, 2025
e855dce
Update explain-process.tsx
Jiamin-Gu Apr 25, 2025
05516d1
Merge branch 'feature/lazy-load-jg' into feature/muilti-mode
Mirrorgo Apr 25, 2025
12fbff2
Update step_by_step.ts
Jiamin-Gu Apr 25, 2025
585d5f4
Merge branch 'feature/lazy-load-jg' into feature/muilti-mode
Mirrorgo Apr 25, 2025
5373398
Update lazy_explain.tsx
Jiamin-Gu Apr 27, 2025
f0b2fa4
Merge branch 'feature/lazy-load-jg' into feature/muilti-mode
Mirrorgo Apr 27, 2025
c45cb38
Update lazy_explain.tsx
Jiamin-Gu Apr 28, 2025
485574f
Merge branch 'feature/lazy-load-jg' into feature/muilti-mode
Mirrorgo Apr 28, 2025
43bbe63
chore: Bordered the tooltip of tour guide.
lvyl9909 Apr 29, 2025
69f0c9b
chore: Bordered the tooltip of tour guide.
lvyl9909 Apr 29, 2025
9c82d30
Update app/dashboard/components/assertion-table.tsx
ylimezhang May 3, 2025
af040c4
chore: make the name consistent based on copilot suggestion
ylimezhang May 3, 2025
094231d
feat: added two button at the final step of tour guide
lvyl9909 May 3, 2025
a9bbfe1
feat: Refactor sample file handling and tree component enhancements
Mirrorgo May 4, 2025
7b99316
fix: Remove unnecessary commas and improve string escaping in LazyLoa…
Mirrorgo May 4, 2025
d712e54
fix: fix type
Mirrorgo May 4, 2025
f38b11b
feat: support one click animation
Mirrorgo May 4, 2025
eca1a60
fix: fix all bug for tree layout
Mirrorgo May 4, 2025
0c69f0b
Merge pull request #123 from DemocracyDevelopers/feature/muilti-mode
clliu13 May 5, 2025
e5a3f51
feat: update some style for tree render
Mirrorgo May 6, 2025
8e96cc4
Merge branch 'release' into feature/US17_US20
Linkgls May 6, 2025
458bb30
Merge pull request #121 from DemocracyDevelopers/feature/US17_US20
Mirrorgo May 6, 2025
65395e7
Merge branch 'release' into feature/muilti-mode
Mirrorgo May 6, 2025
86d55e3
fix: remove unused multiWinner check in Dashboard component
Linkgls May 6, 2025
0f9a68e
feat: add data-tour attribute to enhance onboarding experience in Das…
Linkgls May 6, 2025
7501a1b
feat: implement tree tab store for managing tab states in Dashboard a…
Linkgls May 6, 2025
b301913
Update app/dashboard/components/assertion-table.tsx
ylimezhang May 7, 2025
72d85fe
Merge remote-tracking branch 'origin/release'
ylimezhang May 7, 2025
2c0cb9e
Merge remote-tracking branch 'origin/feature/assertion-table-paging'
ylimezhang May 7, 2025
2b34643
Merge pull request #126 from DemocracyDevelopers/feature/US17_US20
Mirrorgo May 7, 2025
decaf94
Merge remote-tracking branch 'origin/release'
ylimezhang May 7, 2025
dbae148
Merge pull request #122 from DemocracyDevelopers/feature/assertion-ta…
ylimezhang May 7, 2025
6ef2a3c
Update app/dashboard/components/lazyload-view/index.tsx
Mirrorgo May 7, 2025
ab03c97
Merge remote-tracking branch 'origin/feature/muilti-mode'
ylimezhang May 7, 2025
2ce8969
fix: add search bar to default view and reuse avatar component
ylimezhang May 7, 2025
29ac70d
Merge pull request #125 from DemocracyDevelopers/feature/muilti-mode
ylimezhang May 7, 2025
8298cc0
fix: igonre duplicate elimination order step
clliu13 May 7, 2025
24859dd
Merge branch 'release' into feature/muilti-mode
Mirrorgo May 7, 2025
346f509
fix: fix scorllbar bug which makes difference in Mac OS and Windows s…
SlimYoungShady May 7, 2025
4daf0e8
fix: suit the table with more assertions. remove avatar color related…
Auroraphile May 7, 2025
f621157
fix: suit the detailtable with more assertions.
Auroraphile May 7, 2025
2de5a2d
fix: change wrong use of getSmartName
Auroraphile May 7, 2025
32b42ae
Merge remote-tracking branch 'origin/feature/more-assertions'
ylimezhang May 7, 2025
ef6f1fc
fix: fix the bug of displaying the name when selected winner
ylimezhang May 7, 2025
8bf91fe
fix: deal with vercel errors
Auroraphile May 7, 2025
08e931a
fix: replace name with shortName
Auroraphile May 7, 2025
979242a
fix: based on weijia
ylimezhang May 7, 2025
4ea12e1
Merge pull request #131 from DemocracyDevelopers/feature/more-assertions
Mirrorgo May 7, 2025
fa30c27
fix darkmode bug
fuxingz May 8, 2025
9c13cc3
chore: update deps
fuxingz May 8, 2025
2cb06cb
feat fix darkbug in information-icon
fuxingz May 8, 2025
539d009
feat: Implement dynamic tour navigation and selection features
Linkgls May 8, 2025
dc42894
feat:fix dashboardpage
fuxingz May 10, 2025
2bded66
Merge pull request #136 from DemocracyDevelopers/feature/darkmode-zfx…
Mirrorgo May 10, 2025
333ddf8
feat: refactor tutorial part to support mdx file
Mirrorgo May 11, 2025
974e8f6
Merge branch 'release' into feature/muilti-mode
Mirrorgo May 11, 2025
cba2518
Merge pull request #138 from DemocracyDevelopers/feature/US17_US20
Mirrorgo May 12, 2025
68c147c
feat: deleted the "back to home page", added a new "enough?Go back" b…
lvyl9909 May 12, 2025
ea17d18
Merge branch 'release' into feature/muilti-mode
Mirrorgo May 13, 2025
68de4aa
Merge pull request #140 from DemocracyDevelopers/feature/muilti-mode
Mirrorgo May 13, 2025
f8b0e1d
feat: display cut count in step by step view
Mirrorgo May 13, 2025
f3af4c9
feat: implement CloseTourOnRouteChange hook and integrate it into Cli…
Linkgls May 14, 2025
cd4a27b
feat: add no eliminate change hint on step by step page and on click …
clliu13 May 14, 2025
3ee4bb3
Merge branch 'feature/explain-assertions-lc-new2' of https://github.c…
clliu13 May 14, 2025
fe1455a
feat: integrate body-scroll-lock to manage body scroll on tour open/c…
Linkgls May 14, 2025
53cf7ad
Merge pull request #141 from DemocracyDevelopers/feature/muilti-mode
Mirrorgo May 14, 2025
1cb3ebc
Merge pull request #142 from DemocracyDevelopers/feature/bugs-fix-link
Mirrorgo May 14, 2025
5325b98
Merge branch 'release' into feature/explain-assertions-lc-new2
clliu13 May 14, 2025
88cc96d
Merge pull request #144 from DemocracyDevelopers/feature/explain-asse…
Mirrorgo May 14, 2025
409ee2f
feat: show assertion_index
Mirrorgo May 14, 2025
474cf58
Merge branch 'release' into feature/muilti-mode
Mirrorgo May 14, 2025
7b31ca8
Fix: add assertion index in step by step and one click animation
clliu13 May 14, 2025
2f2977a
enhance unit test
Jiamin-Gu May 14, 2025
ac1308d
Merge pull request #146 from DemocracyDevelopers/feature/explain-asse…
Mirrorgo May 14, 2025
866324e
feat: show assertion index
Mirrorgo May 14, 2025
fa132f8
Merge branch 'release' into feature/muilti-mode
Mirrorgo May 14, 2025
3a5829f
feat:fix bug in darkmode
fuxingz May 15, 2025
2b5c6c9
feat: Restore steps Code
fuxingz May 15, 2025
504e754
Merge pull request #148 from DemocracyDevelopers/feature/darkmode-copy
clliu13 May 19, 2025
a6b00da
feat: support pause in one click animation
Mirrorgo May 21, 2025
73ec988
Merge branch 'release' into feature/muilti-mode
Mirrorgo May 21, 2025
deca135
feat: imporve layout in one click animation
Mirrorgo May 21, 2025
7799ade
Merge pull request #147 from DemocracyDevelopers/feature/test-gjm
Mirrorgo May 21, 2025
8490189
Merge pull request #149 from DemocracyDevelopers/feature/muilti-mode
clliu13 May 21, 2025
70a736b
feat: add tootip for scissors in every tree view
Mirrorgo May 21, 2025
5f7bbc0
feat: fix bug for currentAssertion
Mirrorgo May 21, 2025
c160217
fix: package bug
Mirrorgo May 21, 2025
7ae861f
fix: render bug
Mirrorgo May 21, 2025
f31ce39
chore: add @types/body-scroll-lock to dependencies and update pnpm-lo…
Linkgls May 21, 2025
4157dbd
resolve conflict about pnpm lock
Linkgls May 25, 2025
ab29437
Merge pull request #150 from DemocracyDevelopers/feature/muilti-mode
clliu13 May 26, 2025
594d642
Merge branch 'release' into feature/fix-tour-bug-2
Linkgls May 27, 2025
2243711
Merge pull request #151 from DemocracyDevelopers/feature/fix-tour-bug-2
Linkgls May 27, 2025
7779b55
fix: asserstion index bug
Mirrorgo May 27, 2025
477d1fc
Merge branch 'release' into feature/muilti-mode
Mirrorgo May 27, 2025
6e66383
Merge pull request #152 from DemocracyDevelopers/feature/muilti-mode
maoyuling-hash May 27, 2025
0a0f69a
feat: support hover and click at the same time
Mirrorgo May 28, 2025
e280c91
Merge pull request #153 from DemocracyDevelopers/feature/muilti-mode
clliu13 May 28, 2025
66c0313
feat: comment in audit-progress-animation
SlimYoungShady Jun 2, 2025
0db022f
fix: delete chinese comments
maoyuling-hash Jun 2, 2025
68c0960
delete comment of Theme-proider
fuxingz Jun 2, 2025
d29422a
fix: delete unused import
maoyuling-hash Jun 2, 2025
dc4602e
feat: remove comments and remove unnecessary variable definitions
Auroraphile Jun 2, 2025
42808c8
update comments in explain assertions
clliu13 Jun 2, 2025
ec9c32a
delete comment in TourStepWatcher.tsx
fuxingz Jun 2, 2025
17d6258
feat:
fuxingz Jun 2, 2025
345f6b5
Merge remote-tracking branch 'origin/release'
ylimezhang Jun 2, 2025
f60a646
add comments in lib/explain
clliu13 Jun 2, 2025
ef075fa
chore: update some comment and useless code
Mirrorgo Jun 2, 2025
1995275
feat: fix comment
fuxingz Jun 2, 2025
e717f5b
feat: replace Chinese comments in English
Auroraphile Jun 2, 2025
daee0a9
add comments in utils/treeActions
clliu13 Jun 2, 2025
8eb7052
chore: zh -> en
lvyl9909 Jun 2, 2025
f0c339a
Merge pull request #155 from DemocracyDevelopers/feature/lazyload_com…
Mirrorgo Jun 2, 2025
505f06f
Merge pull request #157 from DemocracyDevelopers/feature/comment-kwj
Mirrorgo Jun 2, 2025
6dfd684
Merge pull request #158 from DemocracyDevelopers/feature/comment-myl
Mirrorgo Jun 2, 2025
695b304
Merge pull request #159 from DemocracyDevelopers/feature/comments-lc
Mirrorgo Jun 2, 2025
7eca9de
Merge branch 'release' into feature/comment-lwz
Mirrorgo Jun 2, 2025
fe618ab
delete: delete Chinese comment
SlimYoungShady Jun 2, 2025
fd995b1
Merge pull request #154 from DemocracyDevelopers/feature/comment-yx
Mirrorgo Jun 2, 2025
023d1b4
Merge remote-tracking branch 'origin/release'
ylimezhang Jun 2, 2025
afd6cc5
Merge pull request #160 from DemocracyDevelopers/feature/comment-lwz
clliu13 Jun 2, 2025
97d96b7
Merge remote-tracking branch 'origin/release'
ylimezhang Jun 2, 2025
575c7a9
Merge pull request #161 from DemocracyDevelopers/feature/comment-lyl
Mirrorgo Jun 2, 2025
e0f2526
chore: add comments to search drop down and also fix the bug of sampl…
ylimezhang Jun 2, 2025
f7cc49c
Merge remote-tracking branch 'origin/release'
ylimezhang Jun 2, 2025
b85d297
chore: add more comments
ylimezhang Jun 2, 2025
ac54de5
chore: add more comments
ylimezhang Jun 2, 2025
2f26789
feat: update some comment
Mirrorgo Jun 2, 2025
dd51eae
Merge pull request #163 from DemocracyDevelopers/feature/comments-emily
Mirrorgo Jun 2, 2025
418ed40
Merge branch 'release' into feature/comment-lwz
Mirrorgo Jun 2, 2025
186084c
Merge pull request #164 from DemocracyDevelopers/feature/comment-lwz
Mirrorgo Jun 2, 2025
bd15f0a
chore: delete unused code in prettyprint_assertions_and_pictures and …
clliu13 Jun 2, 2025
96fc58b
Handle conflict Merge branch 'release' into feature/comments-lc
clliu13 Jun 2, 2025
6056de9
chore: safely delete dom code
clliu13 Jun 2, 2025
bbde0d2
chore: safely delete useless code in core library step by step
clliu13 Jun 2, 2025
bd1f09d
Merge pull request #165 from DemocracyDevelopers/feature/comments-lc
Mirrorgo Jun 2, 2025
23f39ea
new test version
Jiamin-Gu Jun 2, 2025
a8f8b58
solve error
Jiamin-Gu Jun 2, 2025
fccc001
solve error
Jiamin-Gu Jun 2, 2025
0ece99c
add detail comments
Jiamin-Gu Jun 2, 2025
7884b0e
feat: update readme
Mirrorgo Jun 3, 2025
a5207c0
Merge branch 'feature/comment-lwz' of https://github.com/DemocracyDev…
Mirrorgo Jun 3, 2025
9724654
Merge pull request #167 from DemocracyDevelopers/feature/comment-lwz
ylimezhang Jun 3, 2025
3144466
Merge pull request #166 from DemocracyDevelopers/feature/comment-gjm
Mirrorgo Jun 3, 2025
a264dc7
chore: fix the typo and frame the displayed text based on the usabili…
ylimezhang Jun 4, 2025
f336a8f
chore: fix typo
ylimezhang Jun 4, 2025
3628bb5
Merge pull request #170 from DemocracyDevelopers/feature/usability-te…
Mirrorgo Jun 4, 2025
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
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,10 @@ yarn-error.log*
next-env.d.ts

# vscode
.vscode
.vscode

# idea
.idea

# pnpm-lock
pnpm-lock.yaml
29 changes: 20 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
## Team Member

| Name | Roles |
|-------------|-------------------------------------|
| ----------- | ----------------------------------- |
| Aaron Lee | Technical Officer/Client Liaison |
| Emily Zhang | Project Manager/Front-end Developer |
| Yilin Lyu | Scrum Mater/Front-end Developer |
Expand All @@ -19,14 +19,25 @@

# Technologies Used

- react
- typescript
- nextjs
- tailwind css
- shadcn
- zustand
- jest
- husky
- React (^18) - JavaScript library for building user interfaces
- TypeScript (^5) - Typed superset of JavaScript
- Next.js (14.2.5) - React framework for production applications
- Tailwind CSS (^3.4.1) - Utility-first CSS framework
- shadcn/ui - Re-usable components built using Radix UI and Tailwind CSS
- Zustand (^4.5.4) - Small, fast, and scalable state management
- Jest (^29.7.0) - JavaScript testing framework
- Husky (^9.1.4) - Git hooks made easy
- @mdi/js: ^7.4.47 - Material Design Icons JavaScript library
- @mdi/react: ^1.6.1 - Material Design Icons React components
- lucide: ^0.439.0 - Beautiful & consistent icon toolkit
- lucide-react: ^0.427.0 - Lucide icons for React
- react-icons: ^5.3.0 - Popular icon libraries for React

Icons

Lucide (lucide ^0.439.0, lucide-react ^0.427.0) - Beautiful & consistent icon toolkit
MDI (@mdi/js ^7.4.47, @mdi/react ^1.6.1) - Material Design Icons
React Icons (react-icons ^5.3.0) - Popular icon libraries including support for Iconfont

# Environment and Tools

Expand Down
56 changes: 56 additions & 0 deletions app/ClientTourProvider.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
"use client";

import React from "react";
import { TourProvider } from "@reactour/tour";
import { TourStepWatcher } from "./TourStepWatcher";
import { TourSyncWatcher } from "./TourSyncWatcher";
import { CloseTourOnRouteChange } from "@/hooks/CloseTourOnRouteChange";
import { disableBodyScroll, enableBodyScroll } from "body-scroll-lock";
import { X } from "lucide-react";

interface ClientTourProviderProps {
readonly children: React.ReactNode;
}

/**
* ClientTourProvider wraps the application with the Reactour TourProvider.
*/
export default function ClientTourProvider({
children,
}: ClientTourProviderProps) {
const disableBody = (target: any) => disableBodyScroll(target);
const enableBody = (target: any) => enableBodyScroll(target);
return (
<TourProvider
steps={[]}
showNavigation={false}
showDots={false}
disableInteraction={true}
disableKeyboardNavigation={["esc", "right", "left"]}
onClickClose={({ setIsOpen }) => setIsOpen(false)}
onClickMask={() => {}}
styles={{
popover: (base) => ({ ...base, borderRadius: "12px" }),
}}
scrollSmooth={true}
afterOpen={disableBody}
beforeClose={enableBody}
components={{
Close: ({ onClick }) => (
<button
onClick={onClick}
className="absolute top-2 right-2 text-gray-700 hover:text-gray-900 bg-white rounded-full p-2 shadow-md"
aria-label="Close"
>
<X size={18} />
</button>
),
}}
>
<CloseTourOnRouteChange />
<TourSyncWatcher />
<TourStepWatcher />
{children}
</TourProvider>
);
}
29 changes: 29 additions & 0 deletions app/TourStepWatcher.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import { useEffect } from "react";
import { useTour } from "@reactour/tour";
import { expandTreeLayerByLayer } from "@/utils/treeActions";

/**
* Defines side effects associated with specific tour steps.
* When a tour step is reached, the corresponding effect (if defined) will be triggered.
*/
const stepEffects: Record<number, () => void> = {
6: () => {
expandTreeLayerByLayer();
},
};

/**
* TourStepWatcher
* A non-visual component that watches the current tour step and
* triggers any side effects mapped in `stepEffects`.
*/
export const TourStepWatcher = () => {
const { currentStep } = useTour();

useEffect(() => {
const effect = stepEffects[currentStep];
if (effect) effect();
}, [currentStep]);

return null;
};
25 changes: 25 additions & 0 deletions app/TourSyncWatcher.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
"use client";

import { useEffect } from "react";
import { useTour, StepType } from "@reactour/tour";
import { useFileDataStore } from "@/store/fileData";
import { getCandidateNumber } from "@/app/explain-assertions/components/explain-process";
import { getSteps } from "@/app/steps";

export const TourSyncWatcher = () => {
const fileData = useFileDataStore((state) => state.fileData);
const { setSteps, setCurrentStep } = useTour();

useEffect(() => {
if (!fileData) return;

const count = getCandidateNumber(fileData);
if (typeof count === "number") {
const newSteps = getSteps(count);
setSteps?.(newSteps as StepType[]);
setCurrentStep?.(0); // Reset to the first step
}
}, [fileData, setSteps]);

return null;
};
76 changes: 76 additions & 0 deletions app/dashboard/components/Information-icon-text.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
import { useState } from "react";
import {
Tooltip,
TooltipTrigger,
TooltipContent,
TooltipProvider,
} from "@/components/ui/tooltip";
import { FaInfoCircle } from "react-icons/fa";
import Link from "next/link";

interface TooltipWithIconProps {
title: string;
linkText: string;
linkHref: string;
description: string;
}

const TooltipWithIcon: React.FC<TooltipWithIconProps> = ({
title,
linkText,
linkHref,
description,
}) => {
const [isOpen, setIsOpen] = useState(false);

const handleClick = () => {
setIsOpen(!isOpen);
};

const handleMouseEnter = () => {
setIsOpen(true);
};

return (
<TooltipProvider>
<Tooltip
open={isOpen}
onOpenChange={setIsOpen}
disableHoverableContent={false}
>
<TooltipTrigger asChild>
<span
className="ml-2 relative"
onClick={handleClick}
onMouseEnter={handleMouseEnter}
>
{/* Information Icon */}
<FaInfoCircle className="text-primary cursor-pointer" size={18} />
</span>
</TooltipTrigger>

<TooltipContent
side="right"
align="center"
className="bg-background text-primary rounded-lg shadow-lg p-4 w-64"
>
<div className="font-bold mb-2">{title}</div>
<div className="font-normal">
{description}{" "}
<Link
href={linkHref}
target="_blank"
rel="noopener noreferrer"
className="text-blue-500 hover:underline"
>
{linkText}
</Link>
.
</div>
</TooltipContent>
</Tooltip>
</TooltipProvider>
);
};

export default TooltipWithIcon;
151 changes: 151 additions & 0 deletions app/dashboard/components/assertion-table.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
import React, { useState, useRef } from "react";
import { Avatar } from "@/components/ui/avatar";
import { Button } from "@/components/ui/button";
import AuditProgressAnimation from "./audit-progress-animation";

interface Assertion {
index: number;
content: string;
type: string;
winner: number; // It should be the winner's candidate id
name: string; // candidate name
}

interface AssertionTableProps {
assertions: Assertion[];
winnerName: string;
isValid: boolean;
}

const pageSize = 4;

const AssertionTable: React.FC<AssertionTableProps> = ({
assertions,
winnerName,
isValid,
}) => {
const [currentPage, setCurrentPage] = useState(1);
const totalPages = Math.ceil(assertions.length / pageSize);
const tableRef = useRef<HTMLDivElement>(null);
const paginationRef = useRef<HTMLDivElement>(null);

const animationSpacerRef = useRef<HTMLDivElement>(null);

const paged = assertions.slice(
(currentPage - 1) * pageSize,
currentPage * pageSize,
);

const handlePageChange = (page: number) => {
if (page >= 1 && page <= totalPages) {
setCurrentPage(page);
tableRef.current?.scrollIntoView({ behavior: "smooth", block: "start" });
}
};

const [showAnimation, setShowAnimation] = useState(true);

return (
<div className="flex flex-col h-full">
<div ref={tableRef} className="flex-1 overflow-y-auto border rounded-lg">
<table className="min-w-full table-auto">
<thead className="sticky top-0 bg-background z-10">
<tr>
<th className="px-4 py-2 border-b">Index</th>
<th className="px-4 py-2 border-b">Content</th>
<th className="px-4 py-2 border-b">Type</th>
</tr>
</thead>
<tbody>
{paged.map((a) => (
<tr key={a.index} className="h-[48px]">
<td className="px-4 py-2 text-center border-b">{a.index}</td>
<td className="px-4 py-2 text-left border-b">
<div className="flex items-center">
<Avatar candidateId={a.winner} className="mr-2" />
<span>{a.content}</span>
</div>
</td>
<td className="px-4 py-2 text-center border-b">{a.type}</td>
</tr>
))}
</tbody>
</table>
</div>

<div ref={paginationRef} className="mt-2 pt-2 border-t">
<div className="flex justify-center items-center gap-2 flex-wrap">
<Button
size="sm"
variant="outline"
disabled={currentPage === 1}
onClick={() => handlePageChange(currentPage - 1)}
>
Prev
</Button>

<div className="flex items-center gap-1 text-sm text-gray-700">
Page
<select
value={currentPage}
onChange={(e) => handlePageChange(Number(e.target.value))}
className="border border-gray-300 rounded px-2 py-1 text-sm"
>
{(() => {
const rangeSize = 5;
const half = Math.floor(rangeSize / 2);
let start = Math.max(1, currentPage - half);
let end = Math.min(totalPages, start + rangeSize - 1);

if (end - start + 1 < rangeSize && start > 1) {
start = Math.max(1, end - rangeSize + 1);
}

return Array.from(
{ length: end - start + 1 },
(_, i) => start + i,
).map((page) => (
<option key={page} value={page}>
{page}
</option>
));
})()}
</select>
of {totalPages}
</div>

<Button
size="sm"
variant="outline"
disabled={currentPage === totalPages}
onClick={() => handlePageChange(currentPage + 1)}
>
Next
</Button>
</div>

{showAnimation && (
<div className="mt-2">
<AuditProgressAnimation
championName={winnerName}
isValid={isValid}
onClose={() => {
setShowAnimation(false);
setTimeout(() => {
animationSpacerRef.current?.scrollIntoView({
behavior: "smooth",
block: "start",
});
}, 100);
}}
/>
</div>
)}

<div ref={animationSpacerRef} className="h-1" />
</div>
</div>
);
};

export default AssertionTable;
Loading