Commit Graph

100 Commits

Author SHA1 Message Date
ingawei
b83e5db563
getting rid of daisy buttons (#969)
* getting rid of daisy buttons so bet button does not turn black on mobile
2022-09-30 00:41:22 -05:00
Marshall Polaris
e0d9b4d335
Rewrite contract graphs (#935)
* Fiddle around with everything, WIP FR charts

* Implement numeric chart

* Reorganize everything into neat little files

* Add `AreaWithTopStroke` helper

* Tidying, don't gratuitously use d3.format

* Remove duplicate code

* Better tooltip bisection

* `NumericPoint` -> `DistributionPoint`

* Add numeric market tooltip

* Make numeric chart bucket points less wrong

* Clean up numeric bucket computation

* Clean up a bunch of tooltip stuff, add FR legend tooltips

* Fix a dumb bug

* Implement basic time selection

* Fix fishy Date.now inconsistency bugs

* Might as well show all the FR outcomes now

* Make tooltips accurate on curveStepAfter charts

* Make log scale PN charts work properly

* Adjust x-axis tick count

* Display tooltip on charts only for mouse

* Fix up deps

* Tighter chart tooltips

* Adjustments to chart time range management

* Better date formatting

* Continue tweaking time selection handling to be perfect

* Make FR charts taller by default
2022-09-27 20:24:42 -07:00
ingawei
fd90bc353b multiple choice betting fix 2022-09-26 21:40:56 -07:00
ingawei
e17a59ae23
Inga/mobilebetting (#911)
* mobile binary betting
2022-09-26 19:28:54 -05:00
James Grugett
68120ec2b2 Revert "Clean up and fix stuff on answers panel (#914)"
This reverts commit 721448f408.
2022-09-25 23:29:13 -04:00
Marshall Polaris
721448f408
Clean up and fix stuff on answers panel (#914) 2022-09-22 12:40:55 -07:00
Marshall Polaris
c7f29af2ee
Clean up some stuff in AnswersPanel (#902)
* Tidy up messy markup on FR answers panel

* Clean up obsolete feed-related answer stuff

* Slight fixup per James feedback
2022-09-20 22:07:40 -07:00
Ian Philips
5d65bb5bb1 Add message about unique bonuses withdrawn on n/a 2022-09-19 07:31:04 -06:00
ingawei
ccf02bdba8
Inga/admin rules resolve (#880)
* Giving admin permission to resolve all markets that have closed after 7 days.
2022-09-14 22:28:40 -05:00
Ian Philips
de8c27c970 Filter None answer earlier 2022-09-13 07:48:41 -06:00
James Grugett
f49cb9b399 Only show 'Show more' for free response answers if there are more answers to show 2022-09-12 17:40:19 -05:00
Ian Philips
0af1ff112b Allow users to see 0% FR answers via show more button 2022-09-12 14:30:15 -06:00
mantikoros
43660387fa modal positioning 2022-09-09 16:08:42 -05:00
mantikoros
7729bdd2dc bet panel: higher threshold for warning; no autofocus on mobile 2022-09-09 15:58:26 -05:00
mantikoros
cd1d8ecd8a WarningConfirmationButton for bets 2022-09-09 01:02:30 -05:00
Ian Philips
35de4c485a Just submit, allow xs on pills 2022-09-07 21:39:14 -06:00
mantikoros
28af2063c3 "bet" => "trade" 2022-09-07 14:45:04 -05:00
mantikoros
8952b100ad add answer panel mobile formatting, slider 2022-09-05 17:59:19 -05:00
mantikoros
ae40999700 mobile bet slider 2022-09-05 17:11:32 -05:00
mantikoros
30d73d6362 remove parantheses from balance text 2022-09-05 16:59:35 -05:00
Marshall Polaris
7508d86c73
Clean up contract overview code (#823)
* Don't call Date.now a million times in answers graph

* Refactor contract overview code so that it's easier to understand
2022-09-01 14:42:50 -07:00
Ian Philips
6706fe7350 Show user balance on bet panels 2022-09-01 08:12:46 -06:00
Ian Philips
a0402830c5
liking markets with tip/heart (#798)
* WIP liking markets with tip

* Refactor Userlink, add MultiUserLink

* Lint

* Lint

* Fix merge

* Fix imports

* wip liked contracts list

* Cache likes and liked by user ids on contract

* Refactor tip amount, reduce to M

* Move back to M

* Change positioning for large screens
2022-08-30 09:38:59 -06:00
Marshall Polaris
7debc4925e
De-feedify contract tab contents (#808)
* De-feedify contract bets list

* De-feedify contract comments lists

* Clean up a bunch of duplicated work in the comments list stuff

* Remove wrapper markup from comment replies list

* Fix sort order on comments I broke

* Kill now unhelpful `CommentRepliesList` wrapper component

* More random cleanup

* More cleanup and fix some styling I had broken

* Make bet calculations less wrong

* Keep up to date with master

* Make copy link component copy better URL

* Make highlighted comments align properly

* Make user header left align with content on comments

* Fix some free response UI stuff up
2022-08-30 02:41:47 -07:00
mantikoros
2e96721a5c "sign in" => "add my answer" 2022-08-28 16:14:02 -05:00
mantikoros
926929880a "Sign up to bet" => "Place my bet"; "Sign in to comment" => "Add my comment"; rename button to BetSignUpPrompt 2022-08-28 16:14:02 -05:00
mantikoros
03e07037ea
ban users from posting (#810) 2022-08-28 00:23:25 -05:00
Sinclair Chen
9698895c22 Update fr chart colors 2022-08-26 17:39:46 -07:00
James Grugett
74ce98913c Make graph start from left side for new markets 2022-08-26 01:08:16 -05:00
Austin Chen
26a2eb2391 Switch to a different color scheme 2022-08-25 22:31:05 -07:00
James Grugett
539bfba70c Decrease starting time window for free response graph 2022-08-26 00:21:06 -05:00
Sinclair Chen
88535e5512 fix lint error 2022-08-12 12:10:07 -07:00
mantikoros
8ebccd05ec market movement warning; add bankroll warning to FR markets 2022-08-12 11:24:08 -05:00
Austin Chen
7ad8af848a Replace DaisyUI buttons with TailwindUI buttons
Maybe this should use the button component...? But that's styled differently, the rest of /create uses standard TailwindUI
2022-08-11 20:54:12 -07:00
Sinclair Chen
daba28423a
Improve create page UI (#746)
* Adjust create page styles

* Keep answers when switching market type
2022-08-11 14:41:21 -07:00
mantikoros
1aaae93113
Multiple choice markets (#698)
* multipe choice answers

* create multiple choice cloud function

* multi choice market page

* show outcome '0'

* stats: multi choice type

* update place bet

* answer doc id = outcome

* update resolve market

* prettier

* fix

* fix resolution
2022-07-27 21:40:33 -05:00
mantikoros
68343701ca answer bet panel: scroll up on ios 2022-07-12 17:47:48 -05:00
Marshall Polaris
4700ceb14c
Refactor some backend-related stuff (#639)
* web/lib/firebase/api-call -> common/api, web/lib/firebase/api

* Reuse `APIError` type in server code

* Reuse `getFunctionUrl` in server code
2022-07-10 15:03:15 -07:00
Marshall Polaris
c1ca1471a1
Migrate createAnswer function to v2 (#634)
* Migrate createAnswer function to v2

* Remove unhelpful toString on APIError
2022-07-09 00:26:56 -07:00
Ben Congdon
7fc1ec6bd2
Clear suggested FR answer after submission (#603) 2022-06-30 15:13:59 -07:00
Marshall Polaris
fc7f19e785
Finalize v2 resolvemarket migration (#598)
* Update resolve-market to be a v2 function

* Cleanup API error responses

* Update frontend to use v2 version of resolvemarket

* Appease ESLint

* Address review comments

* Appease ESLint

* Remove unnecessary auth check

* Fix logic bug in FR market validation

* Make it so you can specify runtime opts for v2 functions

* Cleanup to resolve market API resolutions input, fixes

* Fix up tiny lint

* Last minute cleanup to resolvemarket FR API input validation

Co-authored-by: Benjamin <ben@congdon.dev>
2022-06-29 16:47:06 -07:00
Ben Congdon
5e768aa57c
Prevent duplicate Free Response answers (#581)
* Prevent duplicate Free Response answers

* Address review comments
2022-06-25 16:18:49 -07:00
ahalekelly
7a09365f00
New tooltip for binary market chart, with date and time (#529)
* New tooltip for binary market chart

* Tooltip on one line and rewrote date formatter

* Interpolate graph points and updated date format

* Reduced point count to 300 desktop, 50 mobile
2022-06-22 10:45:15 -05:00
ahalekelly
f063d5cd24
Step charts (#520)
* Use step charts

* Fixed formatting

* Fixed flat line on right side of chart

* Tweaked chart margins

* Restored right margin
2022-06-16 22:51:48 -05:00
mantikoros
c45da8c334
Tracking (#511)
* tracking helper functions

* track everything

* remove extraneous code
2022-06-15 16:34:34 -05:00
mantikoros
38c63fb3ee
Amplitude (#505)
* basic amplitude setup

* delete heap

* track referrers

* basic tracking

* delete unused import

* prettier
2022-06-14 22:00:36 -05:00
James Grugett
f3d4827115
Listen for contract updates when navigating from home to contract page. (#494) 2022-06-13 11:04:56 -05:00
Marshall Polaris
816fc5d64c Revert "Revert "Turn on no unused variables linting, kill dead code (#484)""
This reverts commit 5beda1ded7.
2022-06-12 21:42:41 -07:00
Austin Chen
5beda1ded7 Revert "Turn on no unused variables linting, kill dead code (#484)"
This reverts commit 515928a69a.
2022-06-12 20:55:48 -07:00
Marshall Polaris
515928a69a
Turn on no unused variables linting, kill dead code (#484)
* Slightly fix up ChoicesToggleGroup

* Kill a bunch of dead code and unused variables

* Turn on no-unused-vars lint

* Un-kill some dead code that James likes
2022-06-12 19:04:55 -07:00