Commit Graph

1395 Commits

Author SHA1 Message Date
mantikoros
4d153755c1 delete challenge button 2022-08-04 22:33:56 -07:00
mantikoros
1e66f4d140
Share row (#715)
* Challenge bets

* Store avatar url

* Fix before and after probs

* Check balance before creation

* Calculate winning shares

* pretty

* Change winning value

* Set shares to equal each other

* Fix share challenge link

* pretty

* remove lib refs

* Probability of bet is set to market

* Remove peer pill

* Cleanup

* Button on contract page

* don't show challenge if not binary or if resolved

* challenge button (WIP)

* fix accept challenge: don't change pool/probability

* Opengraph preview [WIP]

* elim lib

* Edit og card props

* Change challenge text

* New card gen attempt

* Get challenge on server

* challenge button styling

* Use env domain

* Remove other window ref

* Use challenge creator as avatar

* Remove user name

* Remove s from property, replace prob with outcome

* challenge form

* share text

* Add in challenge parts to template and url

* Challenge url params optional

* Add challenge params to parse request

* Parse please

* Don't remove prob

* Challenge card styling

* Challenge card styling

* Challenge card styling

* Challenge card styling

* Challenge card styling

* Challenge card styling

* Challenge card styling

* Challenge card styling

* Add to readme about how to dev og-image

* Add emojis

* button: gradient background, 2xl size

* beautify accept bet screen

* update question button

* Add separate challenge template

* Accepted challenge sharing card, fix accept bet call

* accept challenge button

* challenge winner page

* create challenge screen

* Your outcome/cost=> acceptorOutcome/cost

* New create challenge panel

* Fix main merge

* Add challenge slug to bet and filter by it

* Center title

* Add helper text

* Add FAQ section

* Lint

* Columnize the user areas in preview link too

* Absolutely position

* Spacing

* Orientation

* Restyle challenges list, cache contract name

* Make copying easy on mobile

* Link spacing

* Fix spacing

* qr codes!

* put your challenges first

* eslint

* Changes to contract buttons and create challenge modal

* Change titles around for current bet

* Add back in contract title after winning

* Cleanup

* Add challenge enabled flag

* Spacing of switch button

* market share row

* Add lite market endpoint

* 500 mana email (#687)

* Create 500-mana.html

* Update 500-mana.html

Fixed typos and links not working

* Added "create a good market" guide

added page creating-market.html
For Stephen to set up condition (email 3 days after signing up)

* Update 500-mana.html

updated 500 Mana email (still need to make changes to create market guide)

* email changes

* sendOneWeekBonusEmail logic

* add dayjs as dependency

* don't use mailgun scheduling

Co-authored-by: mantikoros <sgrugett@gmail.com>

* Challenge Bets (#679)

* Challenge bets

* Store avatar url

* Fix before and after probs

* Check balance before creation

* Calculate winning shares

* pretty

* Change winning value

* Set shares to equal each other

* Fix share challenge link

* pretty

* remove lib refs

* Probability of bet is set to market

* Remove peer pill

* Cleanup

* Button on contract page

* don't show challenge if not binary or if resolved

* challenge button (WIP)

* fix accept challenge: don't change pool/probability

* Opengraph preview [WIP]

* elim lib

* Edit og card props

* Change challenge text

* New card gen attempt

* Get challenge on server

* challenge button styling

* Use env domain

* Remove other window ref

* Use challenge creator as avatar

* Remove user name

* Remove s from property, replace prob with outcome

* challenge form

* share text

* Add in challenge parts to template and url

* Challenge url params optional

* Add challenge params to parse request

* Parse please

* Don't remove prob

* Challenge card styling

* Challenge card styling

* Challenge card styling

* Challenge card styling

* Challenge card styling

* Challenge card styling

* Challenge card styling

* Challenge card styling

* Add to readme about how to dev og-image

* Add emojis

* button: gradient background, 2xl size

* beautify accept bet screen

* update question button

* Add separate challenge template

* Accepted challenge sharing card, fix accept bet call

* accept challenge button

* challenge winner page

* create challenge screen

* Your outcome/cost=> acceptorOutcome/cost

* New create challenge panel

* Fix main merge

* Add challenge slug to bet and filter by it

* Center title

* Add helper text

* Add FAQ section

* Lint

* Columnize the user areas in preview link too

* Absolutely position

* Spacing

* Orientation

* Restyle challenges list, cache contract name

* Make copying easy on mobile

* Link spacing

* Fix spacing

* qr codes!

* put your challenges first

* eslint

* Changes to contract buttons and create challenge modal

* Change titles around for current bet

* Add back in contract title after winning

* Cleanup

* Add challenge enabled flag

* Spacing of switch button

* Put sharing qr code  in modal

Co-authored-by: mantikoros <sgrugett@gmail.com>

* See challenges you've accepted too

* Remove max height

* Notify mentioned users on market publish (#683)

* Add function to parse at mentions

* Notify mentioned users on market create

- refactor createNotification to accept list of recipients' ids

* Switch comments/chat to rich text editor (#703)

* Switch comments/chat to rich text editor

* Remove TruncatedComment

* Re-add submit on enter

* Insert at mention on reply

* Update editor style for send button

* only submit on enter in chat

* code review: refactor

* use more specific type for upload

* fix ESlint and errors from merge

* fix trigger on every render eslint warning

* Notify people mentioned in comment

* fix type errors

* Revert "Switch comments/chat to rich text editor (#703)"

This reverts commit f52da72115.

* merge conflict

* share modal

* merge issue

* eslint

* bigger link icion

Co-authored-by: Ian Philips <iansphilips@gmail.com>
Co-authored-by: James Grugett <jahooma@gmail.com>
Co-authored-by: SirSaltyy <104849031+SirSaltyy@users.noreply.github.com>
Co-authored-by: Sinclair Chen <abc.sinclair@gmail.com>
2022-08-05 00:22:45 -05:00
James Grugett
33906adfe4 Revert "Switch comments/chat to rich text editor (#703)"
This reverts commit f52da72115.
2022-08-04 16:49:59 -07:00
Sinclair Chen
f52da72115
Switch comments/chat to rich text editor (#703)
* Switch comments/chat to rich text editor

* Remove TruncatedComment

* Re-add submit on enter

* Insert at mention on reply

* Update editor style for send button

* only submit on enter in chat

* code review: refactor

* use more specific type for upload

* fix ESlint and errors from merge

* fix trigger on every render eslint warning

* Notify people mentioned in comment

* fix type errors
2022-08-04 16:34:04 -07:00
Ian Philips
798253f887
Challenge Bets (#679)
* Challenge bets

* Store avatar url

* Fix before and after probs

* Check balance before creation

* Calculate winning shares

* pretty

* Change winning value

* Set shares to equal each other

* Fix share challenge link

* pretty

* remove lib refs

* Probability of bet is set to market

* Remove peer pill

* Cleanup

* Button on contract page

* don't show challenge if not binary or if resolved

* challenge button (WIP)

* fix accept challenge: don't change pool/probability

* Opengraph preview [WIP]

* elim lib

* Edit og card props

* Change challenge text

* New card gen attempt

* Get challenge on server

* challenge button styling

* Use env domain

* Remove other window ref

* Use challenge creator as avatar

* Remove user name

* Remove s from property, replace prob with outcome

* challenge form

* share text

* Add in challenge parts to template and url

* Challenge url params optional

* Add challenge params to parse request

* Parse please

* Don't remove prob

* Challenge card styling

* Challenge card styling

* Challenge card styling

* Challenge card styling

* Challenge card styling

* Challenge card styling

* Challenge card styling

* Challenge card styling

* Add to readme about how to dev og-image

* Add emojis

* button: gradient background, 2xl size

* beautify accept bet screen

* update question button

* Add separate challenge template

* Accepted challenge sharing card, fix accept bet call

* accept challenge button

* challenge winner page

* create challenge screen

* Your outcome/cost=> acceptorOutcome/cost

* New create challenge panel

* Fix main merge

* Add challenge slug to bet and filter by it

* Center title

* Add helper text

* Add FAQ section

* Lint

* Columnize the user areas in preview link too

* Absolutely position

* Spacing

* Orientation

* Restyle challenges list, cache contract name

* Make copying easy on mobile

* Link spacing

* Fix spacing

* qr codes!

* put your challenges first

* eslint

* Changes to contract buttons and create challenge modal

* Change titles around for current bet

* Add back in contract title after winning

* Cleanup

* Add challenge enabled flag

* Spacing of switch button

* Put sharing qr code  in modal

Co-authored-by: mantikoros <sgrugett@gmail.com>
2022-08-04 15:27:02 -06:00
Ian Philips
d83e103fab Ignore clicks when hidden 2022-08-03 18:42:40 -06:00
Ian Philips
5bc905b358 Bottom padding works on mobile, broken on desktop :( 2022-08-03 16:42:51 -06:00
Ian Philips
b4c6b99e09 Remove bottom bar height correction 2022-08-03 16:38:00 -06:00
Ian Philips
756115ba54 Link tags aren't hiding sidebar on click 2022-08-03 16:30:05 -06:00
Ian Philips
fab83cfc33 Don't auotfocus on mobile 2022-08-03 16:16:46 -06:00
Ian Philips
aa3101baa9 Fix group chat padding 2022-08-03 16:10:02 -06:00
Ian Philips
82419d0b92
Groups chat ux (#713)
* Add in group chat bubble

* Show chat bubble on nav with unseen notifs

* Spacing

* More spacing

* Remove chat tab

* Show chat on help/welcome/updates/features groups

* Cleanup

* Scroll with updated height
2022-08-03 15:38:35 -06:00
James Grugett
a7d80d62cb Don't show cancel button for other people's limit orders 2022-08-03 14:30:59 -07:00
James Grugett
a761f8c65e Hide pills while searching 2022-08-03 14:17:45 -07:00
James Grugett
280308b625 Show # of bets equal to visible bets 2022-08-02 17:40:34 -07:00
James Grugett
b5d8acfef3 Switch profit in bets tab to match user page 2022-08-02 17:31:49 -07:00
Ian Philips
c24b4e77a8 Lint 2022-08-02 17:24:59 -06:00
mantikoros
5e8b9711dc hide pagination if only one page 2022-08-02 15:22:53 -07:00
mantikoros
96c0876053 manalinks: fix focus 2022-08-02 15:22:53 -07:00
Austin Chen
53d89fa4ac Show the value to 2 decimal places on hover 2022-08-02 14:59:47 -07:00
Ian Philips
0b06ded5e5
Groups contracts (#709)
* Update group links in trigger and api

* Remove extra call during creation

* Remove grouplinks on frontend

* Deserialize

* Consolidate logic

* Move function locally
2022-08-01 21:15:09 -06:00
Ian Philips
0819c3918f Most popular=> Trending 2022-08-01 09:03:46 -06:00
ingawei
ae2e7dfe30
noobify welcome demo (#699)
* noobify welcome
* also beginning to add greyscale color scheme
2022-07-30 02:50:03 -05:00
James Grugett
87f6949d80 Use custom search index for search results. Hide sort options while there's a query. 2022-07-29 18:13:53 -07:00
James Grugett
003301762c Ignore filter on contract status when searching 2022-07-29 17:37:53 -07:00
James Grugett
be01a15230
Refactor search to not use Algolia components (#705)
* In progress refactor to not use Algolia components

* Cleanup

* Only query when necessary

* Read and update url params for query and sort

* Don't push router

* Don't update url if using default sort

* Add popstate listener to improve home navigation

* Remove console.logs
2022-07-29 19:08:51 -05:00
mantikoros
5812d8ed2e manalink qr code 2022-07-29 16:02:18 -07:00
mantikoros
bdea739c55 multiple choice contract card 2022-07-29 09:20:49 -07:00
Austin Chen
693eb96d23 Include groupId when duplicating markets 2022-07-29 09:20:01 -07:00
Ian Philips
d3da6de5dd Groups default open 2022-07-28 11:37:26 -07:00
Ian Philips
05b0ca5cdb I want to see others' referrals 2022-07-28 11:16:48 -07:00
mantikoros
b6a70641a0 fix modal 2022-07-27 19:51:34 -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
Ian Philips
f32e995baa Show referrals banner on user-page 2022-07-26 15:24:16 -07:00
Marshall Polaris
b506e96548
Implement "sell all shares" functionality in sellshares and expose API (#696)
* Change `sellshares` to be able to sell all shares

* Sell all shares properly on bet panel UI

* Add API route for selling shares, document
2022-07-26 12:47:19 -07:00
Marshall Polaris
ad46a60c4f
Clean up rendering of user bets list (#694)
* Clean up crufty markup in bets list

* Don't render bet tables in bets list until expanded

* Don't look up unfilled bets for every sell button
2022-07-26 00:10:22 -07:00
Marshall Polaris
7e4f4b9a87
Clean up a bunch of crufty stuff on user comments list (#693) 2022-07-26 00:10:11 -07:00
Ian Philips
af25a6c795 Allow adding multiple contracts to group in modal 2022-07-25 18:27:43 -07:00
mantikoros
3107c8fe30 large bet warning 2022-07-25 18:11:29 -07:00
mantikoros
24124ac86a show sign up button on mobile on market page 2022-07-25 17:45:42 -07:00
Marshall Polaris
64462d6ab4
Make tabs components better (#691)
* Make better tabs components, apply to user page

* Remove fishy unused href property from tabs

* Remove tab ID property

* Clean up crufty markup in tabs component

* Fix naming to be right (thanks James!)
2022-07-25 13:27:09 -07:00
mantikoros
d8f96876a0 PlayMoneyDisclaimer copy; hide order book for signed out users 2022-07-25 12:29:29 -07:00
mantikoros
d82c7d7f3e “added liquidity” ⇒ “added a subsidy” 2022-07-25 12:22:38 -07:00
mantikoros
d982d0332c play money wording 2022-07-24 23:38:57 -07:00
mantikoros
df91310d0f PlayMoneyDisclaimer; hide limit orders for signed out users; infobox styling 2022-07-24 23:28:05 -07:00
Austin Chen
6ad43b02c7 Show the number of comments and bets 2022-07-24 00:11:35 -07:00
Sinclair Chen
6c89e5f18f
Add @ mentions to editor (#670)
* Add @ mentions to editor

* Fix mention list not loading

* Sort mention list by prefix, follow count

* Render at mention with Linkify component

- mentions are now Next <Link> rather than <a>
- fix bug where editor.getText() returns [object Object] for mentions
- fix mention rendering for posted markets
2022-07-23 20:37:34 -07:00
James Grugett
64f2dbbe71 Fix unused var 2022-07-23 15:26:08 -05:00
James Grugett
f43df42449 Change card to show volume instead of pool 2022-07-23 15:23:47 -05:00
James Grugett
71b20eb61a Tweak visually hidden style 2022-07-23 15:10:54 -05:00
James Grugett
7f42796724 Update algolia filters to use groupLinks.slug isntead of deprecated groupSlugs field. 2022-07-23 15:02:08 -05:00
Austin Chen
71880dfc98
Add a toolbar for images and iframes (#688)
* Add a toolbar for images and iframes

* Insert embed code via modal
2022-07-23 09:19:49 -07:00
James Grugett
408027dd6a Fix bug 2022-07-22 22:44:21 -05:00
James Grugett
2116b86aec Fix infinite loop in numeric limit bet 2022-07-22 21:03:08 -05:00
Ian Philips
5f074206de
Backfill and forward fill contracts with group info (#686)
* Backfill and forward fill contracts with group info

* No nested queries :(

* Fix filter

* Pass empty arrays instead of undefined
2022-07-22 16:28:53 -06:00
James Grugett
5899c1f3c0 Fix lints 2022-07-22 16:30:07 -05:00
James Grugett
135160dd92 Remove custom placeholders. Just show '0' for limit inputs 2022-07-22 16:18:36 -05:00
James Grugett
a1d51e3778 Update labels for numeric market outcomes 2022-07-22 16:07:59 -05:00
James Grugett
f800570845 Improve range limit order UI 2022-07-22 16:03:55 -05:00
Ian Philips
63d8e6739b Add title, mobile flex 2022-07-22 13:53:19 -06:00
James Grugett
d3d472f5d2 Hide "Your bets" when signed out. "For you" becomes "Featured" when signed out. 2022-07-22 14:50:29 -05:00
Ian Philips
6fb9849007
Allow to add/remove from groups on market page (#685)
* Allow to add/remove from groups on market page

* remove lib

* Fix Sinclair's relative import from May

* Clean
2022-07-22 11:34:10 -06:00
mantikoros
163c990e9d "bettors" => "traders" 2022-07-22 12:03:33 -05:00
mantikoros
624df76393 search: sort by liquidity; remove oldest 2022-07-22 11:24:25 -05:00
Austin Chen
7cace82b83
Render iframes inside the rich text editor (#682)
* Try embedding iframes in tiptap

* When iframe code is pasted, inject it into the editor

* Code cleanups and comments

* Remove clsx dependency

Cuz it doesn't exist in `common` anyways

* Rename to tiptap-iframe
2022-07-22 09:12:23 -07:00
Marshall Polaris
08fd27cb26
Make main login/logout buttons reload server side props (#677)
* Set cookies in auth handler before looking up user

* Make sidebar logout button trigger SSR reload

* Make sidebar login button trigger SSR reload
2022-07-22 00:03:16 -07:00
James Grugett
3b953a7c21
Range limit orders (#655)
* Prototype range limit order UI

* Conditionally show YES or NO max payout

* Range bet executes both bets immediately.

* Validate lowLimitProb < highLimitProb

* Show error if low limit is higher than high limit

* Update range order UI

* Revert "Validate lowLimitProb < highLimitProb"

This reverts commit c261fc2743.

* Revert "Range bet executes both bets immediately."

This reverts commit 30b95d75d9.

* Buy panel only non-limit orders

* Bet choice => outcome

* More iterating on range UI

* betChoice => outcome

* Lighten placeholder text
2022-07-22 00:57:56 -05:00
James Grugett
23b704ffe0 Fix excessive bottom margin on chart 2022-07-21 21:51:20 -05:00
James Grugett
ca5ca9b2b8 Refactor: Move ContractLeaderboard to its own file 2022-07-21 21:39:06 -05:00
ingawei
7474c0a0fd
Inga/manalinks pagination bug (#678)
* manalink pagination fix
* also fixed new manalink timing out bug
2022-07-21 20:22:17 -05:00
mantikoros
cded3f50ff "question" => "market" (controversial!) 2022-07-21 18:17:02 -05:00
mantikoros
80b27fdf6e Put leadeboards back in sidebar 2022-07-21 17:23:55 -05:00
mantikoros
91bec9c996
Referrals page (#676)
* Referrals page added to sidebar; useSaveReferral; InfoBox

* text color

* eslint

* migrate useUsers hook to react-query (#674)

* Remove bet button from free response comments

* Make answer replies more closely spaced together

* Host Ida and Alex's MTG Guesser game (#656)

* Copy over code from Mtg Guesser

* Run Prettier

* CSS Tweaks: Hover feedback, button positioning

* Hide all but counterspell & burn, for now

* Move to /mtg directory

* Fix prettierignore

* smaller jsons (#673)

limited burn to only red cards and also added limited json files to only have fields needed to play

* Add Ida's tweak to card position

Co-authored-by: marsteralex <bob.masteralex@gmail.com>

* Adjust card positioning

* Make the select screen index.html

* Remove other guessing games

* Remove alternate versions; add Alex's email

* Remove unused jsons

* Small FR comments tweaks

* Spacing tweak

* Changing manalinks table UI (#665)

From table to card view

* Fix comment spacing on non-FR

* Move "Send M$" lower in sidebar More list.

* Move leaderboards up in mobile nav

* eslint

* prettier

Co-authored-by: Sinclair Chen <abc.sinclair@gmail.com>
Co-authored-by: James Grugett <jahooma@gmail.com>
Co-authored-by: Austin Chen <akrolsmir@gmail.com>
Co-authored-by: marsteralex <bob.masteralex@gmail.com>
Co-authored-by: ingawei <46611122+ingawei@users.noreply.github.com>
2022-07-21 14:43:10 -05:00
mantikoros
96e9f749d2 track search categories 2022-07-21 12:45:47 -05:00
Marshall Polaris
03858e4a8c
Make a React context to be the source of truth for authenticated user (#675)
* Make a React context to manage the logged in user events

* Remove unnecessary new user creation promise machinery

* Slight refactoring to auth context code

* Improvements in response to James feedback
2022-07-21 00:38:26 -07:00
James Grugett
8aa360c853 Move leaderboards up in mobile nav 2022-07-21 00:52:11 -05:00
James Grugett
21c08aed30 Move "Send M$" lower in sidebar More list. 2022-07-21 00:50:28 -05:00
James Grugett
2ad7266283 Fix comment spacing on non-FR 2022-07-21 00:46:57 -05:00
ingawei
7a041fd753
Changing manalinks table UI (#665)
From table to card view
2022-07-21 00:45:53 -05:00
James Grugett
f7151f131d Spacing tweak 2022-07-20 22:37:43 -05:00
James Grugett
8f5e51a304 Small FR comments tweaks 2022-07-20 22:13:37 -05:00
James Grugett
528dd2b28a Make answer replies more closely spaced together 2022-07-20 18:35:09 -05:00
James Grugett
5ddf496dae Remove bet button from free response comments 2022-07-20 18:35:09 -05:00
mantikoros
49dcd97d70 feed bets: better prob display 2022-07-20 17:04:11 -05:00
mantikoros
75a1d606cb feed bets: show change in prob 2022-07-20 16:28:25 -05:00
James Grugett
c35d0a8bc6 Split out "Your bets" from "For you" 2022-07-20 15:30:07 -05:00
James Grugett
44afa92b58 Turn off for you by default 2022-07-20 15:05:48 -05:00
James Grugett
e45d81513c Don't filter by personal unless pills enabled 2022-07-20 14:49:16 -05:00
Sinclair Chen
0870397fea Show line in menu on mobile 2022-07-20 12:36:23 -07:00
mantikoros
45b883477d generic copy link button 2022-07-20 11:42:49 -05:00
mantikoros
b517f7cfa7 eslint; remove unused tags import 2022-07-20 00:35:27 -05:00
mantikoros
2b13085dff search: use default categories for non-authed users 2022-07-20 00:23:00 -05:00
mantikoros
0013f76873 search defaults to 'for you'; hide pills for additional filters 2022-07-20 00:03:03 -05:00
mantikoros
83e9408d69 remove tags from info panel 2022-07-19 23:48:09 -05:00
James Grugett
b2c89d36cf Home: Show pills that are groups (in addition to All, For you) 2022-07-19 18:23:52 -05:00
mantikoros
b48e910f70 fix areaBaselineValue 2022-07-19 18:20:03 -05:00
mantikoros
bab828412b group: add question button 2022-07-19 18:16:03 -05:00
Ian Philips
2152e5286a Score & sort by unique bettors in last 3 days 2022-07-19 16:29:41 -06:00
James Grugett
58d6286361 Fix chart area extending into labels below 2022-07-19 17:22:58 -05:00
James Grugett
6124ea01f6 Fix a DOM error in console 2022-07-19 16:57:32 -05:00
James Grugett
af6552958f Show all-time profit on UserPage 2022-07-19 16:05:50 -05:00
James Grugett
fc9e261601 Fix build 2022-07-19 15:45:47 -05:00
James Grugett
e9ad30cc74 Increase number of contracts shown in bets list 2022-07-19 15:43:37 -05:00
Ian Philips
b5ef7490c3 NotificationSettings to its own file 2022-07-19 14:24:36 -06:00
Ian Philips
6dcad6225b Next/Previous => Older/Newer 2022-07-19 14:16:20 -06:00
James Grugett
b6c8390a46 Show order book button even on Quick bet 2022-07-19 15:01:15 -05:00
James Grugett
74760b1062 Reorder orderbook columns 2022-07-19 14:53:33 -05:00
mantikoros
12567074cc fix log scale graph 2022-07-19 12:31:26 -05:00
Marshall Polaris
0d282a962c
Don't setQuery on group selector component during initial render (#660) 2022-07-19 09:35:43 -06:00
Austin Chen
2bae7dc200 Fix error on no portfolio history 2022-07-19 02:54:05 -07:00
Austin Chen
b501776e33 Remove quadratic matching from /charity 2022-07-19 00:20:18 -07:00
mantikoros
8793288dc8 contract description: less prominent edit buttons 2022-07-18 19:17:45 -05:00
Marshall Polaris
f2a7a145e4
Add React key prop to homepage filter widget (#661) 2022-07-18 18:37:46 -05:00
James Grugett
61a21d34b2 Order limit bets in sorted order on mobile 2022-07-18 18:19:30 -05:00
Austin Chen
47a27bf3fe
Label "Since June" for users who had an account prior to 2022-06-20 (#659) 2022-07-18 15:55:17 -07:00
Sinclair Chen
781de79b97 Make description text style more consistent
- links and blockquotes have light font weight, like other text
- font size in editor matches font size in description
- old descriptions have same style as new
- placeholder text matches editor style
- decrease line-height a bit
2022-07-18 14:03:05 -07:00
mantikoros
65e4f24531 groups: only change layout if sidebar chat, smaller leave button 2022-07-18 12:55:49 -05:00
Ian Philips
229d270d25 Set max width on avatars 2022-07-18 08:34:20 -06:00
Ian Philips
eb4906cb97 Remove query from notif isSeen logic 2022-07-18 08:18:40 -06:00
Ian Philips
906cfc29c8 Endswith=>includes to handle sort query in group chat 2022-07-18 07:59:21 -06:00
Austin Chen
f393246e4f
Let users edit descriptions and questions (#654)
* Use rich text editor on the description

* Write a new line to description when the question is changed

* Stop showing categories

* Allow anyone to edit their own question
2022-07-17 22:22:44 -07:00
mantikoros
281b712258 move group chat to sidebar on desktop 2022-07-17 15:56:39 -05:00
mantikoros
b5f0b58898 usePing 2022-07-17 15:17:31 -05:00
James Grugett
c1d77f48e3 Fix tag filter 2022-07-16 18:56:21 -05:00
Austin Chen
60f4e43cf3 Prettier fix 2022-07-16 12:51:22 -07:00
James Grugett
7feacbd961 Tweak wording 2022-07-16 14:37:03 -05:00
James Grugett
7b6344d976 Order book button opens full table of limit orders in dialog 2022-07-16 14:21:25 -05:00
Austin Chen
32cb19d01f Randomize image upload path to avoid collisions 2022-07-16 11:39:58 -07:00
Austin Chen
1bc49dc0a2 Tweak placeholder copy 2022-07-16 11:39:58 -07:00
Austin Chen
349772a2f9 Description typography: font-light, text-base 2022-07-16 11:39:58 -07:00
Austin Chen
916618be31 Disable quotation marks in quotes 2022-07-16 11:39:58 -07:00
ingawei
7d24a3e4a2
Inga/manalink bug fixes (#653)
* fixed manalinks bug of claiming own manalink, and also rerouting to home upon claiming if not logged in
* no more multiple hardcoded manalink messages
2022-07-15 20:42:37 -05:00
Sinclair Chen
2543bdcdfc
refactor string matching (#649) 2022-07-15 14:16:00 -07:00
James Grugett
feba0b58ee Turn search filters into pills 2022-07-15 15:06:33 -05:00
James Grugett
1ca73ecd4d Add size prop to button 2022-07-15 12:24:07 -05:00
James Grugett
ec682788e0 Put back old Yes/No bet buttons 2022-07-15 11:03:42 -05:00
Ian Philips
0be38c4e09 Online users list ui, remove from followers list 2022-07-15 09:32:03 -06:00
Ian Philips
50447cf8d3 Unused vars 2022-07-15 08:48:35 -06:00
Ian Philips
d54a72c431 Remove extra comment 2022-07-15 08:47:19 -06:00
Ian Philips
dd9d24e657 Show online users on desktop 2022-07-15 08:45:52 -06:00
Ian Philips
2610f32521 Correct my username 2022-07-15 07:35:17 -06:00
Ian Philips
9c49f2e2d7 Revert "Revert "Order groups by most recent chat activity (#650)""
This reverts commit 17c9beca28.
2022-07-15 06:52:08 -06:00
James Grugett
36851ae9f9 Exclude more mobile options from private instances 2022-07-15 00:45:50 -05:00
James Grugett
64c83c4ef0 Don't show portfolio no history message 2022-07-14 23:56:30 -05:00
James Grugett
590c63e911 Small fixes for limit order table 2022-07-14 21:27:00 -05:00
James Grugett
17c9beca28 Revert "Order groups by most recent chat activity (#650)"
This reverts commit 6e1aa4b0f4.
2022-07-14 20:51:38 -05:00
ingawei
2f02e4d3e0
minor tweaks of manalink form (#647)
* minor tweaks of manalink form, adding M$ in front of amount and changing expire time to dropdown instead of calendar selection
* made minimum for uses and amount 1, it seems otherwise it does not generate a link at all
2022-07-14 19:43:06 -05:00
Ian Philips
44d993a588 Bold group for old chat notif 2022-07-14 17:03:08 -06:00
Ian Philips
6e1aa4b0f4
Order groups by most recent chat activity (#650)
* Order groups by most recent chat activity

* Use group chat slug constant

* Match source slug and isSeenOnHref

* Listen for group member changes
2022-07-14 16:46:45 -06:00
Ian Philips
27a544205f Optimistically join groups 2022-07-14 11:09:28 -06:00
Sinclair Chen
5ebd4498a0
Remove deprecated useUserById implementation (#571)
* Remove duplicate useUserById implementation

* fix bug: firebase doesn't accept empty paths
2022-07-13 17:43:20 -07:00
Sinclair Chen
095af10d4f replace raw checkbox w/ Checkbox component
also run prettier
2022-07-13 16:50:08 -07:00
James Grugett
f4b7b9efd0 Only show probabilty update with arrow if probability changes 2022-07-13 18:39:32 -05:00
James Grugett
67b3450924 Use quick vs limit bet in mobile dialog 2022-07-13 18:28:33 -05:00
James Grugett
9240cd3d1c Bet panel: Quick vs Limit pill buttons. Also, pill buttons for Yes vs No. 2022-07-13 18:23:36 -05:00
Sinclair Chen
98192ee580 simplify rich text link styles 2022-07-13 16:14:44 -07:00
Sinclair Chen
664e55a40b
Add typing, pasting links (#646) 2022-07-13 15:56:15 -07:00
Ian Philips
7a49549389 Ignore rankings/members for huge groups for now 2022-07-13 16:20:56 -06:00
ingawei
a4e2cce4aa
initial commit for manalinks UI improvements (#642)
* manalinks UI improvements

* made manalink look more like card

* changed new link to pulsing indigo instead of green
2022-07-13 16:57:34 -05:00
Ian Philips
55c91dfcdd
Categories to groups (#641)
* start on script

* Revert "Remove category filters"

This reverts commit d6e808e1a3.

* Convert categories to official default groups

* Add new users to default groups

* Rework group cards

* Cleanup

* Add unique bettors to contract and sort by them

* Most bettors to most popular

* Unused vars

* Track unique bettor ids on contracts

* Add followed users' bets to personal markets

* Add new users to welcome, bugs, and updates groups

* Add users to fewer default cats
2022-07-13 15:11:22 -06:00
James Grugett
e868f0a15a Fix pagination component going one page too far + tweaks 2022-07-13 15:15:03 -05:00
James Grugett
9075a6f33a Add headers to limit orders table 2022-07-13 14:59:51 -05:00
Sinclair Chen
a92eda3af2 fix bug where descriptions not showing 2022-07-13 12:36:01 -07:00
Sinclair Chen
9a11f55762
Rich content (#620)
* Add TipTap editor and renderer components

* Change market description editor to rich text

* Type description as JSON, fix string-based logic

- Delete make-predictions.tsx
- Delete feed logic that showed descriptions

* wip Fix API validation

* fix type error

* fix extension import (backend)

In firebase, typescript compiles imports into common js imports
like `const StarterKit = require("@tiptap/starter-kit")`

Even though StarterKit is exported from the cjs file, it gets imported
as undefined. But it magically works if we import *

If you're reading this in the future, consider replacing StarterKit with
the entire list of extensions.

* Stop load on fail create market, improve warning

* Refactor editor as hook / fix infinite submit bug

Move state of editor back up to parent
We have to do this later anyways to allow parent to edit

* Add images - display, paste + uploading

* add uploading state of image

* Fix placeholder, misc styling

min height, quote

* Fix appending to description

* code review fixes: rename, refactor, chop carets

* Add hint & upload button on new lines

- bump to Tailwind 3.1 for arbitrary variants

* clean up, run prettier

* rename FileButton to FileUploadButton

* add image extension as functions dependency
2022-07-13 11:58:22 -07:00
mantikoros
83d8f18bd7 fix bet summary selling 2022-07-13 13:20:53 -05:00
James Grugett
f1eea66588 Show all limit orders in a tab 2022-07-13 12:15:00 -05:00
mantikoros
737d803903 bet row: default to YES 2022-07-13 11:20:29 -05:00
Ian Philips
18abad38b6 Unused var 2022-07-13 09:13:34 -06:00
Ian Philips
cc1431da60 Disable enter submit on mobile on group chat 2022-07-13 09:12:43 -06:00
Ian Philips
490eabf977 Revert "Revert "Disable enter to submit on mobile group chat""
This reverts commit e3f7f0efda.
2022-07-13 09:08:32 -06:00
Ian Philips
e3f7f0efda Revert "Disable enter to submit on mobile group chat"
This reverts commit b3f4c2f009.
2022-07-13 08:44:27 -06:00
Ian Philips
b3f4c2f009 Disable enter to submit on mobile group chat 2022-07-13 08:34:14 -06:00
Ian Philips
9e90f849a8 Show group scrollbars only when needed 2022-07-13 07:57:51 -06:00
mantikoros
1f2bdf40d0 bet row: fix labels 2022-07-13 00:07:12 -05:00
mantikoros
68343701ca answer bet panel: scroll up on ios 2022-07-12 17:47:48 -05:00
mantikoros
5c166b9dd5 bet row: 'higher' 'lower' labels 2022-07-12 17:47:28 -05:00
mantikoros
38aad40569
Simplify bet buttons (#644)
* mono-button bet row

* "bet yes" => "yes"

* prettier
2022-07-12 17:34:10 -05:00
mantikoros
dd9fdc381f track limit orders 2022-07-12 16:55:00 -05:00
mantikoros
24896e44b4 "limit bet" => "limit order" 2022-07-12 16:46:03 -05:00
Marshall Polaris
43b30e6d04
Don't "warm up" resolveMarket anymore (#638) 2022-07-12 12:36:10 -07:00
James Grugett
0882f1c0d6 Remove top Pagepadding on small screens 2022-07-11 19:07:37 -05:00
James Grugett
b8d7c2ee17 Size group chat window & nav bar list of groups precisely. Update Page margin/padding. 2022-07-11 18:40:25 -05:00
James Grugett
24fac1fc0b Fix erronous 0 prob shown in table 2022-07-11 15:53:13 -05:00
Ian Philips
ed9a2c0d35 Set min height for group chat 2022-07-11 14:52:16 -06:00
James Grugett
90a75985dd In market bets tab, show limit orders' total order amount 2022-07-11 11:46:09 -05:00
James Grugett
9b252b93ab Fix fee calculation in bet panel tooltip 2022-07-11 10:54:37 -05:00
James Grugett
dd6f5e5ef4 Show better limit order stats in bets table 2022-07-11 10:49:36 -05:00
James Grugett
098f20ccad Fix limit bet filter to exclude cancelled and filled bets 2022-07-10 22:28:29 -05:00
James Grugett
89d48d6c34 Use hook to fetch user bets 2022-07-10 22:28:04 -05:00
James Grugett
99fcfa6be7 Add portfolio filter for limit bets. 2022-07-10 22:15:07 -05:00
James Grugett
9586e81e95 Show limit bets in bets table 2022-07-10 22:07:42 -05:00
James Grugett
fd7384a099 Hide referrals button on user page 2022-07-10 19:59:23 -05:00
James Grugett
5e1ed17cdf Load contracts at UserPage top level instead of in BetsList 2022-07-10 19:19:35 -05:00
James Grugett
f294189e20 Refactor notifications to use Pagination component 2022-07-10 18:50:59 -05:00
James Grugett
162e73912e Paginate bets list 2022-07-10 18:41:33 -05:00
James Grugett
5c6a143614 Change portfolio graph option labels 2022-07-10 18:26:06 -05:00
James Grugett
78ceac0659 Don't load user bets twice 👀 2022-07-10 18:22:21 -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
James Grugett
f2df32e710 PseudoNumeric markets store resolveValue in resolved notification and render it 2022-07-10 14:52:31 -05:00
James Grugett
80ae551ca9
🧾 Limit orders! (#495)
* Simple limit order UI

* Update bet schema

* Restrict bet panel / bet row to only CPMMBinaryContracts (all binary DPM are resolved)

* Limit orders partway implemented

* Update follow leaderboard copy

* Change cpmm code to take some state instead of whole contract

* Write more of matching algorithm

* Fill in more of placebet

* Use client side contract search for emulator

* More correct matching

* Merge branch 'main' into limit-orders

* Some cleanup

* Listen for unfilled bets in bet panel. Calculate how the probability moves based on open limit orders.

* Simpler switching between bet & limit bet.

* Render your open bets (unfilled limit orders)

* Cancel bet endpoint.

* Fix build error

* Rename open bets to limit bets. Tweak payout calculation

* Limit probability selector to 1-99

* Deduct user balance only on each fill. Store orderAmount of bet. Timestamp of fills.

* Use floating equal to check if have shares

* Add limit order switcher to mobile bet dialog

* Support limit orders on numeric markets

* Allow CORS exception for Vercel deployments

* Remove console.logs

* Update user balance by new bet amount

* Tweak vercel cors

* Try another regexp for vercel cors

* Test another vercel regex

* Slight notifications refactor

* Fix docs edit link (#624)

* Fix docs edit link

* Update github links

* Small groups UX changes

* Groups UX on mobile

* Leaderboards => Rankings on groups

* Unused vars

* create: remove automatic setting of log scale

* Use react-query to cache notifications (#625)

* Use react-query to cache notifications

* Fix imports

* Cleanup

* Limit unseen notifs query

* Catch the bounced query

* Don't use interval

* Unused var

* Avoid flash of page nav

* Give notification question priority & 2 lines

* Right justify timestamps

* Rewording

* Margin

* Simplify error msg

* Be explicit about limit for unseen notifs

* Pass limit > 0

* Remove category filters

* Remove category selector references

* Track notification clicks

* Analyze tab usage

* Bold more on new group chats

* Add API route for listing a bets by user (#567)

* Add API route for getting a user's bets

* Refactor bets API to use /bets

* Update /markets to use zod validation

* Update docs

* Clone missing indexes from firestore

* Minor notif spacing adjustments

* Enable tipping on group chats w/ notif (#629)

* Tweak cors regex for vercel

* Your limit bets

* Implement selling shares

* Merge branch 'main' into limit-orders

* Fix lint

* Move binary search to util file

* Add note that there might be closed form

* Add tooltip to explain limit probability

* Tweak

* Cancel your limit orders if you run out of money

* Don't show amount error in probability input

* Require limit prob to be >= .1% and <= 99.9%

* Fix focus input bug

* Simplify mobile betting dialog

* Move mobile limit bets list into bet dialog.

* Small fixes to existing sell shares client

* Lint

* Refactor useSaveShares to actually read from localStorage, use less bug-prone interface.

* Fix NaN error

* Remove TODO

* Simple bet fill notification

* Tweak wording

* Sort limit bets by limit prob

* Padding on limit bets

* Match header size

Co-authored-by: Ian Philips <iansphilips@gmail.com>
Co-authored-by: ahalekelly <ahalekelly@gmail.com>
Co-authored-by: mantikoros <sgrugett@gmail.com>
Co-authored-by: Ben Congdon <ben@congdon.dev>
Co-authored-by: Austin Chen <akrolsmir@gmail.com>
2022-07-10 13:05:44 -05:00