Commit Graph

1633 Commits

Author SHA1 Message Date
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
mantikoros
d063e209dd Revert "expand search bar when typing on mobile"
This reverts commit 43b1096313.
2022-07-09 22:04:50 -04:00
mantikoros
43b1096313 expand search bar when typing on mobile 2022-07-09 17:27:39 -04:00
Marshall Polaris
67a05c2f1b
Migrate transact function to v2 (#635) 2022-07-09 13:54: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
Marshall Polaris
d9f42caa6a
Migrate addLiquidity and withdrawLiquidity functions to v2 (#627) 2022-07-08 15:08:17 -07:00
mantikoros
93b293ca0e remove quick betting for FR markets 2022-07-08 12:50:46 -04:00
mantikoros
50c5f8b6eb reenable fees on share sales; rename getCpmmFees() 2022-07-08 12:34:16 -04:00
Ian Philips
b1b016f9e0
Enable tipping on group chats w/ notif (#629) 2022-07-07 17:23:13 -06:00
Ian Philips
999c1cd8e3 Bold more on new group chats 2022-07-07 15:52:28 -06:00
Ian Philips
e456b9a855 Analyze tab usage 2022-07-07 15:24:13 -06:00
Ian Philips
3ff8b26312 Remove category selector references 2022-07-07 14:55:28 -06:00
Ian Philips
d6e808e1a3 Remove category filters 2022-07-07 14:45:26 -06:00
Ian Philips
cfbb78af48
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
2022-07-07 14:41:50 -06:00
Ian Philips
7f8617832f Unused vars 2022-07-07 07:05:12 -06:00
Ian Philips
93b2900015 Groups UX on mobile 2022-07-07 06:53:14 -06:00
Ian Philips
a23c744c3e Small groups UX changes 2022-07-06 17:24:53 -06:00
Ian Philips
de20ee9fb9
Show tip notifications (#623)
* Show tip notifications

* Optimizing notifications for mobile

* Unused vars

* Move income reason logic to income notif

* Remove unnecessary icons

* Unused vars
2022-07-06 13:30:51 -06:00
Austin Chen
2d1e76eae8 When duplicating, add the original link in description 2022-07-06 10:39:19 -07:00
Ian Philips
434b8b9dbe Just show first names to save space 2022-07-06 07:51:32 -06:00
Austin Chen
b71944607b Simplify Tweet text 2022-07-05 16:48:59 -07:00
Austin Chen
cb25a7752d
Duplicate a question from '...' screen (#622)
* Duplicate a question from '...' screen

* Remove unused code
2022-07-05 16:26:58 -07:00
Ian Philips
3a6d28e2c2
Bold groups with recent chat activity (#621)
* Bold groups with recent chat activity

* Cleanup

* Cleanup
2022-07-05 17:18:37 -06:00
Sinclair Chen
270a5fc139 also filter by username when adding people 2022-07-05 14:34:16 -07:00
Ian Philips
b26648c1ce
Daily trading bonuses (#618)
* first commit, WIP

* Give trading bonuses & paginate notifications

* Move read & update into transaction

* Move request bonus logic to notifs icon
2022-07-05 11:29:26 -06:00
Ian Philips
790fdad1e3 Display refered by publicly 2022-07-04 09:18:01 -06:00
Ian Philips
22f917e250 Avatar sizes to 24, size 20 is broken 2022-07-04 08:32:51 -06:00
Ian Philips
e712ad8289
Allow users to choose who referred them (#611)
* Allow users to choose who referred them

* Refactor

* Rewording

* Match list styles

* Match empty text styles
2022-07-04 07:49:41 -06:00
mantikoros
d78bbcb3df fix navbar tracking 2022-07-03 23:43:18 -04:00
Pico2x
960f8a1b3d
Toggle weekly leaderboard and daily/weekly/alltime portfolio graph (#616)
* Toggle weekly leaderboard and daily/weekly/alltime portfolio graph

* Formatmoney for tooltip value
2022-07-03 14:18:12 -05:00
mantikoros
1a6afaf44f
Pseudo numeric market (#609)
* create pseudo-numeric contracts

* graph and bet panel for pseudo numeric

* pseudo numeric market layout, quick betting

* Estimated value

* sell panel

* fix graph

* pseudo numeric resolution

* bets tab

* redemption for pseudo numeric markets

* create log scale market, validation

* log scale

* create: initial value can't be min or max

* don't allow log scale for ranges with negative values (b/c of problem with graph library)

* prettier delenda est

* graph: handle min value of zero

* bet labeling

* validation

* prettier

* pseudo numeric embeds

* update disclaimer

* validation

* validation
2022-07-02 14:37:59 -05:00
Ian Philips
2dce3e15a1 Correct margin on tabs 2022-07-01 17:03:26 -06:00
Ian Philips
b9931e65da Allow adding anyone's contract to a group 2022-07-01 16:37:30 -06:00
James Grugett
cb68530e2a Use client side contract search for emulator 2022-07-01 12:26:45 -04:00
Ian Philips
3165e42119
Referrals (#592)
* add trigger for updated user

* Add referral bonuses and notifications for them

* Cleanup

* Add share group button, cleanup

* Cleanup

* Add referrals list to user profile

* Remove unused

* Referral bonus => constant

* Refactor

* Add referral txn to helper fn

* Move reads into firebase transaction

* Use effects to write referral info

* Flex-wrap profile objects

* Small ui changes

* Restrict referral user to one update

* Remove rogue semicolon

* Note about group referral query details

* Track referrals, add them to settings list
2022-07-01 07:47:19 -06: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
Austin Chen
19d12c949a Add a line spacer on the sidebar 2022-06-29 17:51:11 -05:00
Austin Chen
8132fa595b Don't add space when there are 0 groups 2022-06-29 13:08:01 -05:00
Austin Chen
2d79d7f8db
Rework nav to show list of groups (#596)
* Rework nav to show list of groups

* Fix lint

* Replace Portfolio with Profile link

* Lint: remove unused vars
2022-06-29 12:33:20 -05:00
Ian Philips
8c3c30c707
Show groups on user page, allow to join/leave (#594)
* Show groups on user page, allow to join/leave

* Link to groups

* Unused var
2022-06-29 11:00:43 -05:00
Austin Chen
c18a0378e9 Tweak nav items around 2022-06-28 11:18:55 -05:00
Austin Chen
2f434c849d Remove portfolio link; user icon links to portfolio 2022-06-28 11:03:14 -05:00
Sinclair Chen
54356b8d2f
Remove undo. Show full tip amount. Linear scale. (#573) 2022-06-27 11:18:15 -05:00
Austin Chen
c1765ca0cb Use green for FR (and numeric) cards 2022-06-26 19:44:10 -05:00
Ben Congdon
3b6ba76db6
Add market liquidity addition events to bets feed (#578)
* Add liquidity events to bets feed

* Use larger avatar for liquidity feed items
2022-06-26 19:00:02 -05: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
Austin Chen
da81035e58 Group leaderboards show members only by default 2022-06-24 18:38:39 -05:00
James Grugett
b7dbcaaadf Run prettier 2022-06-24 12:27:03 -05:00
James Grugett
8d7bf6fb64 Apply tag and creatorId filters to contract firestore search 2022-06-24 12:19:04 -05:00
Ian Philips
8ced159d9a Various group & mobile ux improvements 2022-06-24 12:16:37 -05:00
Pico2x
ebc4bd6bcf
[PortfolioGraph] Shows a graph of the portfolio value over time (#570)
* [Portfolio Graph] Shows a graph of the portfolio value over time

* [PortfolioGraph] Fix some nits.

* [PortfolioGraph] Comment out portfolio-value-section

Hides the component completely for now, so we can land today. My plan would be to land today, wait for the history to build up, and then revert this commit. As opposed to leaving the PR idle for a while, and then have to deal with conflicts.

* [PortfolioGraph] Rm duplicate firestore rule
2022-06-24 12:14:20 -05:00
Marshall Polaris
603bec9e88
Ameliorate homepage search spam (#564)
* Don't recompute search filters when follows loaded unnecessarily

* Don't wait for router to get saved search sort
2022-06-23 16:47:03 -07:00
Ian Philips
f0d4e9940c Improve group user search 2022-06-23 16:49:14 -05:00
Ian Philips
17ac6c58b2 Don't prompt to comment on FR bets, arrow spacing 2022-06-23 16:09:26 -05:00
Sinclair Chen
8cc0cf160a lint 2022-06-23 14:41:42 -05:00
Sinclair Chen
00c2012ccf Refactor empty avatar component 2022-06-23 14:23:40 -05:00
Ian Philips
9757ed1d8b lint 2022-06-23 13:02:52 -05:00
Ian Philips
211905c27f Free daily markets on hiatus 2022-06-23 13:00:14 -05:00
Ian Philips
b569f67fc1 Group discussion ux improvements 2022-06-23 12:36:09 -05:00
ahalekelly
28c8cc6863
Fix line off the right of closed markets (#569) 2022-06-23 12:13:13 -05:00
Ben Congdon
cdd8af241b
Show resolution time in market cards when appropriate (#565)
* Show resolution time in market cards when appropriate

* Rebase and fix contract-search-firestore
2022-06-23 12:12:57 -05:00
Austin Chen
6cc2d8af58
Manalink: Send mana to anyone via link (#114)
* Set up Firestore structure for mana bounty links

* Split up manalinks into successes and failures

* Allow clients to create manalinks

* Track txnId and successful users

* Store custom amounts in the link

* List all manalinks you've created

* Support backend for claiming manalinks

* Add some more error handling

* Tweak readme

* Fix typescript breakage

* Revert "Convert common imports in functions to be absolute"

This reverts commit c03518e906.

* Scaffolding so `claimManalink` works

* Clean up imports

* Barebones endpoint to claim mana

* Fix rules to only allow link creators to query

* Design out claim giftcard

* List all claimed transactions

* Style in a more awesome card

* Fix import

* Padding tweak

* Fix useManalinkTxns hook

* /send -> /link

* Tidy up some details

* Do a bunch of random manalinks work

* Fix up LinksTable to build

* Clean up LinksTable an absurd amount

* Basic details functionality on manalinks table

* Work on manalink claim stuff

* Fix up some merge mess

* Not-signed-in flow implemented

* Better manalinks table

* Only show outstanding links in table

* Use new `ManalinkTxn` type

* /link -> /links

* Change manalinks page UI to use nice looking tabs

* Many fixes to manalinks UI

* Default to 1 use

* Tidying up

* Some copy changes based on feedback

* Add required index

Co-authored-by: Marshall Polaris <marshall@pol.rs>
2022-06-23 01:07:52 -07:00
Austin Chen
ba39eb114c Hide "Get M$" on private instances 2022-06-22 19:02:50 -05:00
Austin Chen
6f789c9363 Fix build 2022-06-22 18:45:48 -05:00
Austin Chen
fee36a378c Use firestore-based search for private instances 2022-06-22 18:44:23 -05:00
James Grugett
16ac25bb77 Move more nav options to More menu on mobile 2022-06-22 17:34:43 -05:00
Ian Philips
6a35d3bf2d Remove group details cache, update group directly 2022-06-22 17:19:17 -05:00
Ian Philips
495cbef995 portfolio fix 2022-06-22 12:54:41 -05:00
Ian Philips
eb02207c56 portfolio fix 2022-06-22 12:51:20 -05:00
Ian Philips
a1ea864799 Debounce 2022-06-22 11:43:47 -05:00
Ian Philips
3b3717d307
Groups (#510)
* Folds=>groups

* Show groups on user profile

* Allow group creation from /create

* Refactoring to groups

* Convert folds to groups

* Add new add to group notification

* Fix user profile tab bug

* Add groups nav and tab for my groups

* Remove bad profile pages

* remove comments

* Add group list dropdown to sidebar

* remove unused

* group cards ui

* Messages=>Comments, v2, groupDetails

* Discussion time

* Cleaning up some code

* Remove follow count

* Fix pool scoring for cpmm

* Fix imports

* Simplify rules, add GroupUser collection

* Fix group cards

* Refactor

* Refactor

* Small fixes

* Remove string

* Add api error detail handling

* Clear name field

* Componentize

* Spacing

* Undo userpage memo

* Member groups are already in my tab

* Remove active contracts reference for now

* Remove unused

* Refactoring

* Allow adding old questions to a group

* Rename

* Wording

* Throw standard v2 APIError

* Hide input for non-members, add about under title

* Multiple names to & # more

* Move comments firestore rules to appropriate subpaths

* Group membership, pool=>volume

* Cleanup, useEvent

* Raise state to parent

* Eliminate unused

* Cleaning up

* Clean code

* Revert tags input deletion

* Cleaning code

* Stylling

* Limit members to display

* Array cleanup

* Add categories back in

* Private=>closed

* Unused vars
2022-06-22 11:35:50 -05: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
mantikoros
a8b874a32f track comment tips 2022-06-21 10:36:44 -05:00
James Grugett
9a97da72d8 Don't show sell button if you have sold all your shares 2022-06-21 10:14:55 -05:00
mantikoros
d4f2a81735 exclude certain categories for new users 2022-06-21 10:01:51 -05:00
James Grugett
1b3b4eb6d8 Don't show sell button for closed markets 2022-06-21 09:59:12 -05:00
Marshall Polaris
5add7eea49
Remove notification box about public/hidden bets (#544) 2022-06-20 18:29:46 -05:00
Justin
d572efad1a
Add Statistics link to sidebar (#545)
* add stats link to sidebar & mobile nav

* prettier
2022-06-20 18:28:18 -05:00
Ian Philips
9004c694ca Fix comments & bets mixing in tabs ui 2022-06-20 08:58:18 -05:00
Sinclair Chen
833dd37469
Comment tips (attempt 2) (#539)
* Add tip arrows UI (visual)

* move tipper into its own component

* simplify score calculation

* Add tip txns

- more specific txn types
- fix transact cloud function to be able to create tip txns
- insert tips into comments via a context

* Refactor tipper to send tip txns

* Stop tipping yourself. Disable anons.

* Style tipper (smaller)

* remove default exports

* capitalize tooltips

* rename stuff

* add exhausting hook dependencies

* replace context with prop threading

* fix eslint unused vars

* fix: thread tips correctly into fr comments
2022-06-17 22:28:16 -05:00
James Grugett
83ded17625 Revert "Comment tips (#469)"
This reverts commit e567782a7d.
2022-06-17 16:31:21 -05:00
mantikoros
7679849c7d show 2 decimal places for fees 2022-06-17 16:28:25 -05:00
Sinclair Chen
e567782a7d
Comment tips (#469)
* Add tip arrows UI (visual)

* move tipper into its own component

* simplify score calculation

* Add tip txns

- more specific txn types
- fix transact cloud function to be able to create tip txns
- insert tips into comments via a context

* Refactor tipper to send tip txns

* Stop tipping yourself. Disable anons.

* Style tipper (smaller)

* remove default exports

* capitalize tooltips

* rename stuff

* add exhausting hook dependencies

* replace context with prop threading

* fix eslint unused vars
2022-06-17 14:19:42 -07:00
Sinclair Chen
e0a40d4d24 Replace leaderboard cake icon with line go up 2022-06-17 10:38:47 -07:00
Ben Congdon
a8ae724159
Don't show the 'New' chip on resolved markets (#523)
* Don't show the 'New' chip on resolved markets

* Add createdTime check to contract-details
2022-06-16 22:52:53 -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
Sinclair Chen
b99f9dd193 make leaderboard margin same as other pages 2022-06-16 14:43:34 -07:00
Sinclair Chen
8219929227 fix: sidebar wider on medium screens 2022-06-16 14:14:08 -07:00
mantikoros
6c6f03e622 fix subtle tabs bug 2022-06-16 11:29:04 -05:00
mantikoros
a15d39110b bug fix: tracking messing with alogolia 2022-06-15 22:17:28 -05:00
mantikoros
f295e0a537 track landing page 2022-06-15 21:42:11 -05:00
mantikoros
781506129c sign in, sign up button styling 2022-06-15 16:58:52 -05:00
mantikoros
c45da8c334
Tracking (#511)
* tracking helper functions

* track everything

* remove extraneous code
2022-06-15 16:34:34 -05:00
James Grugett
cc4b9abd9f Revert "Automated market resolution (#404)"
This reverts commit a3663d03e8.
2022-06-14 23:31:20 -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
TrueMilli
a3663d03e8
Automated market resolution (#404)
* Added radio buttons to market creation (non functional)

* Ignoring vs code files

Should this be done in the repo or should everyone using VS Code do that himself globally on his machine(s)?

* Removed 'automatic' resolution

* added union type for resolution

* revert: resolution could be anything here (non binary markets)

* Expanded ChoicesToggleGroup for string choices

* Added combined resolution and required buttons to market creation

* restricted automatic resolution to binary markets

* added automatic resolution to contract

* added automatic resolution to contract overview

* string or number array to mixed array

* created const for resolutions

* Added comments for leading semicolons

* configuration of auto resolution on market creation

* v1.22.19

* v1.0.0

* v0.0.0

* v1.0.0

* v1.22.19

* Mock display automatic resolution

* Revert changes to market creation

* Revert "v1.22.19"

This reverts commit 22f59adc9c.

* Removed resolutiontype from contract creation

* Added auto resolution time to contract

* Auto resolution date editable

* refactoring

* Editable interface for auto resolution

* New edit interface for auto resolution

* Setting of auto resolve date when changing close date

* prohibited changing other peoples markets

* removed unnecessary export

* refactoring

(cherry picked from commit 4de86d5b08)

* Added comments for leading semicolons

(cherry picked from commit 60739c7853)

* Ignoring vs code files

Should this be done in the repo or should everyone using VS Code do that himself globally on his machine(s)?

(cherry picked from commit 944de9398a)

* removed unused imports and variables

* added type for binary resolution

* Prettier

* const for binary resolutions

* using the type "resolution"

* Prettier

* Re-added comment

* Update functions/src/create-contract.ts

* Revert "Ignoring vs code files"

This reverts commit 09aea5c207.

* launch config for debugging with vs code WIP

* "Launch Chrome" does not work since login via google is not possible in debugger-chrome
* Breakpoints are unbound when attached to chrome

* Revert "Added comments for leading semicolons"

* prettier

* linebreak crlf

* vscode settings

* correct linebreaks
* search exclusion
* automatic prettifier

* vscode settings

* correct linebreaks
* search exclusion
* automatic prettifier

* Working debugger config

* fix merge

* Removed comments, default resolution MKT

* removed vscode from gitignore

* refactoring description update

* Added auto resolution to LiteMarket

* fix date, setDate mutates object

* fixed firestore.rules

* script to add auto resolution to all markets

* regularely auto resolve markets

* fix description error

* moved calculate ts for access in firebase

* Revert "moved calculate ts for access in firebase"

This reverts commit 8380bf4f72.

* fix reference to calculate for firebase

* fixed references to time

* renamed function

* added description

* added auto resolution to description

* direct bool check instead of != null

* direct bool check instead of != undefined

* remove explicit type

* Fix free response markets

* removed contract from functionname

* interval set to 1h

* query instead of filter

* folds ~> contracts

* query instead of filter

* promise.all instead of foreach

* removed contractDoc from function header

* removed autoResolution from function header

* batchedWaitAll instead of promise.all

* removed unused parameter

* replaced auto resolution with constant

* suggestions from PR

* fix comment

* removed unused imports

* added scripts to add close dates on prod

* optimization

* removed test script

* security: only auto resolve markets which are closed

* consistency checks

* re-added type check for binary markets
* moved check of probability into switch case block

* removed unused import

* auto resolution every minute

* auto resolution time optional

* pr fixes
2022-06-14 15:01:32 -05:00
SirSaltyy
be777ba122
about button directs to "how to" (#501)
* Create how to manifold.md

* Updates to docs

Updated bounties, added new "How to Manifold" page, edited "About MM" page.

* Update sidebar.tsx
2022-06-14 18:02:21 +01:00
James Grugett
92b368f11e Fix sorting for Your bets table 2022-06-14 11:27:11 -05:00
Ian Philips
e49f614acb
Remove unused acitivity items-related code (#492)
* Remove unused acitivity items

* Remove activity page
2022-06-14 07:13:24 -06:00
Austin Chen
af3895de79
Add quadratic matching to Manifold for Charity (#486)
* Calculate quadratic funding match

* Tweak copy

* More concise quadratic funding calculation

Co-authored-by: Sinclair Chen <abc.sinclair@gmail.com>

* Fix imports and calculations

* Remove unused var for now

* Clean up styling

Co-authored-by: Sinclair Chen <abc.sinclair@gmail.com>
2022-06-13 20:53:29 -07:00
mantikoros
d9f0428e41 alert box component 2022-06-13 21:08:56 -05:00
mantikoros
e2d7e94e4c prettier 2022-06-13 11:52:29 -05:00
mantikoros
e6a1046039 landing page branding, UI tweaks 2022-06-13 11:22:50 -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
72f4a2f603 Fix prettier errors 2022-06-12 21:49:02 -07:00
Marshall Polaris
aaef9842d4 Fix lint error 2022-06-12 21:44:35 -07: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
mantikoros
0d2204bb02 Put "Get M$" in sidebar 2022-06-12 23:34:11 -05:00
mantikoros
246aa5c214 "add funds" => "get M$" 2022-06-12 23:26:05 -05: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
Daniel Reeves
4ad04869a1
Typo fix (feedback #697) (#490) 2022-06-12 19:40:02 -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
mantikoros
3d39b705ae stats: show market type, payout mechanism 2022-06-12 18:37:01 -05:00
mantikoros
e34d34080d Show liquidity pool; change tab to "Subsidize" 2022-06-12 18:34:18 -05:00
James Grugett
457db07da4 Show all answers in answer panel 2022-06-10 23:28:09 -05:00
Ian Philips
ee816d6552
Must listen to contract updates for probs to update (#482)
* Must listen to contract updates

* remove unused import

* Rename liveContract
2022-06-10 17:36:18 -06:00
Ian Philips
8bdc33f683 Revert using bet probs, must make totalShares work 2022-06-10 15:58:44 -06:00
Marshall Polaris
9cccc08021
Fix busted comment permalink copying code (#481)
* Fix busted comment permalink copying code

* Fix busted comment permalink href
2022-06-10 14:31:53 -07:00
Ian Philips
f1c3914807
Properly fill probs on DPMM bets (#480)
* Properly fill probs on DPMM bets

* Remove unused import
2022-06-10 15:15:52 -06:00
James Grugett
15882904eb Disallow following yourself via market page 2022-06-10 12:55:55 -05:00
James Grugett
ad1a40ba3e Switch select all to outline button 2022-06-10 12:45:51 -05:00
James Grugett
a68e943d0b Refactor to load bets once on market page 2022-06-10 12:23:35 -05:00
mantikoros
e28dfaaa80 fix ios scrolling in bet panel 2022-06-10 11:36:07 -05:00
James Grugett
25c1e9c3a3 Tweak layout of user page buttons 2022-06-10 11:11:31 -05:00
Ian Philips
ead13b4e08 Time flies when you floor it 2022-06-10 09:15:55 -06:00
James Grugett
2564eb9c26 Linkify bettor username in Bets tab 2022-06-09 15:00:31 -05:00
Ian Philips
64f04185d4 Fix comment inputs on mobile 2022-06-09 10:15:34 -06:00
Ian Philips
bdb3bbd960 Don't open comment w/o new bet 2022-06-09 08:53:01 -06:00
Ian Philips
65bc0f0f86 Disable always autofocus 2022-06-09 07:36:36 -06:00
Ian Philips
3d18b12ede bet.probAfter => getDpmOutcomeProb 2022-06-09 07:22:03 -06:00
James Grugett
f52b756163 Use lighter gray in small follow button to deemphasize 2022-06-08 23:06:25 -05:00
James Grugett
a2eece5f5c Reveal all bets in Bets tab from June 1st onward 2022-06-08 23:03:07 -05:00
Ian Philips
01adf50ae1
Update FR comment prob and input after bet (#467)
* Update FR comment prob and input after bet

* Remove comment

* eslint

* Use proper deps and useEvent hook
2022-06-08 17:09:49 -06:00
James Grugett
88bf22622d Fix follow dialog staying open on navigate 2022-06-08 15:51:53 -05:00
James Grugett
c9a4fa8679 Add small follow button after creator name in market page 2022-06-08 15:27:53 -05:00
James Grugett
4e83aa1431 Put back edit following button 2022-06-08 14:42:23 -05:00
James Grugett
f809acd6fd 'Discover' => 'Similar' and shows recs based on user you have open 2022-06-08 14:38:04 -05:00
James Grugett
d7e52c1969 Extract TextButton component with blue underline. 2022-06-08 14:23:10 -05:00
James Grugett
21d6815de1 Don't show follow button for yourself 2022-06-08 14:22:10 -05:00
mantikoros
0cd9943e0d
Liquidity withdrawal (#457)
* withdrawLiquidity cloud function

* update rules

* exclude antes from getCpmmLiquidityPoolWeights

* update correct lp shares

* liquidity panel

* don't create bet if less than 1 surplus share

* withdrawLiquidity return type

* static analysis fix

* hook dependency

* prettier

* renaming

* typo

* getCpmmLiquidityPoolWeights: always exclude antes

* delete unused function

* casting
2022-06-08 13:00:49 -05:00
James Grugett
a31766b020 Run prettier... 2022-06-08 11:38:09 -05:00
James Grugett
bc752b853a Prevent comment text overlap with submit button 2022-06-08 11:34:37 -05:00
James Grugett
323a62f041 Put back numbers in home tab titles for categories / following 2022-06-08 11:24:35 -05:00
Ian Philips
61d7f0eca0 No more flying graph points 2022-06-08 09:12:33 -06:00
Ian Philips
936cabe353
Speed up notification loading by prepopulating relevant info (#453)
* Populate notification with relevant info

* eslint

* Remove duplicated code

* Unused ?

* Add new q notification, other small fixes
2022-06-08 08:43:24 -06:00
Ian Philips
7e37fc776c
Fr comment ux improvements (#451)
* Extend comment input box, only use airplane

* Only 1 commentable bet, shrink input, fix feed lines

* Pad sign in to comment button

* Small changes
2022-06-08 07:24:12 -06:00
James Grugett
ad6594f0bc Add discover tab of users based on markets you have bet on 2022-06-07 23:42:42 -05:00
James Grugett
ac763de16b Run prettier! 2022-06-07 23:16:05 -05:00
James Grugett
00cbec2309 Show edit following button on home 2022-06-07 23:07:05 -05:00
James Grugett
879ab272e0
Following and follower list (#456)
* Create following button that opens follow list in modal.

* Move react query deps to web package.json

* UseFollowers hook

* Following and followers button, dialog with tabs.

* Fix line endings

* Remove carriage return from default vscode eol

* Add placeholder message if no users followed / no followers

* Tweak spacing
2022-06-07 22:24:18 -05:00
Marshall Polaris
244bbc51b2
Migrate sellBet cloud function to v2 sellbet (#438)
* Migrate sellBet to v2

* Kill sellBet warmup requests

* Point client at new v2 sellbet function

* Clean up `getSellBetInfo`

* Fix up functions index.ts
2022-06-07 14:08:56 -07:00
Marshall Polaris
60e830974e
Migrate sellShares cloud function to v2 sellshares (#440)
* Migrate `sellShares` to v2 `sellshares`

* Point client at new v2 sellshares function

* Clean up `getCpmmSellBetInfo`
2022-06-07 13:54:58 -07:00
Ian Philips
a7a482eecd
Various notifications bugfixes/improvements (#442)
* Various notifications bugfixes/improvements

* eslint
2022-06-06 16:15:36 -06:00
James Grugett
849e7d03a8 Switch to tabs for categories vs following 2022-06-06 14:53:05 -05:00
Marshall Polaris
d9eb9798e5
Point client at new v2 versions of createmarket and placebet (#433)
* Kill 'warmup spam' for createContract and placeBet

* Point v2 function calls at v2 endpoints

* Add real prod placebet and createmarket endpoints
2022-06-06 12:46:06 -07:00
James Grugett
caa43856af Run prettier :P 2022-06-06 12:55:13 -05:00
James Grugett
587357c13f Description for categories / users you are following with edit button. 2022-06-06 12:51:45 -05:00
Ian Philips
1976bc755e Revert "Revert "Notification detail, grouping, and settings control [wip] (#403)""
This reverts commit 07f2d390e5.
2022-06-06 11:36:59 -06:00
Ian Philips
07f2d390e5 Revert "Notification detail, grouping, and settings control [wip] (#403)"
This reverts commit 37c7f909a3.
2022-06-06 10:54:25 -06:00
Ian Philips
37c7f909a3
Notification detail, grouping, and settings control [wip] (#403)
* Revert "Revert "Notifications ux fixes - wip (#383)""

This reverts commit 699b03eb42.

* Group & provide more control over notification display

* UI/UX improvements

* Remove unused text key

* Refactor

* Refactor

* Show answer resolution in notification

* Disable eslint on single linefor exhaustive deps

* Handle arbritrary notifications

* Refactor

* Remove unused vars

* Add follow user

* Various UX improvements, add follow notif

* Various small ui changes

* Show notification settings breakdown

* Improve notification status lines
2022-06-06 10:52:11 -06:00
James Grugett
773465c6c5 Move select all button to top of category selector modal 2022-06-06 10:44:37 -05:00
mantikoros
43b0fe6749
Contract card ui tweaks: consistent market type colors, no underline,… (#402)
* contract card ui tweaks: consistent market type colors, no underline, adjust font/border size

* bigger probabiity numbers in contract card

* revert non-color changes; change prob bar width to 1.5
2022-06-06 09:54:43 -05:00
Marshall Polaris
e712a054ae Fix line endings 2022-06-05 18:57:49 -07:00
Jack
004dd7168e
Fix free response answers with 0 bets disappearing (#427)
Before this PR, free response answers and their associated comments disappeared when all shares in the answer were sold. If it's just an answer, this is a surprising UX but not that bad. But this can also disappear an entire comment thread with great discussion, as I noticed on one of my markets recently.

I suppose the downside is that these answers take up space and are more likely to be undesired - but I think answers with M$1 of bets are much more common anyway.
2022-06-05 17:20:06 -07:00
James Grugett
96db414ca1
Category checklist (#426)
* Use ChoicesToggleGroup for categories vs following

* Edit categories modal

* Filter closed and resolved using Configure. Set page to 0.

* Add useEvent hook, incase we want to use it before React releases it.

* useMemo on filters computation

* Try to fix prettier

* Use check box! Add select all/none button
2022-06-05 14:06:08 -05:00
James Grugett
3d31641050 Fix clicking card from user profile has no effect 2022-06-04 23:21:24 -05:00
James Grugett
a42a0f086c Remove Row and run prettier 2022-06-04 21:53:55 -05:00
James Grugett
cfd6af7c72 Tweak create page layout 2022-06-04 21:28:27 -05:00
James Grugett
11974f68fc Run prettier 2022-06-04 19:14:14 -05:00
James Grugett
93bb1dd519 Support ctrl or command click to open link in new tab 2022-06-04 19:13:07 -05:00
James Grugett
5152be57ba Quick back from clicking contract card on home! Preserves search state. 2022-06-04 19:00:13 -05:00
James Grugett
c1bda8a775
Follow other users. Filter markets by followed (#387)
* Add follow button to user page

* Update follows in the database using follow button.

* Add toggle for followed market creators to home

* Hide follow toggle from user's markets page

* Check that sold bet is by auth'd user

* Change follow toggle to category pill

* Remove unused imports

* Remove console.logs
2022-06-02 23:52:14 -05:00
Sinclair Chen
749f7aad40 copyedit: username in bet list empty state 2022-06-02 18:07:47 -07:00
Forrest Wolf
397d90c6b7
Replace some more uses of any with more specific types (#389)
* Give confirmation button icon a type

* Give setBids a type

* Make StripeSession type more specific

* Give MenuButton buttonContent a type
2022-06-02 17:40:41 -07:00
TrueMilli
0f2a311b74
Refactoring (#401)
* refactoring

(cherry picked from commit 4de86d5b08)

* removed unused imports and variables

* added type for binary resolution

* Prettier

* const for binary resolutions

* using the type "resolution"

* Prettier

* Update functions/src/create-contract.ts

* launch config for debugging with vs code
* "Launch Chrome" does not work since login via google is not possible in debugger-chrome
* Breakpoints are unbound when attached to chrome
2022-06-02 17:30:34 -07:00
James Grugett
bbb9a2c1fa Quick bet: Opposite arrow sells position 2022-06-02 18:24:10 -05:00
mantikoros
06c5c97a03 down betting arrow disabled for free response markets 2022-06-02 16:25:41 -05:00
mantikoros
5a4bb65d80 remove extra space (to fix prettier static check) 2022-06-02 16:00:38 -05:00
mantikoros
5af2e1fef0 up arrows green, down arrows red 2022-06-02 15:54:03 -05:00
Austin Chen
5b142baa98 Revert "Demote charity to more menu"
This reverts commit 311b39ffe9.
2022-06-02 13:35:31 -07:00
Sinclair Chen
e1b1f30c55 make sell button show on mobile (bet list) 2022-06-02 10:56:56 -07:00
James Grugett
311b39ffe9 Demote charity to more menu 2022-06-01 23:31:38 -05:00
Ian Philips
78a359407d
Notifications reverted ux (#386)
* Revert "Revert "Notifications ux fixes - wip (#383)""

This reverts commit 699b03eb42.

* <p>=><div>
2022-06-01 12:26:41 -06:00
Ian Philips
699b03eb42 Revert "Notifications ux fixes - wip (#383)"
This reverts commit b5057f4028.
2022-06-01 11:52:27 -06:00
Ian Philips
b5057f4028
Notifications ux fixes - wip (#383)
* Notifications generating on comment,answer,contract update

* Notifications MVP

* Submitted an answer => answered

* Listen for unseen notifications

* Fix userlink formatting, move page

* Fix links

* Remove redundant code

* Cleanup

* Cleanup

* Refactor name

* Comments

* Cleanup & update notif only after data retrieval

* Find initial new notifs on user change

* Enforce auth rules in db

* eslint update

* Code review changes

* Refactor reason

* Add todos

* Show question in notifiation title

* Allow larger width on md

* Condense on mobile

* Decrease padding, hide title on mobile

* Line clamp notifications

* Shrink text
2022-06-01 11:31:46 -06:00
James Grugett
2c4aa6152e Hide sell buttons in other people's profiles 2022-06-01 11:28:47 -05:00
Ian Philips
59830579a9
Set timeout to reset the free market banner (#367)
* wip - trigger recheck when past time

* wip - trigger recheck when past time

* Reset logic

* Interval=>timeout
2022-06-01 07:54:48 -06:00
Ian Philips
1c980ba678
Notifications (#354)
* Notifications generating on comment,answer,contract update

* Notifications MVP

* Submitted an answer => answered

* Listen for unseen notifications

* Fix userlink formatting, move page

* Fix links

* Remove redundant code

* Cleanup

* Cleanup

* Refactor name

* Comments

* Cleanup & update notif only after data retrieval

* Find initial new notifs on user change

* Enforce auth rules in db

* eslint update

* Code review changes

* Refactor reason
2022-06-01 07:11:25 -06:00
Marshall Polaris
35c373f6ce
MULTI contracts are not a thing (#381) 2022-05-31 20:40:08 -07:00
James Grugett
dec286583a Show bets loading indictor instead of wrong data 2022-05-31 22:21:45 -05:00
Marshall Polaris
9f1fe3ee17
Fix busted avatar links on charity pages (#380) 2022-05-31 20:02:50 -07:00
Marshall Polaris
7c4ec2a8e3
Refactor contract typing to be more concise and more correct (#355)
* Refactor contract types slightly

* Refactor contract types greatly

* Kill dead binary DPM contract creation code

* Use BinaryContract, DPMContract, etc. type aliases
2022-05-31 19:42:35 -07:00
Forrest Wolf
30adb5e1f8
Fix dependency of useEffect in BetsList (#379)
* Fix dependency of useEffect in BetsList

* Revert "Fix dependency of useEffect in BetsList"

This reverts commit 077b211f22.

* Disable linter for BetsList useEffect deps

* Add hideBetsBefore to useEffect dependencies

* Fix formatting
2022-05-31 21:36:00 -05:00
James Grugett
9cb24c9f3c Make categories work when signed out 2022-05-31 21:23:36 -05:00
James Grugett
b236ebdbd9 Fix janky horizontal scrollbar on home on mobile 2022-05-31 20:07:28 -05:00
Austin Chen
a840143990 Publicly display bets without infinite looping
React why
2022-05-31 18:06:29 -07:00
Sinclair Chen
c8bf71d40d
Allow selling CPMM binary position from bet table (#372)
* Allow selling CPMM binary position from bet table

* Only click to collapse on bet header, not body
2022-05-31 17:36:58 -07:00
Sinclair Chen
3d9d60e8fe refactor Row, Col to accept all div props 2022-05-31 17:13:54 -07:00
James Grugett
5bcff4171b Revert "Publicly display bets placed after 06-01-2022"
This reverts commit a4330cfdf2.
2022-05-31 14:15:26 -05:00
Austin Chen
a4330cfdf2 Publicly display bets placed after 06-01-2022 2022-05-31 10:49:07 -07:00
Austin Chen
5978f4b1cb Show blog link in sidebar 2022-05-29 17:33:41 -07:00
James Grugett
23944bf47a Filter redemption bets out of market 'Bets' tab 2022-05-28 15:57:12 -05:00
James Grugett
90a8de09d7 Ask a question => Create a question 2022-05-28 15:48:08 -05:00
James Grugett
4c81106612 Don't show quick bet when signed out, or for numeric markets 2022-05-28 15:36:16 -05:00
James Grugett
29a05ffff2 Disable quick bet for resolved markets 2022-05-28 15:27:01 -05:00
James Grugett
45f92379bc Portfolio: Fix calculation of whether you sold all your shares 2022-05-28 00:18:09 -05:00
Austin Chen
2ea7ddc1aa Hide mobile bottom bar if Manifold is iframed 2022-05-27 21:27:37 -07:00
Marshall Polaris
86625798cd
Clean up some mess related to nullable collectedFees (#352)
* contract.collectedFees is no longer sometimes nonexistent

* Fix typing issues around payouts code
2022-05-27 14:02:02 -07:00
James Grugett
279b139556 Add 'sold' filter option in portfolio page 2022-05-27 15:51:55 -05:00
James Grugett
15d203977a Portfolio: Consistently filter out contracts you have sold out of. 2022-05-27 15:40:52 -05:00
Forrest Wolf
1e0845f4b9
Replace some uses of any with more specific types (#344)
* Add tsconfig.json for common

* Prefer `const` over `let` over `var`

* Kill dead code

* Fix some trivial Typescript issues

* Turn on Typescript linting in common except for no-explicit-any

* Correctly specify tsconfig dir name in functions eslintrc

* Give react children explicit types

* Add explicit types to removeUndefinedProps

* Create StripeSession type

* Give event in Dropdown an explicit type

* Revert "Give event in Dropdown an explicit type"

This reverts commit 80604310f2.

* Give bids in NewBidTable an explicit type

* Cast results of removeUndefinedProps when neccessary

* Fix type of JoinSpans

* Revert "Cast results of removeUndefinedProps when neccessary"

This reverts commit 5541617bc8.

* Revert "Add explicit types to removeUndefinedProps"

This reverts commit ccf8ffb0b5.

* Give React children types everywhere

* Give event a type

* Give event correct type

* Lint

* Standardize React import

Co-authored-by: Marshall Polaris <marshall@pol.rs>
2022-05-26 15:22:44 -07:00
Marshall Polaris
420ea9e90e
Add more linting to web package (#343)
* Import React a lot

* Fix misc. linting concerns

* Turn on many recommended lints for `web` package
2022-05-26 14:41:24 -07:00
Marshall Polaris
5217270073
Serious business API validation & big cleanup of createContract, placeBet (#302)
* Add the great Zod as a dependency to help us

* Tweak eslint

* Rewrite a ton of stuff in createContract and placeBet

* Clean up error reporting in API

* Make sure the UI is enforcing validated limits on lengths

* Remove unnecessary Math.abs

* Better type on `BetInfo`

* Kill `manaLimitPerUser`

* Clean up hacky parameters on bet info functions

* Validate `closeTime` as a valid timestamp in the future
2022-05-26 14:37:51 -07:00
mantikoros
7b0be014eb show resolved n/a for numeric markets 2022-05-26 09:39:14 -05:00
Ian Philips
6f23c16df7 Show up arrow if shares in numeric markets 2022-05-26 06:23:22 -06:00
Sinclair Chen
38fa58406d Fix embeds on incognito (blocked localStorage) 2022-05-25 22:30:03 -07:00
Ian Philips
0c3fa9f065
Handle free response outcomes for yes/no shares (#338) 2022-05-25 16:51:33 -06:00
Ian Philips
1334840ee0
Fix comment links from /activity & add to emails (#320) 2022-05-25 16:47:08 -06:00
Ian Philips
f0d44be2f4 Clean up time diff code 2022-05-25 16:04:14 -06:00
Ian Philips
d69f4f9a0a
Move to tailwindui for create market page (#332)
* Move to tailwindui

* Remove commented code

* Prettier

* Show custom prob toggle, limit to 5-95%

* match left margin

* Show prob, date, time, other ui changes
2022-05-25 11:54:28 -06:00
Forrest Wolf
c5763e6ec3
Extract signup prompt (#333)
* Extract SignUpPrompt component

* Return null instead of false when not showing SignUpPrompt

* Add trailing newline

* Lint
2022-05-25 09:25:39 -07:00
Ian Philips
1942e1c47a
Show just first 3 letters and chosen answer on fr cards (#318)
* Show just first 3 letters and chosen answer

* 3 dots

* Just show resolved and the chosen answer

* Remove unused truncate & hide resolved except on xs
2022-05-25 07:13:33 -06:00
Austin Chen
eef5dda0f3 Shrink card margin between question & % 2022-05-24 17:25:23 -07:00
Austin Chen
d5a362502a Display liquidity "pool" instead of "bet" volume 2022-05-24 16:57:34 -07:00
Austin Chen
8715ff2740 Semibold the question on cards 2022-05-24 16:39:50 -07:00
Austin Chen
f9336c00be
Preview the quick bet result on hover (#319)
* Switch from triangle to a circle arrow

WIP

* Revert "Switch from triangle to a circle arrow"

This reverts commit 370f8eefe4.

* Show amount moved in probability

* Animate the prob bar change too

* Pull out quick bet display component

* Minor cleanups

* Clean up comments

* Close empty divs

* Feedback from Ian

* Pull out constant

* Get rid of quick bet separators

* Fix typescript change

* Invert colors so gray indicates placed bets

* Update comment on useSaveShares re: Ian's comments
2022-05-24 16:38:43 -07:00
Ian Philips
811a7cece7 Market => question 2022-05-24 08:28:09 -06:00
Ian Philips
49bfb67daa Revert to showing FR answer 2022-05-24 08:24:01 -06:00
Ian Philips
13bf5ac253 Free daily market bugfix 2022-05-24 07:31:44 -06:00
Austin Chen
8cedf93901
Implement quick betting: directly from the market card (#291)
* Play with using 3 icons for 1-click usage

* Align bet icons with the percentages

* Hide liquidity injection star, for now

* Fix Free Response card layouts

* Use triangles instead of planes

* Set correct hover states the arrows

* Fix down triangle & padding

* Default large nums to 2 sigfigs

* Clean up hover areas

* Fix bet width, remove "chance/expected"

* Show "M$20" on hover, hide arrows when closed

* Improve click targets

* FR: "MULTI" => "MANY", single => "TOP"

* Install react-hot-toaster

* Implement quick betting on binary questions

* Handle different kinds of markets

* Extract out QuickBet into its own component

* Minor tweaks

* Visually separate out quick bet pane

* Hide quick bet for FR markets with no answers

* Fill in which bets the user has already placed

* Animate movements, fix binary direction

* Hover arrows are now always gray

* Pull out code into quick-bet.tsx

* Minor comments

* Fix import

ts-ignore is scary

* Fixes from James's feedback

* Hide text only on quickbet
2022-05-23 23:44:16 -07:00
Austin Chen
a8e47d4fc7 Update "No markets found" to point to /create
Fixes #308
2022-05-23 17:49:07 -07:00
Ian Philips
fc320ca1e4
Shrink avatar, paddding, gaps for mobile screens (#275)
* Shrink avatar, paddding, gaps for mobile screens

* Adjust padding, add arrow to input area

* Padding and reply ui adjustments
2022-05-23 16:09:40 -06:00
mantikoros
854daaebb7 nav bar: gray background for selected page (indigo color was too prominent) 2022-05-23 16:49:30 -05:00
mantikoros
244fd7c981 changed sidebar button color — violet doesn't match color scheme 2022-05-23 16:38:42 -05:00
Ian Philips
fb33f829cc Clean up free market countdown bugfix 2022-05-23 15:14:50 -06:00
Ian Philips
d0347ff5c2
Add countdown timer for daily free market (#276)
* Add countdown timer for daily free market

* Reset example numbers

* Remove daily

* Free market reset => 4pm UTC
2022-05-23 08:43:11 -06:00
Ian Philips
e94d204a87
Simplify market creation page (#268)
* Simplify market creation page

* Minor improvements

* Prettier
2022-05-23 06:35:50 -06:00
James Grugett
fc6b36b690 Adjust numeric graph axis to use large number formatting 2022-05-22 22:05:52 -05:00
James Grugett
1c73bba908 Show x value in numeric graph's tooltip 2022-05-22 17:48:02 -05:00
Marshall Polaris
47f10301c8
Change lodash stuff so that it can be tree-shaken out of build (#233)
* Set common package.json sideEffects: false

* Configure SWC to modularize lodash imports

* Import specific lodash functions instead of _

* Add an eslint rule to avoid full lodash import
2022-05-22 01:36:05 -07:00
Marshall Polaris
3db1de6b66
Add some useEffect dependencies (#289) 2022-05-21 14:48:15 -07:00
James Grugett
c5660ab762 Prevent flash of "No markets found" on search load 2022-05-21 13:51:41 -04:00
James Grugett
688ebb797a Add "Last updated" sort option 2022-05-21 13:44:55 -04:00
Marshall Polaris
540476f65a
Public API improvements (#266)
* Remove needless wrappers from API requests and responses

* Return real HTTP status codes instead of status field

* More robustly handle API errors

* Fix broken error handling in NumericResolutionPanel warmup
2022-05-20 14:58:14 -07:00
Austin Chen
03a13248a4 Limit large numbers to 3 sig figs 2022-05-20 15:25:32 -04:00
Austin Chen
4c93da3cc0 Use a blue bar for Numeric types 2022-05-20 14:00:22 -04:00
mantikoros
6f1a569797 back to M$ — the worst option except for all the others 2022-05-19 22:28:38 -04:00
James Grugett
1616ffc817 Make filter for isResolved work in all cases 2022-05-19 22:13:58 -04:00
mantikoros
99c41b6112 bug fix: use new placeBet api in numeric bet panel 2022-05-19 20:39:23 -04:00
Marshall Polaris
20f4b97d8b
Rewrite client for new public APIs to use fetch instead of callables (#241)
* Rename `lib/firebase/api-call` -> `lib/firebase/fn-call`

This relieves ambiguity now that we will be using our actual
public API in the client.

* Rewrite client API calls to createContract, placeBet

* Tiny fixup for client market creation code
2022-05-19 15:04:34 -07:00
James Grugett
4396456ed1 Add tooltip to analytics charts 2022-05-19 16:14:27 -04:00
mantikoros
be3d4d7735 exclude antes from bets list 2022-05-19 15:26:44 -04:00
James Grugett
76f27d1a93
Numeric range markets!! (#146)
* Numeric contract type

* Create market numeric type

* Add numeric graph (coded without testing)

* Outline of numeric bet panel

* Update bet panel logic

* create numeric contracts

* remove batching for antes for numeric markets

* Remove focus

* numeric market range [1, 100]

* Zoom graph

* Hide bet panels

* getNumericBets

* Add numeric resolution panel

* Use getNumericBets in bet panel calc

* Switch bucket count to 100

* Parallelize ante creation

* placeBet for numeric markets

* halve std of numeric bets

* Update resolveMarket with numeric type

* Set min and max for contract

* lower std for numeric bets

* calculateNumericDpmShares: use sorted order

* Use min and max to map the input

* Fix probability calc

* normpdf variance mislabeled

* range input

* merge

* change numeric graph color

* fix getNewContract params

* bet panel labels

* validation

* number input

* fix bucketing

* bucket input, numeric resolution panel

* outcome label

* merge

* numeric bet panel on mobile

* Make text underneath filled green answer bar selectable

* Default to 'all' feed category when loading page.

* fix numeric resolution panel

* fix numeric bet panel calculations

* display numeric resolution

* don't render NumericBetPanel for non numeric markets

* numeric bets: store shares, bet amounts across buckets in each bet object

* restore your bets for numeric markets

* numeric pnl calculations

* remove hasUserHitManaLimit

* contrain contract type

* handle undefined allOutcomeShares

* numeric ante bet amount

* use correct amount for numeric dpm payouts

* change numeric graph/outcome color

* numeric constants

* hack to show correct numeric payout in calculateDpmPayoutAfterCorrectBet

* remove comment

* fix ante display in bet list

* halve bucket count

* cast to NumericContract

* fix merge imports

* OUTCOME_TYPES

* typo

* lower bucket count to 200

* store raw numeric value with bet

* store raw numeric resolution value

* number input max length

* create page: min, max to undefined if not numeric market

* numeric resolution formatting

* expected value for numeric markets

* expected value for numeric markets

* rearrange lines for readability

* move normalpdf to util/math

* show bets tab

* check if outcomeMode is undefined

* remove extraneous auto-merge cruft

* hide comment status for numeric markets

* import

Co-authored-by: mantikoros <sgrugett@gmail.com>
2022-05-19 12:42:03 -05:00
Ian Philips
7d8ccb78a4
Remove unused bets (redemptions, antes) and sort by desc in query (#264)
* Remove unused bets and sort in query

* remove console

* Explicitly ignore or include redemptions

* Pass options from parent function

* Fix let=>const
2022-05-19 10:03:37 -06:00
Ian Philips
8013862f15 Center question button on lg 2022-05-19 09:20:38 -06:00
Ian Philips
6935f8865d Move comment btn to its own row on xs 2022-05-18 21:34:59 -06:00
Ian Philips
e6dabf97d9
Show prob at time of comment on binary markets (#255)
* Show prob at time of comment on binary markets

* unused import
2022-05-18 19:38:02 -06:00
James Grugett
e9ee7e2355 Truncate user link 2022-05-18 17:08:46 -04:00
James Grugett
1f3f800a57 Show close time in cards on close date sort 2022-05-18 17:08:46 -04:00
Ian Philips
6d3aaf71d4 Any question => anything 2022-05-18 13:47:53 -06:00
Sinclair Chen
e2b03f31e9 Style current page on mobile nav bar 2022-05-18 15:45:08 -04:00
Ian Philips
daf6cadea9 Remove border from sidebar buttons 2022-05-18 10:52:00 -06:00
Austin Chen
7b3c8ea046 Revert "back to M$ — playtime is over"
This reverts commit ed41d99484.
2022-05-18 12:09:24 -04:00
Ian Philips
ca9e93fe47 Show loading indicator on comment submit 2022-05-18 10:08:42 -06:00
Austin Chen
44c53ae96d Kill the ugly "Sign in" button 2022-05-18 12:06:41 -04:00
Austin Chen
89b05be5ec Tweak "Ask a question" button VisD 2022-05-18 11:57:22 -04:00
Austin Chen
39870dd933
Bets on profile, again (#251)
* Revert "Revert "Show every user's bets on their profile (#170)""

This reverts commit 142206b79a.

* Fix typo

* Delete portfolio page
2022-05-18 11:52:12 -04:00
Ian Philips
eb3ac802c0 Fix #208 - check for comments without ids 2022-05-18 09:35:32 -06:00
Ian Philips
974d5a8d89 hide free daily market when signed out 2022-05-18 09:25:56 -06:00
James Grugett
142206b79a Revert "Show every user's bets on their profile (#170)"
This reverts commit d50cc39c27.
2022-05-18 10:59:08 -04:00
James Grugett
d51a20e2e0 Add back useState to import 2022-05-18 10:57:45 -04:00
James Grugett
acd59767e4 Move search and sort/filter options in one line on mobile 2022-05-18 10:42:56 -04:00
Boa
7b3c21cf98
Comments ux improvements and bugfixes (#246)
* Show majority stake on comments

* Darken comment input text

* Fix old FR comments displayed in general section

* Refactor feed comments and bets into files

* Only allow user to comment on most recent bet

* Fix overlapping sign in to comment

* Only calculate current users bets once

* Minor tweaks & is betting @ prob
2022-05-18 08:42:13 -06:00
Austin Chen
d50cc39c27
Show every user's bets on their profile (#170)
* Show user bets on their profile

* Add an alert for current users

* Replace `/portfolio` with `/Austin?tab=Bets`

* Replace `/Austin?tab=Bets` with `/Austin/bets`

* Use replaceState for better browser history

* Remove two console.logs

* Note a bug

* Fix path

* Write in description of why we're doing this
2022-05-18 10:36:17 -04:00
mantikoros
42c981a54d remove border on ask question button 2022-05-18 10:21:03 -04:00
James Grugett
76ffe8eea1 Infinite scroll: automatically load new page of results 2022-05-17 19:29:46 -04:00
James Grugett
be9df7bcd8 Fix links beginning with https 2022-05-17 17:11:24 -04:00
mantikoros
ed41d99484 back to M$ — playtime is over 2022-05-17 15:34:58 -04:00
James Grugett
7da46050e5
Swap home and explore (#244)
* Add activity page. Copy explore page into home

* Update navbar with activity. Show explore instead if signed out.

* Move category selector into contract search

* Make algolia filter by category

* Default tag page to all filter
2022-05-17 12:56:10 -05:00
Sinclair Chen
1bf2073e61
refactor SiteLink to not repeat (#125) 2022-05-17 10:36:36 -07:00
Sinclair Chen
f8601af45c
Bet embed (#204)
* Add bet buttons to embed

- Make only title link to market
- Prevent avatar / username from being clicked on

* refactor: remove extra elem, de-indent

* adjust embed info row styles

* make bet panel smaller

* make sell panel smaller
2022-05-17 10:31:19 -07:00
Ian Philips
d458d8a299 Includes=>endsWith for multi digit answers 2022-05-17 10:13:29 -06:00
Ian Philips
1afda07525 Handle linking from feed 2022-05-17 10:00:09 -06:00
Boa
8337cb251f
Enable url linking to comments and a copy to clipboard function [wip] (#239)
* Link to comments & highlight comment

* Copy link, show toast and fade bg

* Remove unused imports

* Standardize link copied toast

* Add linking to answer comment threads

* Refactor open answers component, use indigo highlight

* Distinguish chosen answer a bit more
2022-05-17 09:55:26 -06:00
mantikoros
5310da05e2 fix double hashtag 2022-05-17 11:49:10 -04:00
mantikoros
2858fd090c "create market" => "ask question" 2022-05-17 11:32:20 -04:00
mantikoros
f47d75c120 landing page tweaks 2022-05-17 10:25:51 -04:00
mantikoros
4860150334 change slogan 2022-05-17 10:02:29 -04:00
Austin Chen
a3c1cd2cc1 Unhardcode M$ in more locations 2022-05-17 08:17:22 -04:00
Austin Chen
8982dcae10 Replace "m1234" with "ϻ1234" 2022-05-17 08:13:12 -04:00
Marshall Polaris
cd7efb03ca
Implement onRequest versions of createContract, placeBet functions (#227)
* Reimplement createContract and placeBet cloud functions

* Fix broken warmup function error handling
2022-05-16 21:43:40 -07:00
Marshall Polaris
aafd2a226f
Clean up some stuff with SellPanel and AmountInput (#232)
* Hoist SellAmountInput logic into SellPanel

* Ditch now-unnecessary SellAmountInput

* Clean up sale proceeds markup

* Clean unused imports

* BuyPanel doesn't need userBets
2022-05-16 20:27:37 -07:00
Austin Chen
6c6cbdc1a5
Redesign the contract card (#235)
* Redesign the card

* Limit to 1 category on a card

* Make card tags a lighter gray

* Righbar always starts from the bottom
2022-05-16 19:15:22 -04:00
James Grugett
19da0c6c82 Default to 'all' feed category when loading page. 2022-05-15 23:09:49 -04:00
James Grugett
727d85ddac Make text underneath filled green answer bar selectable 2022-05-15 23:07:38 -04:00
Marshall Polaris
ee91a94466
Clean up some bet panel markup and CSS (#231)
* Tidy up probability change markup

* Tidy up payout markup
2022-05-15 14:10:26 -07:00
Marshall Polaris
07ded756d9
Remove unused imports from random files (#224) 2022-05-13 18:30:52 -07:00
Marshall Polaris
bc5cd5be45
Clean up some markup in the sidebar (#220)
* Remove wrapper div around logo

* Small refactor, remove wrapper around sidebar profile summary

* Remove random unused imports

* Replace random styles with Tailwind classes
2022-05-13 18:07:44 -07:00
Marshall Polaris
33c0471c29
Clean up some markup around the top of the page (#189)
* Remove unnecessary wrapper div around sidebar

* Remove extra column used for alignment on homepage

* Remove extra wrapper div around whole page
2022-05-13 16:47:50 -07:00
Marshall Polaris
babca140f1
Fix random errors (#205)
* Fix warning in ShareMarket component

* Fix NewContract component to use keys on category list

* Refactor NewContract component to assign `value` to `select`
2022-05-13 16:42:48 -07:00
James Grugett
8be6b79732 Remove 'Category' label 2022-05-13 16:19:15 -04:00
James Grugett
8ce3a09471 Shrink vertical padding on feed answer group 2022-05-13 16:16:46 -04:00
James Grugett
67717bbde7 Prevent having to go back twice from profile / tag search page 2022-05-13 15:01:38 -04:00
James Grugett
d62156b8c0 Hide scrollbar on categories 2022-05-13 14:27:47 -04:00
James Grugett
06cdf2a84a
Show category on market card (#197)
* Show category on market card

* Show multiple categories in contract description

* Tweak layout of contract card and show multiple categories
2022-05-12 18:28:21 -05:00
Austin Chen
e0d266887c
Show prob of FR answer as a bar chart (#200) 2022-05-12 14:04:51 -04:00
Austin Chen
25d3fbcc5f Add a hover to the category selector 2022-05-12 13:47:07 -04:00
Ian Philips
c2f8aee89e Touch up reply buttons 2022-05-12 10:27:52 -06:00
James Grugett
aafc08f24c Prevent android chrome from defining categories on tap 2022-05-12 12:07:46 -04:00
Ian Philips
fed49d3040 Hide ante in FR bets tab 2022-05-12 09:48:19 -06:00
James Grugett
31f57f8ff2 Condense category names to just the tag name 2022-05-12 11:18:44 -04:00
James Grugett
49f900b298 Tags input: save on enter 2022-05-12 11:13:35 -04:00
mantikoros
9a4e5763f5
Categories (#132)
* basic market categories

* use tags to store market category

* display category in market

* display full category

* category selector component on feed

* Move feed data fetching to new file

* Decrease batch size for updating feed to prevent out-of-memory error

* Compute and update category feeds!

* Show feeds based on category tabs

* Add react-query package!

* Use react query to cache contracts

* Remove 'other' category

* Add back personal / friends to feed categories

* Show scrollbar temporarily for categories

* Remove 5 categories, change geopolitics to world

* finance => economics

* Show categories on two lines on larger screens

Co-authored-by: James Grugett <jahooma@gmail.com>
2022-05-12 10:07:10 -05:00
Boa
403156ed1a
FR ux changes, restore submit button for comments (#195) 2022-05-12 08:59:05 -06:00
James Grugett
696e6a7882 Revert "Fix hyperlinks when starting with an open paren"
This reverts commit 2fd9759bc1.
2022-05-11 21:42:33 -04:00
Marshall Polaris
1063897c7c
Clean up extra wrapper and CSS on BetRow (#178) 2022-05-11 14:35:50 -07:00
Boa
02ed9bf7e1
Single threaded comments (#175)
* Remove unused hideOutcome in comments

* Remove unused hideOutcome in comments

* Add replyToComment fields to Comment

* Add 1 threaded replies to comments & answers

* Allow smooth scrolling within pages via #

* remove yarn-error log

* correct spelling

* Remove smooth-scroll-to-hashtag component

* Cleanup & show user position/bets in replies
2022-05-11 15:11:46 -06:00
Sinclair Chen
aa433e309c
restyle home page (separation between markets) (#186) 2022-05-11 12:51:45 -07:00
Austin Chen
2fd9759bc1 Fix hyperlinks when starting with an open paren 2022-05-11 15:28:28 -04:00
James Grugett
2b9e639281 Default to 'all' search filter for markets on user page 2022-05-11 00:19:29 -04:00
James Grugett
948d878222 Prevent 500 error on markets with no collected fees 2022-05-10 23:01:07 -04:00
Marshall Polaris
6c9df223d8
Feed container markup cleanup (#173)
* Move FeedContainer stuff into ActivityFeed

* Greatly clean up ActivityFeed container markup
2022-05-10 13:59:19 -07:00
Sinclair Chen
a297f6492d
move manaToUSD to format.ts (#172) 2022-05-10 11:14:24 -07:00
Marshall Polaris
d34907681a
Remove some random unnecessary wrapper divs (#163)
* Remove wrapper div in user comment feed item

* Remove wrapper div around feed market card title link

* Remove wrapper div around BetRow
2022-05-09 15:50:20 -07:00
mantikoros
ef43e46153 include fees in tooltip 2022-05-09 17:33:24 -04:00
Marshall Polaris
8a99f3772a
Cleanup avatar again (#161)
* Reinstate avatar component cleanup

This was reverted due to a bug, fixed in the subsequent commit.

* Kill additional wrapper divs around avatars

This also fixes a bug where the `w-8` answer row wrapper div was
constraining the width of the `w-10` avatar, leading it to be `w-8`
and `h-10` and appear as an oval.
2022-05-09 14:32:59 -07:00
mantikoros
5135135e79
Separate out fees (#159)
* deduct market ante from profits

* display creator fees in stats

* show creator earnings in stats

* separate out creator, liquidity fees in payouts and deduct from profits
2022-05-09 16:04:40 -05:00
Boa
a5b0372a6e
Free response markets with investment cap (#157)
* Show error message for FR bet

* Allow M$ limit for markets

* Allow M$ limit for markets

* Apply M$ limit to FR answer bets

* Improve error message

* Improve error message

* Only check stats if mana limit set

* Consolidate logic

* Remove unused variable

* absolute import

* absolute imports
2022-05-09 14:09:07 -06:00
James Grugett
d55990d5d4 Fix contract search not adjusting to new user 2022-05-09 15:47:18 -04:00
James Grugett
e8ab863557
🔍 Algolia search (#136)
* Add algolia and instantsearch packages

* Switch to hooks-web package

* Implement algolia search!

* Fix types

* Fix tags page

* Closed sort option

* Implement select for filtering on open, closed, resolved, all.

* Support search in dev environment

* Fix runtime error in landing page
2022-05-09 12:38:33 -05:00
Ian Philips
8fbbeffd38 Revert one more avatar component change 2022-05-09 10:33:52 -04:00
Ian Philips
5c1bc78408 Revert avatar component changes 2022-05-09 10:18:05 -04:00
Marshall Polaris
acc9c84e2e
More absolute imports (#156)
* Configure functions module to allow absolute imports

* Convert common imports in functions to be absolute

* Convert common imports in web to be absolute

* Convert lib imports in web to be absolute

* Convert hooks imports in web to be absolute

* Convert components imports in web to be absolute
2022-05-09 09:04:36 -04:00
Austin Chen
b47e4364ad Remove circle around markets/comments count 2022-05-08 22:53:02 -04:00
Austin Chen
2eed1c432a Hardcode in 8 frontpage markets 2022-05-07 19:44:01 -04:00
Austin Chen
cea9422802 Update site copy 2022-05-07 10:10:25 -04:00
Austin Chen
22a9901148 Feature Nonlinear as a charity 2022-05-07 08:15:40 -04:00
James Grugett
4de0fcd198 Revert "Represent DB avatar URLs as non-null (#128)"
This reverts commit bf8e09b6c1.
2022-05-06 14:29:15 -04:00
SirSaltyy
87b43e6bdb
Add link to twitter with svg icon to the sidebar and profile menu. Remove Discord hero icon and replace it with discord svg. (#135) 2022-05-05 22:20:18 -04:00
SirSaltyy
e41f646b42
Remove all spaces between M$ and the associated number (#134)
* Remove all spaces between M$ and the associated number

* Update index.tsx
2022-05-05 22:19:47 -04:00
Boa
bbf419953e
Show comments on profile (#137)
* WIP - got comments on the user page

* Remove number from chosen FR answer

* Distinguish wining and losing FR answers

* Show no answers text

* Simplify get answer items logic

* Show answer number

* Show answer # when resolving

* Fix import path

* Add user's collated comments onto profile

* Allow linking to comments/markets in profile

* Allow preload of users contracts in profile

* Remove unused check

* Small code improvements
2022-05-05 16:30:30 -06:00
Marshall Polaris
2e214cab7a
Kill warmup spam (#133)
* Only warm up sell bet function once

* Only warm up create user function once
2022-05-05 09:51:09 -07:00
Marshall Polaris
adefd3259c
Cleanup avatar component rendering (#130)
* Remove unnecessary classes on avatar img

I don't believe these have any visible effect.

* Don't apply Tailwind 'avatar' class in menu

We don't use this class elsewhere when displaying avatars (instead our
avatar has manual styles that do the stuff Tailwind is trying to do)
and it just assigns a weird size that we don't want.

If we want to use the Tailwind avatar styles we should refactor further.

* Remove unnecessary avatar wrapper div

* Remove old prop from avatar
2022-05-05 09:50:58 -07:00
Austin Chen
1caed44552 Show /charity in signed-out sidebar 2022-05-05 10:15:12 -04:00
Boa
9480f9f34c
Improve free response answer ux (#131)
* Remove number from chosen FR answer

* Distinguish wining and losing FR answers

* Show no answers text

* Simplify get answer items logic

* Show answer number

* Show answer # when resolving
2022-05-04 16:03:06 -06:00
Marshall Polaris
bf8e09b6c1
Represent DB avatar URLs as non-null (#128) 2022-05-04 11:07:22 -07:00
mantikoros
95b67c05e2 another sell shares rounding bug 2022-05-04 11:47:45 -04:00
Ian Philips
0d63e471be Only show cursor if focused 2022-05-03 16:45:21 -04:00
Boa
3a33efa8db
Threaded free response comments & general comments sections (#121)
* Allow comments to reference answers

* Add comment inputs for free response answers

* condense comment logic in one component

* Add General Comments section to FR answers

* Prompt signin even if no comment

* Remove unused & refactor

* Simplify general comments logic, toggle comment boxes

* Clarify rendering logic
2022-05-03 14:38:40 -06:00
Sinclair Chen
100821e34c
Ask user to buy more mana when insufficient funds (#124) 2022-05-03 13:36:54 -07:00
Sinclair Chen
f2217d1d8b
Improve donate box UI in mid-size window (#126) 2022-05-03 13:36:00 -07:00
Sinclair Chen
2da5423f36
Add padding too charity images (#123) 2022-05-03 08:12:42 -07:00
Sinclair Chen
3434b3de3f
Move all charity images to imgur + Next (#120) 2022-05-03 07:00:33 -07:00
Boa
8da36298e5
condense comment logic in one component (#119) 2022-05-03 07:51:25 -06:00
James Grugett
beece64ae5 Tweak contract info dialog 2022-05-02 12:18:55 -04:00
mantikoros
43d3662db1 fixed negative shares bug 2022-05-02 12:16:36 -04:00
James Grugett
6232284e92 Larger font on amount input 2022-05-02 12:15:00 -04:00
James Grugett
bec8cdb3e8 Add share market widget shown if you are the creator 2022-05-02 11:23:54 -04:00
Sinclair Chen
fdbcffcfbc
CPM simple feed (#116)
* Add minimal feed

* Display full cent amount for raised < $1
2022-05-02 08:23:12 -07:00
James Grugett
0b5b0bb9d3 Clear comment after submitting, for multiple bets 2022-05-02 10:43:17 -04:00
James Grugett
d6a9b89c43 Fix answers not wrapping in cards 2022-05-02 10:35:49 -04:00
Austin Chen
b63cc17630 Hide charity names on cards 2022-05-02 08:45:05 -04:00
James Grugett
06b7e49e98
[In progress] Server-side feed computation (#106)
* Store view counts & last viewed time

* Schedule updating user recommendations. Compute using tf-idf.

* Update contract's lastBetTime and lastCommentTime on new bets and comments.

* Remove contract's lastUpdatedTime

* Remove folds activity feed

* Implement getFeed cloud function

* Hook up client to use getFeed

* Script to cache viewCounts and lastViewTime

* Batched wait all userRecommendations

* Cache view script runs on all users

* Update user feed each hour and get feed from cache doc.

* Delete view cache script

* Update feed script

* Tweak feed algorithm

* Compute recommendation scores from updateUserFeed

* Disable lastViewedScore factor

* Update lastCommentTime script

* Comment out console.log

* Fix timeout issue by calling new cloud functions with part of the work.

* Listen for contract updates to feed.

* Handle new user: use default feed of top markets this week

* Track lastUpdatedTime

* Tweak logic of calling cloud functions in batches

* Tweak cloud function batching
2022-05-01 11:36:54 -05:00
Austin Chen
46bf09f182 Feature 1Day Sooner & QURI 2022-04-30 15:47:47 -04:00
Austin Chen
f5e5af0b7a Revert "bound initial probability to [0.1, 0.9]"
This reverts commit da153ceea9.
2022-04-30 13:05:43 -04:00
Austin Chen
04c42e7835 Tweak copy ("You with" => "You have") 2022-04-30 10:20:03 -04:00
James Grugett
a4c722550a Don't truncate comments for contract page 2022-04-30 10:07:39 -04:00
James Grugett
3bb4111445 Make charity cards extend same length in row. Tweak image padding 2022-04-29 23:55:32 -04:00
Austin Chen
78e8927de4
Image preview: truncate to 100 chars, show avatar url (#111)
* Truncate image preview to 120 chars

* Try 100 chars instead

* Pass along creatorAvatarUrl

Hoping nothing breaks if the avatarUrl is empty

* Thread through avatarUrl all the way

* Fix typescript
2022-04-29 19:38:31 -04:00
Sinclair Chen
73fc67955d
Send M$ to Charity & txns (#81)
* Add components for CPM landing and charity pages

* Remove misc.ts to fix build

* Set up cloud function for writing txns

* More plumbing for txns

* Fix up API call

* Use Date.now() to keep timestamps simple

* Some styles for charity list page

* Hard code charities data

* Pass charity data to charity page

* Update txn type

* Listen for charity txns

* Handle txn to non-user by burning it

* Read txns for charity card and charity page.

* Set images to object contain

* Clean up txn types

* Move pic to top of card. Other misc styling.

* Update charity short & long descriptions

* Add `token` and `category` to Txn

* Fix breakages

* Show Charity link in the sidebar

* Fix typing issues

* Fix not reading from the right type

* Switch out icon

* Also show Charity icon on mobile

* Update copy

Co-authored-by: Austin Chen <akrolsmir@gmail.com>
Co-authored-by: James Grugett <jahooma@gmail.com>
2022-04-29 19:35:56 -04:00
Boa
78997c1e45
Show comments position (#110)
* Add betting activity back to feed

* Show position in bin. markets, no comments on bets

* Degroup bets on Bets tab

* Show users position or recent bet with comments

* Add tooltip on answer to FR comments

* Style improvements

* Only use bets by current user for comment input
2022-04-29 15:11:04 -06:00
James Grugett
fa8ebe36bd Move loading indicator into SearchableGrid. 2022-04-29 10:05:32 -04:00
Boa
4ec59be46f
Free daily market (#107)
* Allow users a free daily market

* Show confetti on recent created market

* remove unused import

* remove comment

* Did create market -> hook, capitalize buttons

* Check for confetti with interval

* Just check once

* Capitalize create market button on feed
2022-04-28 17:01:50 -06:00
Austin Chen
2e17f9f917 Add a "Show more..." button when there are more contracts 2022-04-28 18:45:26 -04:00
mantikoros
da153ceea9 bound initial probability to [0.1, 0.9] 2022-04-28 10:47:18 -04:00
Boa
1db1a739cf
Misc comment ux improvements (#103)
* Separate comments and bets via tabs

* Normalcase comment button

* Note about abbreviated and all mode

* Revese,abbreviate,limit comments in feed
2022-04-26 15:08:50 -06:00
Boa
d6c7230d6a
Moved answers (#102)
* Moved answers

* Remove unnecessary code
2022-04-26 09:53:12 -06:00
Ian Philips
8ba2a55180 Your trades -> Your bets 2022-04-26 08:38:28 -06:00
Boa
7722c723c4
Separate free response answers & comments (#100)
* Just for playing with, bad code

* Whiten answer cards

* Separate answers and comments in FR markets

* Highlight FR answer in bet w/ comment

* Darken answer text and move classname

* Normalcase Comment
2022-04-26 07:24:57 -06:00
Marshall Polaris
4d48c98975
Fix generation of create market placeholder text (#92)
* Fix generation of create market placeholder text

* Capitalize comment
2022-04-24 17:14:20 -05:00
Marshall Polaris
06f9f53951
Link to /home, not / (#93) 2022-04-22 21:39:29 -05:00
Ian Philips
4e4ffe8e20 Sell either type of share for dpm market 2022-04-22 04:43:34 -06:00
Ian Philips
3f471e7e8e Sell either type of share for dpm market 2022-04-22 04:30:13 -06:00
Ian Philips
8109f3d9a9 Show free comments in feed 2022-04-22 04:16:54 -06:00
James Grugett
a525ad82ec Filter out markets you sold out of from most of the views on portfolio page. 2022-04-21 18:32:46 -05:00
mantikoros
004969aa66
user-added liquidity provision panel (#90)
* user-added liquidity provision panel

* AddLiquidityPanel: handle loading, errors

* ContractInfoDialog: don't show add liquidity when market is closed

* ContractInfoDialog: hide add liquidity for FR
2022-04-21 12:58:12 -05:00
Boa
7b70b9b3bd
Free comments (#88)
* Allow free comments with optional bets

* Send emails for comments without bets

* Refactor to share logic

* No free comments on free response questions

* Minor fixes

* Condense line
2022-04-21 11:09:06 -06:00
Austin Chen
9ce82b1b6f Show "New" badge on contract cards too 2022-04-20 23:03:16 -07:00
James Grugett
7847a9e781 Track latency of feed and portfolio page. 2022-04-21 01:00:08 -05:00
James Grugett
8c8a9be6a1 Show new label instead of 0 volume 2022-04-20 17:25:29 -05:00
James Grugett
01e43abd17 Add factors to weight new contracts higher, contracts with unseen comments, and contracts with prob closer to 50% 2022-04-20 16:37:01 -05:00
Ian Philips
0390ec0f47 Prepare user website urls for external link 2022-04-20 10:13:17 -06:00
Ian Philips
d6d72aa619 Clean twitter and website user urls 2022-04-20 09:47:14 -06:00
Boa
9ba7c04524
Sell shares mobile (#86)
* Abstract sell shares row to component

* Allow sell row to show just a button

This is nice for the feed and on a bet's mobile interface.

* Add and use floor shares

* Allow sell button on the same line as bet button

* Move use save shares to own file

* Make sure to sell non-integer shares

* Create SellButon & sell non-integer shares

* Remove props prefixes

* Break out sell modal and button
2022-04-20 08:13:39 -06:00
James Grugett
3c1e16b815 Move contract details components to their own file. 2022-04-19 22:34:41 -05:00
James Grugett
3b413e52e5 Clean up FR answer on card 2022-04-19 22:31:45 -05:00
James Grugett
d19debfd19 Close time label: show relative time iff same day. Show year iff not same year. 2022-04-19 12:55:22 -05:00
James Grugett
24a9a79f16 Decrease padding so sell shares label fits in one line 2022-04-19 12:53:04 -05:00
Ian Philips
7ccdc6d683 Hide bet panel on FR after successful submit 2022-04-19 09:01:40 -06:00
Boa
7c7d6815f8
Add create market button (#79) 2022-04-19 08:15:05 -06:00
James Grugett
280ae97070 Track clicks from feed 2022-04-19 00:16:08 -05:00
James Grugett
a6e6e2f52f Include top answer in answer card. 2022-04-18 21:44:31 -05:00
James Grugett
88b8d39c7c Remove filterToOutcome 2022-04-18 20:54:31 -05:00
James Grugett
9c74f88b4a
Improve Free response UI (#78)
* Add legend to free response graph

* Hide answers panel unless resolving. Correctly order answers

* No gray background for add answer & resolve panel. Tweak spacing

* Max answer length 240 chars

* Show answer text in resolution for market page, card instead of number.

* Remove remaining answer #'s. Refactor outcome/resolution labels.

* Move answer panel back up

* Tweak spacing

* Update placement of bet button on mobile for FR answer feed item

* Fix reversed feed for binary markets

* Show multi resolve options

* Clean up unused parts of answer item

* Lighten resolve buttons

* Show answer text in market resolve email
2022-04-18 18:02:40 -05:00
mantikoros
790aec9baf
Cfmm migration (#80)
* cfmm migration script

* save dpm shares, pool

* formatMoney: use floor instead of round

* migrate cfmm: use sale amount as shares for sold bets

* migration: make up fake share qty for sold shares

* migration: also convert resolved markets

* migration: don't migrate resolved markets after all

* migration: error checking
2022-04-18 17:02:53 -05:00
James Grugett
102e22e111 Recent trade => recent 2022-04-15 17:55:26 -05:00
James Grugett
72a56b46fd Switch portfolio default sort to recent trade 2022-04-14 00:16:08 -05:00
James Grugett
43b8c16fcc Compact-ify cards in portfolio page 2022-04-14 00:06:13 -05:00
James Grugett
8a59ab3180 Tweak current investment calculation 2022-04-13 22:28:29 -05:00
James Grugett
2a3593c269 Fix profit calculation for dpm sales 2022-04-13 20:42:47 -05:00
James Grugett
e58ec54546 Clean up portfolio sorts 2022-04-13 18:56:28 -05:00
James Grugett
ec63464461 Remove Communities: Not shown in navigation or market info 2022-04-13 18:14:03 -05:00
James Grugett
a09af526a0 Switch summary stat from payout at current % to profit 2022-04-13 17:57:46 -05:00
James Grugett
bfb708d477 Fix profit calculation for cpmm sales. Change totalValue to investment value excluding sales 2022-04-13 17:25:32 -05:00
James Grugett
a9028b0a94 Remove invested metric for cfmm markets 2022-04-13 15:47:12 -05:00
Austin Chen
624d99fc1d Show number of traders in "More" panel 2022-04-13 12:11:49 -07:00
James Grugett
75b39cbf6f Remove loans: no new loans 2022-04-13 12:52:12 -05:00
James Grugett
ff1cb68077 Copy contract url doesn't use current url 2022-04-11 17:06:51 -05:00
James Grugett
e53cde5b34 Quick back navigation into feed 2022-04-11 16:13:26 -05:00
James Grugett
9f2ac17ffb Add copy link button in market share options 2022-04-10 19:59:01 -05:00
James Grugett
8c9da833bf Don't match parenthses in link url 2022-04-10 19:47:26 -05:00
James Grugett
4a9fc7bc9b Don't show portfolio when signed out. Home navigates to '/' when signed out. 2022-04-10 00:26:28 -05:00
mantikoros
642fedbbb4 fix error 2022-04-09 19:09:06 -05:00
mantikoros
ea07edcbd3 add funds: remove M$500 purchase option 2022-04-09 18:56:05 -05:00
mantikoros
5bf36d1963 market stats: pool 2022-04-09 18:23:24 -05:00
mantikoros
2d8e85ab5e ContractInfoDialog: volume 2022-04-09 18:13:15 -05:00
James Grugett
ec49a73c74
Algo feed (#77)
* Implement algo feed

* Remove 'See more...' from feed items

* Fix problem with useUpdatedContracts.

* Tweak some params
2022-04-09 18:10:58 -05:00
mantikoros
7c11df6147 market info stats 2022-04-09 18:04:13 -05:00
mantikoros
fe5fba184f FeedQuestion: hide close time 2022-04-09 17:15:05 -05:00
mantikoros
6e38540d58 contract tabs: always show timeline tab 2022-04-09 16:34:43 -05:00
mantikoros
13300326fd bet panel styling 2022-04-09 16:26:43 -05:00
mantikoros
b624ec045e "buy" => "bet" 2022-04-09 16:13:36 -05:00
mantikoros
ab41404d07
contract tabs: separate market timeline from your trades (#76)
* contract tabs: separate market timeline from your trades

* contract tabs: use pre-existing tab component

* tab styling
2022-04-08 16:13:10 -05:00
mantikoros
108f0afb95 contract card: remove created time; inline info dialog button 2022-04-08 14:27:17 -05:00
James Grugett
238af975e3 Reverse FR acitivty as well 2022-04-07 18:00:44 -05:00
James Grugett
7dfc3fb966 Reverse contract feed on contract page! 2022-04-07 16:29:36 -05:00
James Grugett
f773a59676 FR: Move description above answers 2022-04-07 16:19:27 -05:00
James Grugett
aff6acc8f4 Refactor contract components into contract directory 2022-04-07 16:15:51 -05:00
James Grugett
14cef9ffc3 Move contract description out of activity feed 2022-04-07 16:09:19 -05:00
James Grugett
5e8decfa4e Move tweet, embed buttons plus communities and tags into a market info dialog 2022-04-07 15:52:54 -05:00
mantikoros
20052b61ec AmountInput: filter non-numeric, show numeric keyboard on ios 2022-04-06 22:48:06 -05:00
James Grugett
849248376b Memo-ize graph components for better performance 2022-04-06 13:56:08 -05:00
James Grugett
a524b952ee FR: Hide contract activity on mobile when betting 2022-04-06 00:22:43 -05:00
James Grugett
f749eb1df8 Log views of contracts in feed 2022-04-04 22:28:38 -05:00
James Grugett
f577437a8b Show your avatar and balance in mobile bottom bar instead of 'More' 2022-04-04 16:49:14 -05:00
James Grugett
708773e9a6 Fix FR not having correct loan info 2022-04-04 11:30:49 -05:00
James Grugett
d0aa9c710c "A market for every question" 2022-04-04 01:07:58 -05:00
James Grugett
1ec8fc5b45 Deemphasize sign in button on sidebar. Change bet panel to use 'sign up' wording. 2022-04-04 00:58:56 -05:00
James Grugett
6d25494713 Add Manifold Markets logo on signed out home. 2022-04-04 00:45:23 -05:00
James Grugett
076f2979b4 Reinstate Manifold Markets logo 2022-04-04 00:09:01 -05:00
James Grugett
3760cd576b Tweak padding/margin 2022-04-03 23:37:14 -05:00
James Grugett
7cd4b5d454 Remove communities from top-level nav. List out options in mobile 2022-04-03 23:20:41 -05:00
James Grugett
6ce53a4418 Only show one of bet panel or bet row. Bring back sticky bet panel & sidebar 2022-04-03 18:43:30 -05:00
James Grugett
ef0408dcdf Mobile navbar includes Portfolio instead of Communities. Each option is labeled! 2022-04-03 18:26:50 -05:00
James Grugett
9420b10bd9 Fix overlapping bet panel 2022-04-03 16:57:38 -05:00
James Grugett
d7b702fe00 Portfolio page! Add to sidebar when signed in, move about into more. 2022-04-03 15:48:25 -05:00
James Grugett
5dcd43f5b2 Refactor tricky bet calculations to one function 2022-04-03 14:48:53 -05:00
James Grugett
1b9a38ff66 Tweak current value calculation 2022-04-03 11:18:31 -05:00
James Grugett
6b2f6f7185 Calculate invested differently. Sort trades by value and profit, including sales profit. Display profit when sorting by profit. 2022-04-03 01:08:57 -05:00
Austin Chen
55c6481d5b Don't require sign in for bottom navbar 2022-04-02 09:42:01 -07:00
Austin Chen
80728ff4f9 Switch confirmation buttons to the new modal 2022-03-31 02:09:08 -07:00
Austin Chen
94b7ebe5e8 Minor fixes: typo, React keys 2022-03-31 01:38:57 -07:00