Commit Graph

2816 Commits

Author SHA1 Message Date
James Grugett
668f30dd55 Free market creation shows cost striked through 2022-09-06 16:55:52 -05:00
Ian Philips
45e54789b7 Groups search shares query, sorted by contract & members 2022-09-06 15:51:36 -06:00
mantikoros
c59de1be2e bet slider: decrease step size 2022-09-06 11:53:09 -05:00
Ian Philips
a038ef91eb Show num contracts in group selector 2022-09-06 09:58:24 -06:00
Ian Philips
5af92a7d81 Update groups API 2022-09-06 09:24:26 -06:00
Ian Philips
39d7f1055b Fix spacing on challenge modal 2022-09-06 07:58:00 -06:00
Ian Philips
a3b18e5bea Add challenge back to share modal 2022-09-06 07:57:52 -06:00
FRC
59f3936dad
Fix bug (#854) 2022-09-06 14:17:21 +01:00
mantikoros
450b140f5f show challenge button on mobile 2022-09-05 18:19:13 -05:00
James Grugett
f21711f3dc Fix type error 2022-09-05 18:13:01 -05:00
James Grugett
cd8bb72f94 Daily movers table in experimental/home 2022-09-05 18:09:03 -05:00
mantikoros
837a4d8949 Revert "Show challenge on desktop, simplify modal"
This reverts commit 8922b370cc.
2022-09-05 18:07:44 -05:00
mantikoros
8952b100ad add answer panel mobile formatting, slider 2022-09-05 17:59:19 -05:00
mantikoros
2d724bf2c8 make slider black 2022-09-05 17:44:21 -05:00
mantikoros
374c25ffb3 Auto-prettification 2022-09-05 22:40:48 +00:00
mantikoros
96cf1a5f7f mobile slider styling 2022-09-05 17:39:59 -05:00
mantikoros
ae40999700 mobile bet slider 2022-09-05 17:11:32 -05:00
mantikoros
30d73d6362 remove parantheses from balance text 2022-09-05 16:59:35 -05:00
mantikoros
97e0a78806 "join group" => "follow" 2022-09-05 16:51:09 -05:00
James Grugett
d812776357 Remove show hot volume param 2022-09-05 16:25:48 -05:00
mantikoros
9a49c0b8fe remove numeric, multiple choice markets from create market page 2022-09-05 13:33:58 -05:00
Austin Chen
70eec63533 Adding in "Highest %" and "Lowest %" sort options
Quick alternative to https://github.com/manifoldmarkets/manifold/pull/850/files courtesy of James.

One downside of this approach is that the % only update every 15 minutes; but maybe users won't notice?
2022-09-05 10:07:33 -07:00
Marshall Polaris
6ef2beed8f
Denormalize betAmount and betOutcome fields on comments (#838)
* Create and use `betAmount` and `betOutcome` fields on comments

* Be robust to ridiculous bet IDs on dev
2022-09-04 14:28:45 -07:00
James Grugett
a15230e7ab Smartest money => Best bet. Don't show amount made for comment. 2022-09-04 14:06:29 -05:00
James Grugett
a21466d877 Add sort for 24 hour change in probability 2022-09-03 16:20:57 -05:00
Marshall Polaris
89b30fc50d Fix tournaments page loading indicator and turn page size back down 2022-09-03 14:07:34 -07:00
mantikoros
085b9aeb2a remove simulator 2022-09-03 14:58:42 -05:00
Marshall Polaris
c0383bcf26
Make tournament page efficient (#832)
* Make tournament page efficient

* Fix URL to Salem contract

* Use totalMembers instead of deprecated field

* Increase page size to 12

Co-authored-by: Austin Chen <akrolsmir@gmail.com>
2022-09-03 09:55:10 -07:00
Ian Philips
272658e5dc Use most up-to-date user on groups page 2022-09-03 06:52:51 -06:00
Marshall Polaris
861fb7abbd
Use the magic auth prop for groups SSR (#851) 2022-09-03 06:51:55 -06:00
Ian Philips
2d88675f42 Move & more out of the loop 2022-09-03 06:33:33 -06:00
James Grugett
bfa88c3406 Turn off react-query notification subscription because it's buggy 2022-09-02 22:57:23 -05:00
Marshall Polaris
784c081663
Enable source maps in production (#852) 2022-09-02 19:43:22 -07:00
Marshall Polaris
8318621d51
Some changes to make auth better (#846)
* Handle the case where a user is surprisingly not in the DB

* Only set referral info on user after creation

* More reliably cache current user info in local storage

* Don't jam username stuff into user listener hook
2022-09-02 19:39:27 -07:00
Marshall Polaris
e924061c54
Don't re-create visibility observer for no reason (#849)
* Don't re-create visibility observer for no reason

* `IntersectionObserver.unobserve` instead of `.disconnect`
2022-09-02 19:39:07 -07:00
Ian Philips
25a0276bf7 Auth user server-side on groups page 2022-09-02 19:52:38 -06:00
Ian Philips
c74d972caf Pass user and members via props 2022-09-02 19:36:49 -06:00
Ian Philips
57b74a5d09 Use cached values 2022-09-02 18:12:55 -06:00
Ian Philips
9577955d2d Remove null check 2022-09-02 18:08:53 -06:00
Ian Philips
cf508fd8b6
Members and contracts now subcollections of groups (#847)
* Members and contracts now documents

* undo loans change?

* Handle closed group

* Slight refactoring

* Don't allow modification of private groups contracts

* Add back in numMembers

* Update group field names

* Update firestore rules

* Update firestore rules

* Handle updated groups

* update start numbers

* Lint

* Lint
2022-09-02 18:06:48 -06:00
James Grugett
231d3e65c4 Fix incorrect error message for no bets 2022-09-02 16:19:10 -05:00
mantikoros
b6449ad296 fix bet panel warnings 2022-09-02 15:32:54 -05:00
Marshall Polaris
245627a347 Temporarily patch groups loading to make dev deploy work 2022-09-02 13:00:38 -07:00
Marshall Polaris
a429a98a29
Tidy up some dead code and markup in sidebar (#842) 2022-09-02 12:52:27 -07:00
Marshall Polaris
b1bb6fab5b
Disable SSR on /home (#839) 2022-09-02 12:51:41 -07:00
Marshall Polaris
21b9d0efab
Clean up some old pre-Amplitude tracking code (#841) 2022-09-02 12:51:27 -07:00
Marshall Polaris
4c429cd519
Remove some old code related to the old feed (#843) 2022-09-02 12:51:14 -07:00
mantikoros
0cb20d89ed numeric market labels: LOW/HIGH instead of MIN/MAX; eliminate payout <= MIN, etc. 2022-09-02 10:35:41 -05:00
Marshall Polaris
4406e53121
Make prefetching correctly use context cache (#835) 2022-09-01 19:38:09 -07:00
Marshall Polaris
dca7205a47
Disable group prefetching from contract links (#836)
* Kill dead code

* Stop prefetching groups when viewing contract

* Tidy markup
2022-09-01 19:37:41 -07:00
Sinclair Chen
04e8bb248b Fix Salem Center market url 2022-09-01 18:15:10 -07:00
Austin Chen
51fe44f877 Show the number of open markets on each groups page 2022-09-01 16:12:09 -07:00
Ian Philips
00ba3b0c48
Show avatars of tippers and unique bettors (#837)
* Show avatars of tippers and unique bettors

* Make transparent the avatar bg

* fix import
2022-09-01 16:23:12 -06:00
Marshall Polaris
7508d86c73
Clean up contract overview code (#823)
* Don't call Date.now a million times in answers graph

* Refactor contract overview code so that it's easier to understand
2022-09-01 14:42:50 -07:00
FRC
1208694d2d
http to https to avoid blocked requests (#833) 2022-09-01 17:54:46 +01:00
FRC
96be4e8992
Add embedded ContractGrid to Posts (#822)
* Add embedded market grids

* Hacky way to set height

I haven't figured out a way yet to get the height of the actual iframe's content, so I did some bad estimate for now to unblock shipping the feature, while I continue investigating.
2022-09-01 17:47:45 +01:00
Ian Philips
7310cf3d4a fix import 2022-09-01 10:11:08 -06:00
Ian Philips
8922b370cc Show challenge on desktop, simplify modal 2022-09-01 10:02:41 -06:00
Ian Philips
fecf976ab9 Show all group contracts if less than 5 open 2022-09-01 09:11:14 -06:00
Ian Philips
0823414360 Adjust group name padding on mobile 2022-09-01 08:52:49 -06:00
Ian Philips
c6eac97b64 Show group based on most recent creator added group 2022-09-01 08:29:56 -06:00
Ian Philips
6706fe7350 Show user balance on bet panels 2022-09-01 08:12:46 -06:00
Ian Philips
a7c8b8aec4 Hide bet panel when signed out 2022-09-01 07:34:02 -06:00
Ian Philips
5dec6b4a22 Medium includes 10 bettors 2022-09-01 07:23:43 -06:00
Ian Philips
a8d7e91a02 Clean comments 2022-09-01 07:01:49 -06:00
Ian Philips
fec4e19c1d Selectively force long polling for ios only 2022-09-01 07:01:02 -06:00
Marshall Polaris
0568322c82
Dramatically improve server auth stuff (#826) 2022-08-31 22:13:26 -07:00
Marshall Polaris
42548cea2a
Fix prefetching to not populate useless state (#827) 2022-08-31 21:59:58 -07:00
mantikoros
879d6fb2dd bury profile stats in Comments until we find a better place for them 2022-08-31 23:20:20 -05:00
Sinclair Chen
7c1e663b26
Editor tweaks (#829)
* Show border around selected embeds

* Make editor tooltips not animate
2022-08-31 20:52:12 -07:00
James Grugett
ee76f4188b For you: remove contracts bet on by anyone you follow. 2022-08-31 21:57:11 -05:00
Sinclair Chen
58e671e640 Upload dropped images 2022-08-31 17:18:35 -07:00
Ian Philips
26aba26da5
force long polling (#824) 2022-08-31 15:38:55 -06:00
Austin Chen
7c8b33597a Add "Duplicate Contract" into "..." menu 2022-08-31 14:33:24 -07:00
James Grugett
3660830ec1 Don't server side render Notifications page for improved perf 2022-08-31 15:41:34 -05:00
James Grugett
83696cca21 Fix dayjs fromNow bug (it requires plugin, so use our util instead) 2022-08-31 15:35:47 -05:00
Sinclair Chen
d06b725f52
Let admins add and edit posts to any group (#820)
- show add post UI to admins
- change firebase permissions
2022-08-31 11:29:49 -07:00
Marshall Polaris
149204f6ca Fix my other foolish bug 2022-08-31 11:17:36 -07:00
Ian Philips
5a9d8e3f5d Show how much you've tipped a market 2022-08-31 09:27:37 -06:00
Ian Philips
37d2be9384 Show only relative time if same day on close date 2022-08-31 08:49:35 -06:00
Ian Philips
5df594e46a Make details fit on one line, make group a link 2022-08-31 08:29:35 -06:00
Marshall Polaris
27b46f4306 Fix order of comments in threads and under answers 2022-08-31 01:16:57 -07:00
Marshall Polaris
d336383a93 Fix my foolish bug 2022-08-31 01:02:10 -07:00
James Grugett
a3569280a4 Add your bets section to /experimental/home 2022-08-31 00:30:31 -05:00
James Grugett
ccb6fd291e Move components out of /pages into /components 2022-08-30 23:53:12 -05:00
James Grugett
849402ed70 Rearrange home sections. Load more in carousel. 2022-08-30 23:47:09 -05:00
Marshall Polaris
7dddff52b8
Tidying some feed code up (#818)
* Clean up some markup & dead code

* Order comments in Firestore instead of on client

* Order bets in Firestore instead of on client

* Make indexes file up to date with production
2022-08-30 20:28:30 -07:00
mantikoros
40f1c09002 Auto-remove unused imports 2022-08-31 01:56:03 +00:00
mantikoros
ec90b041ee upgrade firebase, nextjs versions 2022-08-30 20:54:32 -05:00
Sinclair Chen
c202c5de68 clarify closed/open group copy 2022-08-30 16:28:49 -07:00
Ian Philips
aad5f6528b
new market view (#819)
* Show old details on lg, don't unfill heart

* Hide tip market if creator

* Small ui tweaks

* Remove contract. calls

* Update high-medium-low

* Remove unused bets prop

* Show uniques

* Remove unused bets prop
2022-08-30 17:13:25 -06:00
James Grugett
3e1e84ee5e Experimental Home: Add links. Single layer carousel for < 6 cards 2022-08-30 17:14:22 -05:00
James Grugett
f83b62cf50 Implement double carousel for /experimental/home 2022-08-30 16:18:42 -05:00
Austin Chen
d658a48b66 Revert "hide quick bet on mobile"
This reverts commit 3d073da97e.
2022-08-30 10:31:35 -07:00
Ian Philips
74c9406191 Use cached user ids while likes is loading 2022-08-30 09:52:14 -06:00
Ian Philips
a0402830c5
liking markets with tip/heart (#798)
* WIP liking markets with tip

* Refactor Userlink, add MultiUserLink

* Lint

* Lint

* Fix merge

* Fix imports

* wip liked contracts list

* Cache likes and liked by user ids on contract

* Refactor tip amount, reduce to M

* Move back to M

* Change positioning for large screens
2022-08-30 09:38:59 -06:00
FRC
e1f19c52ab
Post in a group about page. (#803)
* Dashboards in Group about page

* Rename group dashboard to 'About Post'

* Fixed James nits
2022-08-30 13:39:10 +01:00
Marshall Polaris
7debc4925e
De-feedify contract tab contents (#808)
* De-feedify contract bets list

* De-feedify contract comments lists

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

* Remove wrapper markup from comment replies list

* Fix sort order on comments I broke

* Kill now unhelpful `CommentRepliesList` wrapper component

* More random cleanup

* More cleanup and fix some styling I had broken

* Make bet calculations less wrong

* Keep up to date with master

* Make copy link component copy better URL

* Make highlighted comments align properly

* Make user header left align with content on comments

* Fix some free response UI stuff up
2022-08-30 02:41:47 -07:00
Marshall Polaris
1e3a0ca3d9
Upgrade Typescript, ESLint, Prettier (#817)
* Bump Typescript to 4.8.2, eslint, prettier

* Fix some loose typing

* Fix prettier complaint
2022-08-30 01:44:45 -07:00
James Grugett
c7452796f0 Recommend contracts you haven't bet on 2022-08-30 00:22:12 -05:00
Marshall Polaris
1369f3b967
WIP persistence work (#762)
* WIP persistence work

* Fix up close date filter, kill custom scroll restoration

* Use built-in Next.js scroll restoration machinery

* Tweaking stuff

* Implement 'history state' idea

* Clean up and unify persistent state stores

* Respect options for persisting contract search

* Fix typing in common lib

* Clean up console logging
2022-08-29 21:56:11 -07:00
James Grugett
1d948821ca Turn off react query subscription for user bets and portfolio history 2022-08-29 16:47:21 -05:00
James Grugett
84432e5ac4 Add creatorId to lite market 2022-08-29 14:25:58 -05:00
FRC
851cffd73e
Dashboards (#791)
* Create backend for Dashboards

* Rm lastupdatetime for now

* Added a create-dashboard and sharable view dashboard page

* Various nit fixes.

* Renamed Dashboards to Posts

* Fix nits
2022-08-29 16:06:17 +01:00
Austin Chen
1d1b09c938 Append question changed text to end of description (instead of start) 2022-08-28 23:23:40 -07:00
Austin Chen
8f338a8d88
Prevent embeds from breaking in Chrome incognito (#814) 2022-08-28 22:40:57 -07:00
James Grugett
7ea6777d6b Add margin bottom to tournament cards to reveal shadow 2022-08-29 00:29:59 -05:00
James Grugett
ecacce0796 Remove console.log. Log onIdTokenChanged error. 2022-08-29 00:26:12 -05:00
James Grugett
71dfcc4dd9 Add tracking for clicking recommended card & tournament card 2022-08-29 00:23:31 -05:00
Austin Chen
6c64c9f1cd Remove hot volume from /tournaments 2022-08-28 22:21:28 -07:00
mantikoros
6facf3b7a7 sidebar ordering 2022-08-29 00:01:04 -05:00
James Grugett
62e72b2091 Loan dialog wording tweak 2022-08-28 23:51:43 -05:00
James Grugett
4dad954820 Change limit order label "at" => "up to" or "down to" 2022-08-28 23:47:11 -05:00
Austin Chen
f0727a65fc Add SF 2022 Ballot to /tournaments 2022-08-28 21:33:13 -07:00
akrolsmir
c7be227865 Auto-remove unused imports 2022-08-29 04:00:14 +00:00
Austin Chen
cf58fc9fd4 Remove Groups from sidebar 2022-08-28 20:59:14 -07:00
James Grugett
996b4795ea
Cache user bets tab with react query!! (#813)
* Convert useUserBets to react query

* Fix duplicate key warnings

* Fix react-query workaround to use refetchOnMount: always'

* Use react query for portfolio history

* Fix useUserBet workaround

* Script to back fill unique bettors in all contracts

* React query for user bet contracts, using uniqueBettorsId!

* Prefetch user bets / portfolio data
2022-08-28 18:03:00 -05:00
mantikoros
7e00f29189 back to "sign up to bet" 2022-08-28 16:55:29 -05:00
mantikoros
1ff453d64c eslint 2022-08-28 16:38:59 -05:00
mantikoros
e4c66e08f5 clean up add markets dialog 2022-08-28 16:26:36 -05:00
mqp
3fd07da1b0 Auto-prettification 2022-08-28 21:15:31 +00:00
mantikoros
eb070f0b07 Auto-remove unused imports 2022-08-28 21:14:44 +00:00
mantikoros
c88621de19 hide group edit dialog when signed out 2022-08-28 16:14:02 -05:00
mantikoros
2e96721a5c "sign in" => "add my answer" 2022-08-28 16:14:02 -05:00
mantikoros
0a5fb4752a CreateQuestionButton: use Button component 2022-08-28 16:14:02 -05:00
mantikoros
cae2154893 sign in button 2022-08-28 16:14:02 -05:00
mantikoros
926929880a "Sign up to bet" => "Place my bet"; "Sign in to comment" => "Add my comment"; rename button to BetSignUpPrompt 2022-08-28 16:14:02 -05:00
James Grugett
9c15d5b96c
React-query-ify notifications (#812)
* Use single react query to subscribe to notifications

* Remove 'preferred' in variable names
2022-08-28 15:20:21 -05:00
mantikoros
3d073da97e hide quick bet on mobile 2022-08-28 14:07:19 -05:00
mantikoros
d63dd12056 admin unlisted toggle 2022-08-28 13:37:34 -05:00
mantikoros
133e7a9c3f change label to admin 2022-08-28 13:37:34 -05:00
mantikoros
98861ccc19 remove typo 2022-08-28 13:37:34 -05:00
Marshall Polaris
1e11491369 Tidy up rendering of info tooltips 2022-08-28 01:43:13 -07:00
James Grugett
7c798a063c Improve edit close date UI 2022-08-28 00:35:24 -05:00
mantikoros
03e07037ea
ban users from posting (#810) 2022-08-28 00:23:25 -05:00
James Grugett
2acc1a8433 Double daily loans rate to 2% 💰💰 2022-08-28 00:11:28 -05:00
James Grugett
e4f46c48f1 Fix recommended markets not updating when navigating 2022-08-27 22:35:46 -05:00
James Grugett
cb08a114ae Better recommended contracts. Include from first group. 2022-08-27 22:26:39 -05:00
James Grugett
e7f369e2b4 Load recommended markets even when navigating from home 2022-08-27 22:26:39 -05:00
Marshall Polaris
b21051ced5 Fix up copy link toast styling 2022-08-27 19:15:55 -07:00
Marshall Polaris
ef77c7c9a3
Clean up markup in CopyLinkDateTimeComponent (#809) 2022-08-27 19:05:46 -07:00
James Grugett
d7793841d1 Fix NaN invested (floating point error) 2022-08-27 17:13:29 -05:00
Marshall Polaris
4b513a894d
Make tooltip rendering more efficient (#807)
* Don't use very slow dayjs formatter on timestamp tooltips

* Kill dead code in feed-bets.tsx

* Clean up tooltip markup
2022-08-27 13:46:35 -07:00
mantikoros
305acbb18f "current value" => "expected value" 2022-08-27 14:17:19 -05:00
Marshall Polaris
5d8f5d41fc
Fix some efficiency problems with ContractProbGraph (#806)
* Memoize bets input to ContractOverview

* Optimize a bunch of nonsense in `ContractProbGraph`
2022-08-27 01:09:17 -07:00
Marshall Polaris
3e976eadac
Make portfolio graph loading more efficient (#805)
* Make portfolio graph on profile not load extra data

* Clean up unused props

* Tidy up markup

* Enable "daily" option again on portfolio history picker
2022-08-27 01:09:01 -07:00
James Grugett
51ceb62871 Fix console error on create page 2022-08-27 01:14:24 -05:00
James Grugett
a9ea335cd1 Fix create page serverside vs clientside render discrepancy console error 2022-08-27 01:07:39 -05:00
James Grugett
a040df2732 Fix console error from non-react-style attributes on trophy icon 2022-08-27 01:02:59 -05:00
James Grugett
2e3c2d4dcb Tweak to add market to group UI 2022-08-27 00:59:00 -05:00
mqp
5ff847fba3 Auto-prettification 2022-08-27 05:01:29 +00:00
jahooma
f641569bcc Auto-remove unused imports 2022-08-27 05:00:37 +00:00
James Grugett
8e4dd407f6 Test with unused import 2022-08-26 23:59:56 -05:00
James Grugett
86cf956894 Add eslint plugin to remove unused imports 2022-08-26 23:49:03 -05:00
James Grugett
e4d6bb35b5 Fix floating button to be on top of quick bet arrows. Switch icon. 2022-08-26 23:10:10 -05:00
Marshall Polaris
902d9e140c
Create and use new usePagination hook for paginating loading (#769)
* Create and use new `usePagination` hook for paginating loading

* Fix index for new comment list code
2022-08-26 20:18:08 -07:00
Sinclair Chen
9698895c22 Update fr chart colors 2022-08-26 17:39:46 -07:00
Austin Chen
a2da319e7c Remove unused import 2022-08-26 17:35:59 -07:00
Austin Chen
1dbef921b0 Sort markets on /tournaments by % 2022-08-26 17:13:49 -07:00
Sinclair Chen
59aa76a474
Add Salem Center tournaments (card screenshots) (#804) 2022-08-26 16:23:44 -07:00
James Grugett
99bff6b794 Improve group market selection UI 2022-08-26 18:17:15 -05:00
James Grugett
5735864fd1 Add pencil to edit group on contract page 2022-08-26 17:25:05 -05:00
Sinclair Chen
8903b1ef95
Replace style props with tailwind classes (#800)
* add utility class for `word-break: break-word`

* refactor visuallyHidden style out of Page

* refactor out ref sizing hack in sidebar

* replace style props with tailwind classes
2022-08-26 14:23:06 -07:00
Austin Chen
3255806891 Support Figma embeds 2022-08-26 12:41:39 -07:00
Austin Chen
ba7d0f45db Close Add Market modal on Cancel 2022-08-26 12:41:29 -07:00
Sinclair Chen
490115d890
Add tournaments to sidebar (#802)
* Add tournaments to sidebar

* Remove unused import

* Reposition tournaments tab

Co-authored-by: Austin Chen <akrolsmir@gmail.com>
2022-08-26 10:45:01 -07:00
Sinclair Chen
803091db06
Add tournament home page (#797)
* Add tournament home page

* Preload markets, follow count

* organize imports

* Fix card width

* Make entire title clickable

* plural /tournament -> /tournaments

* prettier

* Fix /tournaments when groupIds are invalid

* Restyle /tournaments page

* Reintroduce Salem, tweak styles

Co-authored-by: Austin Chen <akrolsmir@gmail.com>
2022-08-26 10:31:25 -07:00
James Grugett
31db330319 Show "(max)" on streak payout if it is the max payout 2022-08-26 11:38:08 -05:00
James Grugett
b1ccee73fd If there is a group for a market on market page, clicking it goes to group 2022-08-26 01:23:50 -05:00
James Grugett
74ce98913c Make graph start from left side for new markets 2022-08-26 01:08:16 -05:00
Austin Chen
26a2eb2391 Switch to a different color scheme 2022-08-25 22:31:05 -07:00
James Grugett
6f2e2a3bbb Render graph for multiple choice embeds 2022-08-26 00:23:50 -05:00
James Grugett
539bfba70c Decrease starting time window for free response graph 2022-08-26 00:21:06 -05:00
James Grugett
e5777f02d8 Expand notifications by default if <= 3 items 2022-08-26 00:00:44 -05:00
Sinclair Chen
1b029ce8dd
bump tiptap version to fix multi-italic bug (#801) 2022-08-25 20:56:38 -07:00
Austin Chen
4faab4fcdc Clean up Featured code 2022-08-25 19:42:40 -07:00
Austin Chen
0f49effade Tweak Featured badge design 2022-08-25 19:17:50 -07:00
James Grugett
7773234138 Add debug console.log 2022-08-25 17:21:51 -05:00
Ian Philips
91bb4dfab2 With play money on numeric & center text 2022-08-25 12:06:42 -06:00
James Grugett
97b648a51e Move recommended markets below market white bg onto gray bg 2022-08-25 12:59:26 -05:00
Ian Philips
b785d4b047 With play money 2022-08-25 10:02:22 -06:00
Ian Philips
dc89d5d4d0 Feature markets on trending 2022-08-25 07:05:26 -06:00
Ian Philips
b9f0da9d3b Give all users 5 free markets 2022-08-25 05:51:56 -06:00
Ian Philips
6e3b8fdd4d Show old streak for old streak notifs 2022-08-25 05:10:38 -06:00
Ian Philips
465e219bfc Show old streak for old streak notifs 2022-08-25 05:10:24 -06:00
James Grugett
93739e7990 Fix betting streak number 2022-08-24 23:40:27 -05:00
James Grugett
cffd5dcd31 Weekly => daily loans 2022-08-24 22:03:07 -05:00
James Grugett
0caa5e24e8 Some other follow to watch changes 2022-08-24 21:23:12 -05:00
James Grugett
25eca71846 Convert heart to eye and follow to watch 2022-08-24 21:16:38 -05:00
James Grugett
a8da5719fe Create experimental home page 2022-08-24 18:30:31 -05:00
Ian Philips
7a38d67c5b Reduce share row top margin on mobile 2022-08-24 17:11:48 -06:00
Ian Philips
7a22c7d76a Gap adjustment 2022-08-24 17:09:07 -06:00
Ian Philips
8d1cebf4db Move share button back down, small spacing tweaks 2022-08-24 17:07:22 -06:00
Ian Philips
b6e636cbc0 Small ux tweaks for signed out market page 2022-08-24 16:41:46 -06:00
mantikoros
5bf135760e fix sidebar tracking 2022-08-24 17:23:34 -05:00
SirSaltyy
74a0479cbd
Change about button (#796)
About button name change and now directs to "Help and About Center" super.so
2022-08-25 06:51:33 +09:00
Ian Philips
52a89d0783 Remove bolded More from navbar 2022-08-24 15:42:09 -06:00
Ian Philips
d553aae71e Shrink icon 2022-08-24 15:11:38 -06:00
Ian Philips
5365fa6175 💔💔💔 2022-08-24 15:09:28 -06:00
mantikoros
d5ac560f0c eslint 2022-08-24 15:36:57 -05:00
mantikoros
de74b2987a eslint 2022-08-24 15:34:00 -05:00
mantikoros
d390b39e0a eliminate fees 2022-08-24 15:29:48 -05:00
James Grugett
d6d1e8e86f Fix types 2022-08-24 13:29:35 -05:00
James Grugett
1c323c5a7f Simple recommended contracts based on contract creator 2022-08-24 12:59:23 -05:00
Ian Philips
3eb1b66e9a Lint 2022-08-24 11:58:32 -06:00
Ian Philips
c72bf506c3 Heart button on xl style 2022-08-24 11:53:29 -06:00
Ian Philips
432ee387ec Show all groups on sidebar 2022-08-24 11:23:07 -06:00
Ian Philips
a5812a5a73 Remove group chat display 2022-08-24 11:15:38 -06:00
Ian Philips
f50b4775a1
Allow to follow/unfollow markets, backfill as well (#794)
* Allow to follow/unfollow markets, backfill as well

* remove yarn script edit

* add decrement comment

* Lint

* Decrement follow count on unfollow

* Follow/unfollow button logic

* Unfollow/follow => heart

* Add user to followers in place-bet and sell-shares

* Add tracking

* Show contract follow modal for first time following

* Increment follower count as well

* Remove add follow from bet trigger

* restore on-create-bet

* Add pubsub to dev.sh, show heart on FR, remove from answer trigger
2022-08-24 10:49:53 -06:00
James Grugett
78780a9219 Dedup contract leaderboards code from contract slug (merge error?) 2022-08-23 19:25:57 -05:00
Sinclair Chen
7da4eb8fe9
Fix bet modal probability sticking (#793)
* Fix button group styles
* Reset prob strike-out when bet modal closed
2022-08-23 14:31:52 -07:00
Ian Philips
bea94d58c5 Add extra text-sm 2022-08-23 07:55:26 -06:00
Sinclair Chen
b476a7e3f8
Take descriptions out of LiteMarket (#789) 2022-08-22 18:18:51 -07:00
Sinclair Chen
20fd286756
Fix link classes duplicating on paste (#788) 2022-08-22 17:45:23 -07:00
Austin Chen
552f9add70 Reduce min time on contract graph to 1h
Allows more resolution on real-time markets, where a lot of trading happens within minutes
2022-08-22 17:23:59 -07:00
mantikoros
571cf80e13 markets api: only load 500 markets by default 2022-08-22 14:42:23 -05:00
mantikoros
3313b55853 listAllContracts: sort by createdTime by default 2022-08-22 14:23:52 -05:00
Austin Chen
650aa68bcd Fix imports 2022-08-22 11:31:33 -07:00
Austin Chen
7736f1e3c1 Make duplicating better: description, closetime, logscale
Known issue: some markets like https://manifold.markets/FFSX/rojo-ronald-jones don't duplicate because too much stuff in JSON...?
2022-08-22 10:49:54 -07:00
Austin Chen
0cd61eb214 DX: Link to Firestore console from "..." 2022-08-22 10:48:21 -07:00
mantikoros
2530171721 don't run next-sitemap post build 2022-08-22 12:09:16 -05:00
mantikoros
009c85b61a listAllContracts: order by popularity score 2022-08-22 12:07:05 -05:00
mantikoros
7a0d64e72f host sitemap manually (delete nextjs sitemap) 2022-08-22 12:02:08 -05:00
mantikoros
40a22b31f3 fix sitemap 2022-08-22 11:52:05 -05:00
mantikoros
8ea9a79760 loan emoji 2022-08-22 10:31:23 -05:00
Ian Philips
571d3e71b5 Only show most recent streak notif, relative econ imports, pubsub emulator 2022-08-22 06:31:30 -06:00
Austin Chen
b7790a9678 Show Referrals count for each user 2022-08-21 22:53:02 -07:00
Austin Chen
88bf678ce3
Allow custom environments to override any economic aspect (#787)
* Extract monetary constants to a single file economy.ts

* Add missing import

* Allow environments to override any econ variable

* Update imports

* Update more imports

* Fix import
2022-08-21 22:37:26 -07:00
James Grugett
8b7cd20b6f
Loans2: Bets return you some capital every week (#588)
* Remove some old loan code

* Almost complete implementation of updateLoans cloud function

* Merge fixes

* Use invested instead of sale value, check if eligible, perform payouts

* Run monday 12am

* Implement loan income notification

* Fix imports

* Loan update fixes / debug

* Handle NaN and negative loan calcs

* Working loan notification

* Loan modal!

* Move loans calculation to /common

* Better layout

* Pay back loan on sell shares

* Pay back fraction of loan on redeem

* Sell bet loan: negate buy bet's loan

* Modal tweaks

* Compute and store nextLoanCached for all users

* lint

* Update loans with newest portfolio

* Filter loans to only unresolved contracts

* Tweak spacing

* Increase memory
2022-08-22 00:22:49 -05:00
Austin Chen
3158740ea3 Minor tweaks for custom instances 2022-08-21 22:13:42 -07:00
Austin Chen
258b2a318f Default to showing weekly bet graph 2022-08-21 21:02:56 -07:00
Austin Chen
aa3647e0f3 Handle case when no charity txns 2022-08-21 20:55:04 -07:00
James Grugett
d18dd5b8fb Fix a case of limit order sorting 2022-08-21 15:58:49 -05:00
James Grugett
645cfc65f4 Update sort order of limit orders (older bets first b/c they are filled first) 2022-08-21 12:57:00 -05:00
James Grugett
f4ebb2b504 Fix wrapping on "Add market" button 2022-08-20 15:19:05 -05:00
Sinclair Chen
a9f846e8fc
Fix tooltip styles in your bets (#783)
* Only show answer tooltips if truncated

* Always wrap in tooltip

* refactor. make title in dialog less big
2022-08-20 13:05:33 -07:00
James Grugett
099764a931 Show unlisted markets in groups and under your markets 2022-08-20 14:38:15 -05:00
James Grugett
09e8993cd4 Implement visibility option for new markets 2022-08-20 14:31:32 -05:00
mantikoros
dd6c5dc97a betting streaks copy 2022-08-20 13:47:26 -05:00
James Grugett
2fef413d88 Don't show fantasy football in newest sort 2022-08-20 13:46:14 -05:00
James Grugett
474304d284 Revert "🔥🔥🔥🔥🔥🔥🔥🔥"
This reverts commit fc8487dca0.
2022-08-20 11:45:13 -05:00
Austin Chen
6791da0fc8 Fix "Most Recent Donor" on /charity 2022-08-19 17:28:08 -07:00
Sinclair Chen
c850cfe97f Revert "Revert "fix firefox visual glitch - single card wrapping""
This reverts commit 63a5241b2e.
2022-08-19 16:59:42 -07:00
Austin Chen
51c843d765
Use masonry on contract cards, sorted correctly (#773)
* Revert "Revert "Tile contract cards in masonry layout (#761)""

This reverts commit 62728e52b7.

* Sort the contracts in the correct masonry order

* Fix ordering on single columns

* Use react-masonry-css to accomplish masonry view

* Improve comment

* Remove gridClassName

Everything is spaced with m-4, too bad
2022-08-19 16:57:23 -07:00
Ian Philips
fc8487dca0 🔥🔥🔥🔥🔥🔥🔥🔥 2022-08-19 16:00:40 -06:00
James Grugett
b67a26ad61 Don't show bets streak modal on navigate each tab 2022-08-19 16:51:52 -05:00
Ian Philips
36bfbe8f42 Change betting streak modal, tweak trending email query 2022-08-19 14:37:16 -06:00
Ian Philips
a0f62ba172
Markets emails (#764)
* Send out email template for 3 trending markets

* Rich text to plaintext descriptions, other ui changes

* Lint

* Filter for closed markets

* Change sign

* First order must be closeTime

* Send 6 emails, check flag twice

* Exclude contracts with trump and president in the name

* interesting markets email

* sendInterestingMarketsEmail

* Change subject line back

Co-authored-by: mantikoros <sgrugett@gmail.com>
2022-08-19 11:43:57 -06:00
Ian Philips
ba5dabd613 Increase gap between profit and streak 2022-08-19 11:24:28 -06:00
Ian Philips
00c9fa61c3
betting streaks (#777)
* Parse notif, show betting streaks modal, schedule function

* Ignore streaks of 0

* Pass notifyFills the contract

* Turn 9am into a constant

* Lint

* Up streak reward, fix timing logic

* Change wording
2022-08-19 11:10:32 -06:00
Sinclair Chen
4f3202f90b
Simple bet interface in embeds (#775)
* rename BetRow -> BetButton

* Replace bet modal in embed with inline betting

- Also simplifies graph height calculation

* Move bet row above graph, in "mini modal"

* Show signup button if not signed up

* Show probability change

* Show error after modal

- Show balance if insufficient funds
- Clear error from amount input if amount deleted entirely

* Fix error state conditions

- Reset amount input on success
- Reset success state on user input

* Make input smaller (80px)
2022-08-19 10:07:48 -07:00
Sinclair Chen
98a0ed99c9 Fix (i) alignment 2022-08-19 09:53:16 -07:00
Sinclair Chen
4d7df00a68
Make Avatar component update when avatarUrl updates (#780) 2022-08-19 09:47:00 -07:00
Marshall Polaris
0972de9025
Make typing for comments more fancy (#776) 2022-08-19 01:06:40 -07:00
Sinclair Chen
f2764e9258
Remove keyboard accessibility for tooltips (#779)
Headless UI's Modal component autofocuses the first focusable item
inside it when opened. This is by design for accessibility reasons.
See https://headlessui.com/react/dialog#managing-initial-focus

Ironically this means we'll have to remove keyboard focus for tooltips
because this causes the tooltips to pop up unnecessarily for all users
whenever the dialog is opened. The alternative is managing focus
manually for several dialogs, which may not be possible as some of our
modals lack a sensible element to focus by default.
2022-08-18 18:54:09 -07:00
Sinclair Chen
2537663a57
Fix user avatar in mention list not updating (#778) 2022-08-18 17:20:40 -07:00
Marshall Polaris
0cf9a90cfb
Remove some dead code related to tags, categories, and old feed stuff (#765)
* Remove dead image storage code

* Kill tag page

* Kill tag and categories related component UI

* Kill some old algo feed kind of code
2022-08-18 15:46:11 -07:00
Marshall Polaris
c37997bcb7
Add comment type field to comments (#772) 2022-08-18 12:47:35 -07:00
Austin Chen
c2db558b85 Describe why subsidizing is good 2022-08-18 10:12:38 -07:00
James Grugett
097000c9da Don't scroll to top on search change except on home 2022-08-18 11:23:16 -05:00
Ian Philips
c9c3a95d2a Condense user profile bits 2022-08-18 09:54:30 -06:00
Ian Philips
68a949de35 Change Challenge page wording 2022-08-18 08:22:37 -06:00
Ian Philips
33edd3c0fb
Create challenge without previous market (#718)
* Create challenge without previous market

* Check if they've balance to create both on fe

* Change wording slightly

* Finish merge
2022-08-18 08:15:20 -06:00
Ian Philips
c3d09e5323 Add links to challenge page 2022-08-18 07:53:19 -06:00
Marshall Polaris
97fa5fa636
Replace /markets with /home (#766)
* Make /home not kick out logged out users

* Point people at /home instead of /markets
2022-08-17 23:15:25 -07:00
marsteralex
fb67010c0e
include draft innovation basics (#771)
* fix https

* add beasts

* Remove extra file

* Prettier-ify code

* Prettier-ify

* add basic land guesser

also added fetcher to filter all cards instead of only unique art

* default to original

makes basic better

* added set symbol to basics

added set symbol to the basics game mode. Changed name to "How Basic"

* cleanup

* changed some pixels

* only load set data if needed

* hacked fix for removing image from name

* removed check from original

* remove check from original

* sort names by set instead of by set symbol

* include battlebond

Co-authored-by: Austin Chen <akrolsmir@gmail.com>
2022-08-17 18:17:29 -07:00
marsteralex
5bf39a7a92
sort by set name (#770)
* fix https

* add beasts

* Remove extra file

* Prettier-ify code

* Prettier-ify

* add basic land guesser

also added fetcher to filter all cards instead of only unique art

* default to original

makes basic better

* added set symbol to basics

added set symbol to the basics game mode. Changed name to "How Basic"

* cleanup

* changed some pixels

* only load set data if needed

* hacked fix for removing image from name

* removed check from original

* remove check from original

* sort names by set instead of by set symbol

Co-authored-by: Austin Chen <akrolsmir@gmail.com>
2022-08-17 18:01:59 -07:00
marsteralex
2c97be815b
remove check from original (#768)
* fix https

* add beasts

* Remove extra file

* Prettier-ify code

* Prettier-ify

* add basic land guesser

also added fetcher to filter all cards instead of only unique art

* default to original

makes basic better

* added set symbol to basics

added set symbol to the basics game mode. Changed name to "How Basic"

* cleanup

* changed some pixels

* only load set data if needed

* hacked fix for removing image from name

* removed check from original

* remove check from original

Co-authored-by: Austin Chen <akrolsmir@gmail.com>
2022-08-17 16:03:02 -07:00
marsteralex
ce3d092497
Add Basic Lands to MTG Guesser (#716)
* fix https

* add beasts

* Remove extra file

* Prettier-ify code

* Prettier-ify

* add basic land guesser

also added fetcher to filter all cards instead of only unique art

* default to original

makes basic better

* added set symbol to basics

added set symbol to the basics game mode. Changed name to "How Basic"

* cleanup

* changed some pixels

* only load set data if needed

* hacked fix for removing image from name

Co-authored-by: Austin Chen <akrolsmir@gmail.com>
2022-08-17 12:40:59 -07:00
Sinclair Chen
99009f841b Make text of old chats same size as current 2022-08-17 10:45:30 -07:00
mantikoros
bf64f5b3a9 redirect /about; more content in welcome email 2022-08-17 11:21:29 -05:00
Ian Philips
a00857cb45 Fix wrapping close date and truncate group name 2022-08-16 16:03:55 -06:00
Sinclair Chen
59565416b6
Api fixes (#704)
* Add min, max, isLogScale to numeric market API return

* Add lastUpdatedTime to market API

* Return a string description in market API

* Accept string descriptions in market POST api

* install prettier eslint config. fix import

* fix another import
2022-08-16 15:01:03 -07:00
James Grugett
8c2f3c56d3 Limit orders: Subtract fees from "profit if both filled" 2022-08-16 15:51:04 -05:00
James Grugett
62728e52b7 Revert "Tile contract cards in masonry layout (#761)"
This reverts commit 4002c23bee.
2022-08-16 13:03:04 -05:00
James Grugett
63a5241b2e Revert "fix firefox visual glitch - single card wrapping"
This reverts commit ec7263da18.
2022-08-16 13:02:55 -05:00
Marshall Polaris
59ca1f7640
Denormalize some contract comment fields (#760)
* Make `groupConsecutive` more capable

* Put denormalized `contractQuestion` and `contractSlug` on comments

* Update user profile UI to use new denormalized fields

* `/Austin` -> `/market`
2022-08-15 22:43:46 -07:00
Sinclair Chen
ec7263da18 fix firefox visual glitch - single card wrapping 2022-08-15 22:08:09 -07:00
Ian Philips
cd520e6cfe lint 2022-08-15 19:47:58 -06:00
Ian Philips
d56435b9cd Signed out home page shows dynamic trending markets 2022-08-15 19:34:45 -06:00
Sinclair Chen
4002c23bee
Tile contract cards in masonry layout (#761) 2022-08-15 17:41:53 -07:00
James Grugett
997d68a574 Compute invested & display in your bets 2022-08-15 19:04:37 -05:00
Austin Chen
34e8138e50 Show placeholder when avatarUrl errors 2022-08-15 16:33:02 -07:00
Ian Philips
428d9a3692 Move avatar to below card on mobile 2022-08-15 13:49:33 -06:00
James Grugett
2ff2d6c1fc Scroll to top for fresh query 2022-08-15 14:26:18 -05:00
James Grugett
c80f82a3f7 Home page hack: discard NextJS router state 2022-08-15 11:06:42 -05:00
Marshall Polaris
972f215f0c
Rewrite useQueryAndSortParams machinery to be faster/simpler/better (#758)
* Rewrite useQueryAndSortParams machinery to be faster/simpler/better

* Politely debounce Algolia querying

* Tidy some stuff up

* Style changes suggested by James
2022-08-14 22:09:25 -07:00
mantikoros
5d14d79e6e share dialog: remove native sharer; use toast for embed 2022-08-15 00:03:05 -05:00
mantikoros
b57c84bbd9 notifications title/seo 2022-08-14 23:55:11 -05:00
Marshall Polaris
0b711be480
Clean up a bunch of markup and CSS on contract cards (#753)
* Remove random unnecessary top-level divs

* Remove wrapper in MiscDetails

* Remove another wrapper in ContractCard

* Fix a bunch of weird CSS stuff
2022-08-14 01:05:17 -07:00
Marshall Polaris
69c49679f1
Move search controls into separate component (#757)
* Move search controls into separate component

* Fix up typing on pill groups thingy

* More precise comparison per James

* Make sure `additionalFilter` is passed into controls
2022-08-13 16:34:03 -07:00
Marshall Polaris
0085ffcb0b
Simplify and fix inefficiencies in contract search component (#756)
* Simplify and fix inefficiencies in contract search component

* Add react-dom types

* Add a clarifying comment

* Improve search per some feedback
2022-08-13 13:15:11 -07:00
James Grugett
0a9df3ac6b Group horizontal margin on tabs 2022-08-13 13:50:26 -05:00
James Grugett
aeea66491a Group question => market 2022-08-13 13:49:25 -05:00
Marshall Polaris
456d9398a1
Revamp a lot of stuff on the user page to make it usably efficient (#751)
* Load bets and comments tabs data on user page independently

* Implement basic pagination on profile comments list

* Tweak server auth to return `null` instead of `undefined`

* Switch to SSR for user page

* Fix lint

* Fix broken contract fetching in user bets list

* Tidying
2022-08-12 20:42:58 -07:00
Sinclair Chen
dcc3c61f52
Only calculate position when tooltip is shown (#755) 2022-08-12 20:35:08 -07:00
Marshall Polaris
0f7f55ec0a Fix embarrassing bug in server auth 2022-08-12 20:14:24 -07:00
Sinclair Chen
facb19a347
fix dependency peer-dep warnings, mostly (#752) 2022-08-12 17:49:08 -07:00
Marshall Polaris
96a378ec4b
Make RelativeTimestamp a little more efficient (#754)
* Don't do extra dayjs work in timestamp components

* Remove extra wrapper from `RelativeTimestamp`
2022-08-12 17:48:41 -07:00
Marshall Polaris
79be0c555b Fix tiny bug in auth context code 2022-08-12 13:45:38 -07:00
Marshall Polaris
3cb28cdecb
Teach AuthContext to manage the private user doc (#738)
* Return both user and privateUser from `createuser`

* Make `useStateCheckEquality` more flexible

* Make `AuthContext` track the private user doc

* Change `usePrivateUser` hook to use the auth context data

* Pass both user and private user through SSR to auth context

* Fix bug in create user flow
2022-08-12 13:41:00 -07:00
James Grugett
3cbf5a6f7d Always show search placeholder 2022-08-12 14:35:27 -05:00
Sinclair Chen
20ab313c6c Improve profile comments vis d 2022-08-12 12:10:45 -07:00
Sinclair Chen
88535e5512 fix lint error 2022-08-12 12:10:07 -07:00
Sinclair Chen
df858f916b
Migrate daisy tooltips to our own to fix cutoffs (#748)
* Make all tooltips use our component

* Stop mobile tooltip crop (daisy -> floating-ui)

* Show tooltip on tap for touch devices

Except tooltips on buttons

* migrate another daisy tooltip to ours

* Prevent hidden tooltip from covering click/hover
2022-08-12 12:04:23 -07:00
mantikoros
8ebccd05ec market movement warning; add bankroll warning to FR markets 2022-08-12 11:24:08 -05:00
Marshall Polaris
80fd38990f Experimentally do not optimizeCss 2022-08-11 21:07:54 -07:00
Austin Chen
7ad8af848a Replace DaisyUI buttons with TailwindUI buttons
Maybe this should use the button component...? But that's styled differently, the rest of /create uses standard TailwindUI
2022-08-11 20:54:12 -07:00
Marshall Polaris
e2eae01ad8
Add a shitload of logging to the server auth code (#749) 2022-08-11 20:46:18 -07:00
Marshall Polaris
38d9e8190c
Only load portfolio history inside user page bets tab (#747) 2022-08-11 20:44:51 -07:00
Austin Chen
af4c442105 Support Twitch video and channel embeds 2022-08-11 20:23:33 -07:00
Austin Chen
9311652bed
Support Youtube, Tweet, and Metaculus embeds in editor (#744)
* Embed a tweet by URL

* Clean up imports

* Prevent tweetId from getting interpreted as a number

* Use a single place to embed iframe, Youtube, and Tweets

* Support Manifold and Metaculus embeds

* Remove unused import

* Simplify Manifold paste logic

* Clean up embed rewrite code

* Add back comment

* Rejigger config so tsx is only in web/

* Clean up comment

* Revert unnecessary tsconfig change

* Fix placeholder

* Lighten placeholder
2022-08-11 20:18:01 -07:00
Sinclair Chen
daba28423a
Improve create page UI (#746)
* Adjust create page styles

* Keep answers when switching market type
2022-08-11 14:41:21 -07:00
Austin Chen
dc95587cca
Add editor toolbar to choose and embed markets (#702)
* Embed markets using the "add markets" template

* Override dev domain

* Improve market modal style

- contract searchbar now sticky
- entire card clickable to select (if quickbet is hidden)
- adjust selected card styles

* remove extra export

* Hide pills

* Fix browser redirect warning

* Insert all markets instead of just one

* fix type error

* fixup "Insert all markets instead of just one"

Co-authored-by: Sinclair Chen <abc.sinclair@gmail.com>
2022-08-11 14:32:02 -07:00
Marshall Polaris
4e8b94a28c
Componentize confetti to isolate re-renders due to window size (#740)
* Componentize confetti to isolate re-renders due to window size

* Clean up debug logging
2022-08-11 12:55:25 -07:00
Marshall Polaris
b9f347b7f4
Use UserFollowButton instead of FollowButton in UserPage (#742) 2022-08-11 12:54:09 -07:00
Marshall Polaris
ad75ecdc87
Move liquidity provision fetch down into ContractTabs (#741) 2022-08-11 12:53:54 -07:00
Marshall Polaris
daa86fa330
Change tabs to keep all individual tab components in the DOM (#743) 2022-08-11 12:53:42 -07:00
Sinclair Chen
99326eb65a fix spacing of long group names on markets 2022-08-11 12:30:34 -07:00
James Grugett
6e93f11a59 Fix bolded group chat not getting unbolded 2022-08-11 00:00:40 -05:00
Marshall Polaris
8c537537a1
Add cache headers to avatars (#737)
* Set cache headers on newly uploaded avatars

* Go fix up all the old avatars to have cache headers
2022-08-10 11:03:55 -07:00
Austin Chen
b5b77be188 Accept URLs in the iframe editor
TODO: Update placeholder text to mention this
2022-08-10 11:03:39 -07:00
James Grugett
d7b021b79f Clear entered limit probs on submit limit order 2022-08-10 12:37:51 -05:00
James Grugett
654790315c Fix missing key console error 2022-08-10 12:33:29 -05:00
mantikoros
35df201e2e prob bar for multiple choice 2022-08-10 12:32:30 -05:00
James Grugett
4d953d58a1 Move group chat back into a tab 2022-08-10 12:28:02 -05:00
mantikoros
dc26db2864 add salem to sidebar; clean up code 2022-08-10 12:17:40 -05:00
jahooma
3d30a1adbc Auto-prettification 2022-08-10 17:06:34 +00:00
James Grugett
05c9d3513a Don't reference window outside useEffect or click event. 2022-08-10 12:05:56 -05:00
mantikoros
52a2a3d842 track search 2022-08-10 11:50:21 -05:00
Marshall Polaris
521c479abf Fix an embarrassing bug in getPrivateUser 2022-08-09 23:55:41 -07:00
Marshall Polaris
818c90a95e
Refactor tipper (#734)
* Clean up tipping components

* Pass comment into tip callback
2022-08-09 23:05:56 -07:00
mantikoros
5f77a026aa fix modal 2022-08-09 21:59:40 -05:00
mantikoros
63538ae925 referral link on user page, manalinks, market share dialog; native sharer on mobile 2022-08-09 21:51:08 -05:00
Sinclair Chen
0b9ca6b7ee
Editor improvements (#735)
* Allow focus on all parts of editor

* Fix background and text colors

* Restrict height of image in comment

* Remove "Type *markdown*" placeholder

it's a little misleading (can't do markdown links) and messes with focus

to be replaced with a highlight menu in the future
2022-08-09 19:04:55 -07:00
Marshall Polaris
c07daafb8d
Make homepage load user via SSR, pass it to contract stuff (#729) 2022-08-09 15:28:52 -07:00
Marshall Polaris
847d3d0f27
Fix efficiency problems with visibility checking code (#730)
* Fix problems with visibility checking code

* Tear out old contract tracking stuff per James

* Use `useEvent` in VisibilityObserver per James suggestion
2022-08-09 15:28:27 -07:00
Marshall Polaris
5715b0e44a
Random contract page fixups (#712)
* Remove some divs and so on

* Correctly align bet avatars and text in feed

* Extract sidebar component on contract page
2022-08-09 13:25:42 -07:00
mantikoros
1e3c5cb936 add qr code to referrals 2022-08-09 12:27:52 -05:00
Sinclair Chen
914fc476ce
Remove top/bottom margin from indented list items (#733) 2022-08-09 10:17:44 -07:00
Austin Chen
49541d3eec Stop interpolating on portfolio value graph 2022-08-09 10:08:14 -07:00
Marshall Polaris
592125b5e7
Fix broken useBets filters (#731) 2022-08-09 10:50:11 -05:00
Marshall Polaris
e7f1d3924b
Fix up several pages to load user data on the server (#722)
* Fix up several pages to load user data on the server

* Add key prop to `EditUserField`
2022-08-08 22:43:04 -07:00
Marshall Polaris
5649161348
Pass page props user to auth provider if present (#724)
* Pass page props user to auth provider if present

* Rename `user` -> `serverUser`

* Don't load from local storage if server told us a user
2022-08-08 22:42:52 -07:00
Austin Chen
fd308151b3 Disable bouncing Challenge 2022-08-08 15:24:30 -07:00
Marshall Polaris
85e55312ca
What will be removed, is removed (#721) 2022-08-08 15:05:25 -07:00
James Grugett
98806a806f Fix query params on emulator/private instance 2022-08-07 18:07:36 -07:00
James Grugett
8fb3b42ea1 Default to trending. Fix close date being opposite 2022-08-07 17:48:43 -07:00
Austin Chen
a910e5dc17 Revert "Revert "Fix a bug with expiration of refresh and custom tokens""
This reverts commit 012b67e3c5.
2022-08-07 09:57:18 -07:00
Austin Chen
012b67e3c5 Revert "Fix a bug with expiration of refresh and custom tokens"
This reverts commit abd344b951.
2022-08-07 09:56:42 -07:00
Marshall Polaris
abd344b951 Fix a bug with expiration of refresh and custom tokens 2022-08-06 19:24:50 -07:00
Sinclair Chen
da977f62a9
Make added text go after img instead of replacing (#725) 2022-08-06 15:43:41 -07:00
Sinclair Chen
5892ccee97
Rich text in comments, fixed (#719)
* Revert "Revert "Switch comments/chat to rich text editor (#703)""

This reverts commit 33906adfe4.

* Fix typing after being weird on Android

Issue: character from mention gets deleted. Most weird on Swiftkey:
mention gets duplicated instead of deleting.

See https://github.com/ProseMirror/prosemirror/issues/565
https://bugs.chromium.org/p/chromium/issues/detail?id=612446

The keyboard still closes unexpectedly when you delete :(

* On reply, put space instead of \n after mention

* Remove image upload from placeholder text

- Redundant with image upload button
- Too long on mobile

* fix dependency
2022-08-06 13:39:52 -07:00
Marshall Polaris
d43b9e1836
Vercel auth phase 2 (#714)
* Add cloud function to get custom token from API auth

* Use custom token to authenticate Firebase SDK on server

* Make sure getcustomtoken cloud function is fast

* Make server auth code maximally robust

* Refactor cookie code, make set and delete more flexible
2022-08-05 20:49:29 -07:00
James Grugett
e0196f7107 Rename file contracts-list to contracts-group 2022-08-05 17:46:32 -07:00
James Grugett
b3b06896be Add loading indicator when algolia search is initially loading 2022-08-05 17:44:55 -07:00
Marshall Polaris
bf3ba8ac3f Remove test file 2022-08-05 16:07:02 -07:00
mqp
bba9f9a555 Auto-prettification 2022-08-05 23:03:25 +00:00
Marshall Polaris
d9ddabcfd4 Commit some un-pretty code 2022-08-05 15:35:57 -07:00
mantikoros
5e89628593 challenge bet tracking 2022-08-05 13:42:09 -07:00
mantikoros
f11c9a3341 bouncing challenge button (temporary gimmick) 2022-08-05 13:42:09 -07:00
James Grugett
ced404eb74 Local search filters on groups, exclude contractIds 2022-08-05 12:01:16 -07:00
Ian Philips
60ebadbbe5 Add not about donating winnings to charity 2022-08-05 09:58:02 -06:00
Ian Philips
de6d5b388a Lint 2022-08-05 06:58:39 -06:00
Ian Philips
1c80bf1faf Chat icon => users icon 2022-08-05 06:58:29 -06:00
Ian Philips
97e3de4e0f Show numeric values in card preview 2022-08-05 06:56:10 -06:00
mantikoros
f3704633ee liquidity panel styling 2022-08-05 00:03:38 -07:00
mantikoros
5988dd1e48 improved create challenge modal; 2xs button 2022-08-04 23:42:35 -07:00
mantikoros
16f4fb9490 disable clicking on group in embed 2022-08-04 22:47:59 -07:00
mantikoros
4d153755c1 delete challenge button 2022-08-04 22:33:56 -07:00
mantikoros
1e66f4d140
Share row (#715)
* Challenge bets

* Store avatar url

* Fix before and after probs

* Check balance before creation

* Calculate winning shares

* pretty

* Change winning value

* Set shares to equal each other

* Fix share challenge link

* pretty

* remove lib refs

* Probability of bet is set to market

* Remove peer pill

* Cleanup

* Button on contract page

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

* challenge button (WIP)

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

* Opengraph preview [WIP]

* elim lib

* Edit og card props

* Change challenge text

* New card gen attempt

* Get challenge on server

* challenge button styling

* Use env domain

* Remove other window ref

* Use challenge creator as avatar

* Remove user name

* Remove s from property, replace prob with outcome

* challenge form

* share text

* Add in challenge parts to template and url

* Challenge url params optional

* Add challenge params to parse request

* Parse please

* Don't remove prob

* Challenge card styling

* Challenge card styling

* Challenge card styling

* Challenge card styling

* Challenge card styling

* Challenge card styling

* Challenge card styling

* Challenge card styling

* Add to readme about how to dev og-image

* Add emojis

* button: gradient background, 2xl size

* beautify accept bet screen

* update question button

* Add separate challenge template

* Accepted challenge sharing card, fix accept bet call

* accept challenge button

* challenge winner page

* create challenge screen

* Your outcome/cost=> acceptorOutcome/cost

* New create challenge panel

* Fix main merge

* Add challenge slug to bet and filter by it

* Center title

* Add helper text

* Add FAQ section

* Lint

* Columnize the user areas in preview link too

* Absolutely position

* Spacing

* Orientation

* Restyle challenges list, cache contract name

* Make copying easy on mobile

* Link spacing

* Fix spacing

* qr codes!

* put your challenges first

* eslint

* Changes to contract buttons and create challenge modal

* Change titles around for current bet

* Add back in contract title after winning

* Cleanup

* Add challenge enabled flag

* Spacing of switch button

* market share row

* Add lite market endpoint

* 500 mana email (#687)

* Create 500-mana.html

* Update 500-mana.html

Fixed typos and links not working

* Added "create a good market" guide

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

* Update 500-mana.html

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

* email changes

* sendOneWeekBonusEmail logic

* add dayjs as dependency

* don't use mailgun scheduling

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

* Challenge Bets (#679)

* Challenge bets

* Store avatar url

* Fix before and after probs

* Check balance before creation

* Calculate winning shares

* pretty

* Change winning value

* Set shares to equal each other

* Fix share challenge link

* pretty

* remove lib refs

* Probability of bet is set to market

* Remove peer pill

* Cleanup

* Button on contract page

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

* challenge button (WIP)

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

* Opengraph preview [WIP]

* elim lib

* Edit og card props

* Change challenge text

* New card gen attempt

* Get challenge on server

* challenge button styling

* Use env domain

* Remove other window ref

* Use challenge creator as avatar

* Remove user name

* Remove s from property, replace prob with outcome

* challenge form

* share text

* Add in challenge parts to template and url

* Challenge url params optional

* Add challenge params to parse request

* Parse please

* Don't remove prob

* Challenge card styling

* Challenge card styling

* Challenge card styling

* Challenge card styling

* Challenge card styling

* Challenge card styling

* Challenge card styling

* Challenge card styling

* Add to readme about how to dev og-image

* Add emojis

* button: gradient background, 2xl size

* beautify accept bet screen

* update question button

* Add separate challenge template

* Accepted challenge sharing card, fix accept bet call

* accept challenge button

* challenge winner page

* create challenge screen

* Your outcome/cost=> acceptorOutcome/cost

* New create challenge panel

* Fix main merge

* Add challenge slug to bet and filter by it

* Center title

* Add helper text

* Add FAQ section

* Lint

* Columnize the user areas in preview link too

* Absolutely position

* Spacing

* Orientation

* Restyle challenges list, cache contract name

* Make copying easy on mobile

* Link spacing

* Fix spacing

* qr codes!

* put your challenges first

* eslint

* Changes to contract buttons and create challenge modal

* Change titles around for current bet

* Add back in contract title after winning

* Cleanup

* Add challenge enabled flag

* Spacing of switch button

* Put sharing qr code  in modal

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

* See challenges you've accepted too

* Remove max height

* Notify mentioned users on market publish (#683)

* Add function to parse at mentions

* Notify mentioned users on market create

- refactor createNotification to accept list of recipients' ids

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

* Switch comments/chat to rich text editor

* Remove TruncatedComment

* Re-add submit on enter

* Insert at mention on reply

* Update editor style for send button

* only submit on enter in chat

* code review: refactor

* use more specific type for upload

* fix ESlint and errors from merge

* fix trigger on every render eslint warning

* Notify people mentioned in comment

* fix type errors

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

This reverts commit f52da72115.

* merge conflict

* share modal

* merge issue

* eslint

* bigger link icion

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

* Remove TruncatedComment

* Re-add submit on enter

* Insert at mention on reply

* Update editor style for send button

* only submit on enter in chat

* code review: refactor

* use more specific type for upload

* fix ESlint and errors from merge

* fix trigger on every render eslint warning

* Notify people mentioned in comment

* fix type errors
2022-08-04 16:34:04 -07:00
Ian Philips
912ccad530 Remove max height 2022-08-04 16:09:33 -06:00
Ian Philips
c93f9c5483 See challenges you've accepted too 2022-08-04 15:58:48 -06:00
Ian Philips
798253f887
Challenge Bets (#679)
* Challenge bets

* Store avatar url

* Fix before and after probs

* Check balance before creation

* Calculate winning shares

* pretty

* Change winning value

* Set shares to equal each other

* Fix share challenge link

* pretty

* remove lib refs

* Probability of bet is set to market

* Remove peer pill

* Cleanup

* Button on contract page

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

* challenge button (WIP)

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

* Opengraph preview [WIP]

* elim lib

* Edit og card props

* Change challenge text

* New card gen attempt

* Get challenge on server

* challenge button styling

* Use env domain

* Remove other window ref

* Use challenge creator as avatar

* Remove user name

* Remove s from property, replace prob with outcome

* challenge form

* share text

* Add in challenge parts to template and url

* Challenge url params optional

* Add challenge params to parse request

* Parse please

* Don't remove prob

* Challenge card styling

* Challenge card styling

* Challenge card styling

* Challenge card styling

* Challenge card styling

* Challenge card styling

* Challenge card styling

* Challenge card styling

* Add to readme about how to dev og-image

* Add emojis

* button: gradient background, 2xl size

* beautify accept bet screen

* update question button

* Add separate challenge template

* Accepted challenge sharing card, fix accept bet call

* accept challenge button

* challenge winner page

* create challenge screen

* Your outcome/cost=> acceptorOutcome/cost

* New create challenge panel

* Fix main merge

* Add challenge slug to bet and filter by it

* Center title

* Add helper text

* Add FAQ section

* Lint

* Columnize the user areas in preview link too

* Absolutely position

* Spacing

* Orientation

* Restyle challenges list, cache contract name

* Make copying easy on mobile

* Link spacing

* Fix spacing

* qr codes!

* put your challenges first

* eslint

* Changes to contract buttons and create challenge modal

* Change titles around for current bet

* Add back in contract title after winning

* Cleanup

* Add challenge enabled flag

* Spacing of switch button

* Put sharing qr code  in modal

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

* Show chat bubble on nav with unseen notifs

* Spacing

* More spacing

* Remove chat tab

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

* Cleanup

* Scroll with updated height
2022-08-03 15:38:35 -06:00
James Grugett
a7d80d62cb Don't show cancel button for other people's limit orders 2022-08-03 14:30:59 -07:00
James Grugett
a761f8c65e Hide pills while searching 2022-08-03 14:17:45 -07:00
James Grugett
280308b625 Show # of bets equal to visible bets 2022-08-02 17:40:34 -07:00
James Grugett
b5d8acfef3 Switch profit in bets tab to match user page 2022-08-02 17:31:49 -07:00
Ian Philips
c24b4e77a8 Lint 2022-08-02 17:24:59 -06:00
Ian Philips
e700697423 Fix group referrals not working 2022-08-02 17:18:08 -06:00
mantikoros
6563082746 move claim button 2022-08-02 15:22:53 -07:00
mantikoros
5e8b9711dc hide pagination if only one page 2022-08-02 15:22:53 -07:00
mantikoros
96c0876053 manalinks: fix focus 2022-08-02 15:22:53 -07:00
mantikoros
164d9ef079 manalinks: mention referral bonus 2022-08-02 15:22:53 -07:00
Austin Chen
53d89fa4ac Show the value to 2 decimal places on hover 2022-08-02 14:59:47 -07:00
Marshall Polaris
b83caf4dd9 Just make me endpoint forward the backend response 2022-08-02 00:21:51 -07:00
Keri Warr
cfeb50826c
Add endpoint for reading currently authenticated user (#710) 2022-08-02 00:06:23 -07:00
Ian Philips
0b06ded5e5
Groups contracts (#709)
* Update group links in trigger and api

* Remove extra call during creation

* Remove grouplinks on frontend

* Deserialize

* Consolidate logic

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

* Cleanup

* Only query when necessary

* Read and update url params for query and sort

* Don't push router

* Don't update url if using default sort

* Add popstate listener to improve home navigation

* Remove console.logs
2022-07-29 19:08:51 -05:00
mantikoros
079a2a3936 eslint 2022-07-29 16:06:22 -07:00
mantikoros
5812d8ed2e manalink qr code 2022-07-29 16:02:18 -07:00
mantikoros
779b6dfc0c manalink referrals 2022-07-29 15:09:48 -07:00
mantikoros
bdea739c55 multiple choice contract card 2022-07-29 09:20:49 -07:00
Austin Chen
693eb96d23 Include groupId when duplicating markets 2022-07-29 09:20:01 -07:00
mantikoros
ada3f0787c create: add bottom margin 2022-07-28 11:44:07 -07:00
Ian Philips
d3da6de5dd Groups default open 2022-07-28 11:37:26 -07:00
marsteralex
aa6d0d1750
add beasts (#700)
* fix https

* add beasts

* Remove extra file

* Prettier-ify code

* Prettier-ify

Co-authored-by: Austin Chen <akrolsmir@gmail.com>
2022-07-28 11:31:58 -07:00
Ian Philips
05b0ca5cdb I want to see others' referrals 2022-07-28 11:16:48 -07:00
mantikoros
b6a70641a0 fix modal 2022-07-27 19:51:34 -07:00
mantikoros
1aaae93113
Multiple choice markets (#698)
* multipe choice answers

* create multiple choice cloud function

* multi choice market page

* show outcome '0'

* stats: multi choice type

* update place bet

* answer doc id = outcome

* update resolve market

* prettier

* fix

* fix resolution
2022-07-27 21:40:33 -05:00
James Grugett
b1c4f018f9 Expose cancel bet api 2022-07-27 17:38:25 -07:00
Ian Philips
013ff1d941 Show api error on create contract 2022-07-26 16:44:51 -07:00
Ian Philips
f32e995baa Show referrals banner on user-page 2022-07-26 15:24:16 -07:00
Marshall Polaris
b506e96548
Implement "sell all shares" functionality in sellshares and expose API (#696)
* Change `sellshares` to be able to sell all shares

* Sell all shares properly on bet panel UI

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

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

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

* Remove fishy unused href property from tabs

* Remove tab ID property

* Clean up crufty markup in tabs component

* Fix naming to be right (thanks James!)
2022-07-25 13:27:09 -07:00
TrueMilli
e4f8c14fab
Image compression (#689)
* added image compression

* removed TODO
2022-07-25 12:51:51 -07:00
mantikoros
d8f96876a0 PlayMoneyDisclaimer copy; hide order book for signed out users 2022-07-25 12:29:29 -07:00
mantikoros
d82c7d7f3e “added liquidity” ⇒ “added a subsidy” 2022-07-25 12:22:38 -07:00
mantikoros
d982d0332c play money wording 2022-07-24 23:38:57 -07:00
mantikoros
df91310d0f PlayMoneyDisclaimer; hide limit orders for signed out users; infobox styling 2022-07-24 23:28:05 -07:00
mantikoros
e389f4cc3b referrals text 2022-07-24 22:50:33 -07:00
Marshall Polaris
a1d5d161dd
Revamp backend code to support good local function development (#657)
* Move concurrently dep upwards

* Add express as explicit dependency

* Accept just one HTTP method per endpoint

* Fix endpoint option coalescing

* Expressification of cloud functions

* Nicer logging of API requests

* Refactor web package.json

* Add ts-node and nodemon to dev dependencies, bring back cors

* Add scaffolding to point dev server at local functions

* Enable emulator in dev server scaffolding

* Fix up a little stuff I broke
2022-07-24 00:26:38 -07:00
Austin Chen
6ad43b02c7 Show the number of comments and bets 2022-07-24 00:11:35 -07:00
Sinclair Chen
6c89e5f18f
Add @ mentions to editor (#670)
* Add @ mentions to editor

* Fix mention list not loading

* Sort mention list by prefix, follow count

* Render at mention with Linkify component

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

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

* No nested queries :(

* Fix filter

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

* remove lib

* Fix Sinclair's relative import from May

* Clean
2022-07-22 11:34:10 -06:00
mantikoros
163c990e9d "bettors" => "traders" 2022-07-22 12:03:33 -05:00
mantikoros
c3a0326b1e homepage seo 2022-07-22 12:01:52 -05:00
mantikoros
e13f4d3d4d charity description 2022-07-22 11:59:25 -05:00
mantikoros
2c80133856 add SEO tags to everything 2022-07-22 11:56:03 -05:00
mantikoros
de53a13c84 fix referrals seo 2022-07-22 11:25:48 -05:00
mantikoros
624df76393 search: sort by liquidity; remove oldest 2022-07-22 11:24:25 -05:00
Austin Chen
7cace82b83
Render iframes inside the rich text editor (#682)
* Try embedding iframes in tiptap

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

* Code cleanups and comments

* Remove clsx dependency

Cuz it doesn't exist in `common` anyways

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

* Make sidebar logout button trigger SSR reload

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

* Conditionally show YES or NO max payout

* Range bet executes both bets immediately.

* Validate lowLimitProb < highLimitProb

* Show error if low limit is higher than high limit

* Update range order UI

* Revert "Validate lowLimitProb < highLimitProb"

This reverts commit c261fc2743.

* Revert "Range bet executes both bets immediately."

This reverts commit 30b95d75d9.

* Buy panel only non-limit orders

* Bet choice => outcome

* More iterating on range UI

* betChoice => outcome

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

* text color

* eslint

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

* Remove bet button from free response comments

* Make answer replies more closely spaced together

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

* Copy over code from Mtg Guesser

* Run Prettier

* CSS Tweaks: Hover feedback, button positioning

* Hide all but counterspell & burn, for now

* Move to /mtg directory

* Fix prettierignore

* smaller jsons (#673)

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

* Add Ida's tweak to card position

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

* Adjust card positioning

* Make the select screen index.html

* Remove other guessing games

* Remove alternate versions; add Alex's email

* Remove unused jsons

* Small FR comments tweaks

* Spacing tweak

* Changing manalinks table UI (#665)

From table to card view

* Fix comment spacing on non-FR

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

* Move leaderboards up in mobile nav

* eslint

* prettier

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

* Remove unnecessary new user creation promise machinery

* Slight refactoring to auth context code

* Improvements in response to James feedback
2022-07-21 00:38:26 -07:00
James Grugett
8aa360c853 Move leaderboards up in mobile nav 2022-07-21 00:52:11 -05:00
James Grugett
21c08aed30 Move "Send M$" lower in sidebar More list. 2022-07-21 00:50:28 -05:00
James Grugett
2ad7266283 Fix comment spacing on non-FR 2022-07-21 00:46:57 -05:00
ingawei
7a041fd753
Changing manalinks table UI (#665)
From table to card view
2022-07-21 00:45:53 -05:00
James Grugett
f7151f131d Spacing tweak 2022-07-20 22:37:43 -05:00
James Grugett
8f5e51a304 Small FR comments tweaks 2022-07-20 22:13:37 -05:00
Austin Chen
aba818a9de Remove unused jsons 2022-07-20 18:05:41 -07:00
Austin Chen
260f4641dd Remove alternate versions; add Alex's email 2022-07-20 18:04:54 -07:00
Austin Chen
edee910e2d Remove other guessing games 2022-07-20 18:00:18 -07:00
Austin Chen
6b5b9b42f5 Make the select screen index.html 2022-07-20 17:14:49 -07:00
Austin Chen
c3b825cc44 Adjust card positioning 2022-07-20 16:59:40 -07:00
Austin Chen
a3f150b1d9
Host Ida and Alex's MTG Guesser game (#656)
* Copy over code from Mtg Guesser

* Run Prettier

* CSS Tweaks: Hover feedback, button positioning

* Hide all but counterspell & burn, for now

* Move to /mtg directory

* Fix prettierignore

* smaller jsons (#673)

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

* Add Ida's tweak to card position

Co-authored-by: marsteralex <bob.masteralex@gmail.com>
2022-07-20 16:57:51 -07:00
James Grugett
528dd2b28a Make answer replies more closely spaced together 2022-07-20 18:35:09 -05:00
James Grugett
5ddf496dae Remove bet button from free response comments 2022-07-20 18:35:09 -05:00
Sinclair Chen
aa554ca9f6
migrate useUsers hook to react-query (#674) 2022-07-20 16:31:18 -07:00
Marshall Polaris
ace39ef73d
Update Next.js 12.1.2 -> 12.2.0 (#669)
* Update Next.js 12.1.2 -> 12.2.0

* Further bump Next to 12.2.2
2022-07-20 15:42:31 -07:00
mantikoros
49dcd97d70 feed bets: better prob display 2022-07-20 17:04:11 -05:00
mantikoros
75a1d606cb feed bets: show change in prob 2022-07-20 16:28:25 -05:00
mantikoros
302a635542 group page max width 2022-07-20 16:06:31 -05:00
James Grugett
c35d0a8bc6 Split out "Your bets" from "For you" 2022-07-20 15:30:07 -05:00
James Grugett
44afa92b58 Turn off for you by default 2022-07-20 15:05:48 -05:00
James Grugett
e45d81513c Don't filter by personal unless pills enabled 2022-07-20 14:49:16 -05:00
Sinclair Chen
0870397fea Show line in menu on mobile 2022-07-20 12:36:23 -07:00
Sinclair Chen
202132868f lint and prettier 2022-07-20 12:35:04 -07:00
mantikoros
d65a60984d make group invite link more prominent 2022-07-20 11:45:53 -05:00
mantikoros
45b883477d generic copy link button 2022-07-20 11:42:49 -05:00
mantikoros
b60892fada group 'rankings' => 'leaderboards' (friendlier, more consistent terminology) 2022-07-20 11:15:55 -05:00
Marshall Polaris
c8361f1748
Make it so that if you sign in on / you get redirected to /home (#672) 2022-07-20 01:59:14 -07:00
mantikoros
b517f7cfa7 eslint; remove unused tags import 2022-07-20 00:35:27 -05:00
mantikoros
2b13085dff search: use default categories for non-authed users 2022-07-20 00:23:00 -05:00
mantikoros
0013f76873 search defaults to 'for you'; hide pills for additional filters 2022-07-20 00:03:03 -05:00
mantikoros
83e9408d69 remove tags from info panel 2022-07-19 23:48:09 -05:00
Marshall Polaris
bacd546e5d Fix unused import from Ian's code 2022-07-19 20:10:54 -07:00
Marshall Polaris
61094ea17d
Properly handle expired ID token cookie, be robust to errors (#671) 2022-07-19 20:08:33 -07:00
James Grugett
b2c89d36cf Home: Show pills that are groups (in addition to All, For you) 2022-07-19 18:23:52 -05:00
mantikoros
b48e910f70 fix areaBaselineValue 2022-07-19 18:20:03 -05:00
mantikoros
bab828412b group: add question button 2022-07-19 18:16:03 -05:00
Ian Philips
4aface583d Remove pesky loading spinner 2022-07-19 16:41:11 -06:00
Ian Philips
2152e5286a Score & sort by unique bettors in last 3 days 2022-07-19 16:29:41 -06:00
James Grugett
58d6286361 Fix chart area extending into labels below 2022-07-19 17:22:58 -05:00
James Grugett
6124ea01f6 Fix a DOM error in console 2022-07-19 16:57:32 -05:00
Marshall Polaris
6d3490cd68
Turn off Next.js font inlining (#668) 2022-07-19 14:20:23 -07:00
James Grugett
af6552958f Show all-time profit on UserPage 2022-07-19 16:05:50 -05:00
Marshall Polaris
f9aab39039
Clean up font loading and see if it fixes our problem (#667) 2022-07-19 13:57:32 -07:00
James Grugett
fc9e261601 Fix build 2022-07-19 15:45:47 -05:00
James Grugett
e9ad30cc74 Increase number of contracts shown in bets list 2022-07-19 15:43:37 -05:00
James Grugett
2684c8bcca Default to weekly leaderboard 2022-07-19 15:39:40 -05:00
James Grugett
6c070464dd Use static props to load leaderboard fast 2022-07-19 15:39:17 -05:00
Ian Philips
b5ef7490c3 NotificationSettings to its own file 2022-07-19 14:24:36 -06:00
Ian Philips
6dcad6225b Next/Previous => Older/Newer 2022-07-19 14:16:20 -06:00
James Grugett
b6c8390a46 Show order book button even on Quick bet 2022-07-19 15:01:15 -05:00
Ian Philips
a1e03c3a25 Allow opening notifs in new tabs, return newest notifs 2022-07-19 13:58:51 -06:00
James Grugett
74760b1062 Reorder orderbook columns 2022-07-19 14:53:33 -05:00
Marshall Polaris
61cbb07bd5
Fix some broken stuff on the homepage contract search routing (#664)
* Use Next router more appropriately

* Replace instead of push when modifying search query params
2022-07-19 12:33:53 -07:00
mantikoros
12567074cc fix log scale graph 2022-07-19 12:31:26 -05:00
Marshall Polaris
0d282a962c
Don't setQuery on group selector component during initial render (#660) 2022-07-19 09:35:43 -06:00
Ian Philips
a203f43142 Cache all notifs 2022-07-19 09:29:12 -06:00
Ian Philips
c236eb15b1
Cache notifs in local, gives instant load of old notifs (#662)
* Cache notifs in local, gives instant load of old notifs

* Small refactor, add ss auth

* unused vars

* Add back in replaceAll

* Save all notifs

* Memoize paginated notifs

* Replace all => replace with regexp
2022-07-19 09:04:47 -06:00
Austin Chen
2bae7dc200 Fix error on no portfolio history 2022-07-19 02:54:05 -07:00
Marshall Polaris
55775d9d37 Also handle case where there are no cookies yet 2022-07-19 01:35:34 -07:00
Marshall Polaris
c256e9c0cc Attempt to fix up overly sensitive cookie parsing 2022-07-19 01:33:00 -07:00
Austin Chen
f6d2c56e43 Fix /create 2022-07-19 01:23:36 -07:00
Marshall Polaris
a103a2ee2c
Initial draft of Vercel Firebase auth (#593)
* Set a cookie with an up-to-date Firebase ID token

* Implement server-side authentication cookie reading logic

* Change index page to redirect for authed users

* No branch necessary for logged in users on index page

* Add helpers for creating server-side redirects

* Add some common sense redirects
2022-07-19 00:50:11 -07:00
Austin Chen
d1ad0716c8 Fix import 2022-07-19 00:34:53 -07:00
Austin Chen
b501776e33 Remove quadratic matching from /charity 2022-07-19 00:20:18 -07:00
mantikoros
8793288dc8 contract description: less prominent edit buttons 2022-07-18 19:17:45 -05:00
Marshall Polaris
f2a7a145e4
Add React key prop to homepage filter widget (#661) 2022-07-18 18:37:46 -05:00
James Grugett
61a21d34b2 Order limit bets in sorted order on mobile 2022-07-18 18:19:30 -05:00
Austin Chen
47a27bf3fe
Label "Since June" for users who had an account prior to 2022-06-20 (#659) 2022-07-18 15:55:17 -07:00
Sinclair Chen
781de79b97 Make description text style more consistent
- links and blockquotes have light font weight, like other text
- font size in editor matches font size in description
- old descriptions have same style as new
- placeholder text matches editor style
- decrease line-height a bit
2022-07-18 14:03:05 -07:00
Ian Philips
e2a72dd0a2 Fix /create date input 2022-07-18 15:01:50 -06:00
mantikoros
65e4f24531 groups: only change layout if sidebar chat, smaller leave button 2022-07-18 12:55:49 -05:00
Ian Philips
39c38a669e Referrals bug fix and attribute group 2022-07-18 10:40:44 -06:00
Ian Philips
db537a97ba Allow click on group card avatar 2022-07-18 08:35:59 -06: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
Ian Philips
a247e6d0de Default to created time if no chat activity 2022-07-18 07:38:02 -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
mantikoros
07bfdadd25 remove OnlineUserList b/c of responsiveness issues 2022-07-17 14:40:21 -05:00
James Grugett
c1d77f48e3 Fix tag filter 2022-07-16 18:56:21 -05:00
James Grugett
1edc1993e1 Cache follows in localstorage 2022-07-16 14:58:25 -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
Ian Philips
eed7990c3c Lighten unseen notifs 2022-07-15 16:57:58 -06:00
Sinclair Chen
2543bdcdfc
refactor string matching (#649) 2022-07-15 14:16:00 -07:00
Marshall Polaris
38c26f8b5c
Add API endpoints for fetching user info by username and ID (#652)
* Add an API endpoint for fetching user info by username

* Add endpoint for querying users by ID, too

* Add very simple docs about user APIs
2022-07-15 14:03:34 -07:00
James Grugett
feba0b58ee Turn search filters into pills 2022-07-15 15:06:33 -05:00
Ian Philips
a6cbb6b759 Small notifications ux improvements 2022-07-15 11:53:30 -06: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
47579e8509 Fix network spam with modified deps array 2022-07-15 07:28:04 -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
James Grugett
be64bf71a7 Limit the amount of bets and comments sent to the client through getStaticProps 2022-07-14 14:57:17 -05:00
Ian Philips
d9279e42cc Don't collapse/expand notifs with ctrl/cmd click 2022-07-14 11:56:40 -06:00
Ian Philips
6a28643215 Notifications ux 2022-07-14 11:48:04 -06:00
Ian Philips
27a544205f Optimistically join groups 2022-07-14 11:09:28 -06:00
James Grugett
8daf1b2ba8 Return undefined instead of null for useUserById(undefined) 2022-07-14 12:03:29 -05:00
Sinclair Chen
a93e64c830
fix: let useUserById accept undefined userId (#648) 2022-07-14 12:02:46 -05:00
James Grugett
0c328bc398 Move getStorage() into init.ts after initializeApp() is called. 2022-07-14 11:44:52 -05:00
Ian Philips
4eba3c8124 Try new way of calculating rankings for large groups 2022-07-14 09:09:12 -06:00
Ian Philips
709ce5377a Remove extra key assignment 2022-07-14 07:57:33 -06:00
Ian Philips
ee01328553 Remove group slugs from contracts on delete group 2022-07-14 07:53:41 -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
45fb3803c1 Limit member search to 100 2022-07-13 16:24:35 -06:00
mantikoros
e1b6619e9c embeds: don't show bet button after resolution 2022-07-13 17:22:50 -05:00
Ian Philips
7a49549389 Ignore rankings/members for huge groups for now 2022-07-13 16:20:56 -06:00
Sinclair Chen
f08d6bda93
when adding package, don't put ^ before version (#645) 2022-07-13 15:14:06 -07: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
Ian Philips
96a378f25f Handle free response resolution 2022-07-13 07:41:58 -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
Ian Philips
7b60cc63ce Fix annoying create description scrolling on firefox 2022-07-11 09:56:10 -06: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
Ian Philips
52d688885d Group income notifs by source title 2022-07-11 08:11:52 -06:00
Ian Philips
86c256cbf7 Unused var 2022-07-11 08:01:26 -06:00
Ian Philips
a2a08b90ff Show numeric resolution contract value 2022-07-11 07:51:48 -06: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
67edc7b639 UserPage: Load user with getStatic props 2022-07-10 19:42:34 -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