Commit Graph

332 Commits

Author SHA1 Message Date
FRC
ff6278b147
Featured items to homepage (#1024)
* Featured items to homepage

* Fix nits
2022-10-12 15:04:39 +01:00
James Grugett
70b2b14f80
Daily profit 💰 (#1023)
* Daily profit client side

* Filter out those where profit rounds to 0

* Tabs to spaces
2022-10-11 00:32:55 -05:00
mantikoros
0ec15ff2f8
Make liquidity great again (#1020)
* add subsidy

* drizzle liquidity

* update liquidity panel

* remove addliquidity

* update cloud functions index

* remove json endpoints

* imports

* drizzle liquidity: add velocity; dev script; run every minute

* adjust speed

* logging

* liquidity button, dialog

* modal size

* modal

* info table

* pay back excess liquidity

* remove client withdrawal

* house liquidity subsidy

* disable liquidity button if market resolved or closed

* format tip amount
2022-10-10 21:56:16 -05:00
James Grugett
8f56ccad22 Set limits on bets and contracts loaded for portfolio page. Show warning if limit is hit 2022-10-07 11:55:47 -05:00
James Grugett
b1d386ca5a Listen for date doc changes 2022-10-06 18:54:22 -05:00
Ian Philips
25ef17498a Update groupContracts in db trigger 2022-10-06 09:26:35 -04:00
mantikoros
10f0bbc63d tournaments: included resolved markets 2022-10-05 15:46:20 -05:00
Ian Philips
a90b765670
Bounty comments (#944)
* Adding, awarding, and sorting by bounties

* Add notification for bounty award as tip

* Fix merge

* Wording

* Allow adding in batches of m250

* import

* imports

* Style tabs

* Refund unused bounties

* Show curreantly available, reset open to 0

* Refactor

* Rerun check prs

* reset yarn.lock

* Revert "reset yarn.lock"

This reverts commit 4606984276.

* undo yarn.lock changes

* Track comment bounties
2022-09-30 09:27:42 -06:00
James Grugett
d55cedb36c Load comments via static props 2022-09-28 13:11:26 -04:00
James Grugett
b21daa1248
Date docs on Manifold (#941)
* Date docs

* Create date doc

* Create and show a date market as well

* Move url to date-docs

* Date doc individual page

* Add share button

* Edit date docs

* Layout

* Add comments for create-post

* Add comments and back nav

* Fix urls

* Tweaks
2022-09-27 17:30:07 -05:00
James Grugett
0ab82a7bd4 Delete some unused code 2022-09-23 15:40:48 -04:00
FRC
5a10132e2b
Add a "Posts" tab to groups (#926)
* Add a "Posts" sidebar item to groups

* Fix James's nits

* Show "Add Post" button only to users
2022-09-23 15:11:50 -04:00
James Grugett
c6d034545a
Home: Prob change cards. Sort by daily score. (#925)
* Add dailyScore: product of unique bettors (3 days) and probChanges.day

* Increase memory and duration of scoreContracts

* Home: Smaller prob change card for groups. Use dailyScore for sort order (algolia)

* Add back hover
2022-09-22 16:57:48 -05:00
Marshall Polaris
60c79141aa
Move comment-bet association code into comment creation trigger (#899)
* Move comment-bet association code into comment creation trigger

* Add index for new comments query
2022-09-20 15:25:58 -07:00
James Grugett
25ee793208
🏠 New home (#889)
* Factor out section header

* Remove daily balance change

* Remove dead code

* Layout, add streak

* Fix visibility observer to work on server

* Tweak

* Search perserved by url

* Add pill query param

* Add search page

* Extract component for ProbChangeRow

* Explore groups page

* Add search row

* Add trending groups section

* Add unfollow option for group

* Experimental home: accommodate old saved sections.

* Tweaks to search layout

* Rearrange layout

* Daily movers page

* Add streak grayed out indicator

* Use firebase query instead of algolia search for groups

* Replace trending group card with pills

* Hide streak if you turned off that notification

* Listen for group updates

* Better UI for adding / removing groups

* Toast feedback for join/leave group. Customize button moved to bottom.

* Remove Home title

* Refactor arrange home

* Add new for you section

* Add prefetch

* Move home out of experimental!

* Remove unused import

* Show non-public markets from group
2022-09-16 16:12:24 -05:00
FRC
ff81b859d1
"Fix "500 internal error" in large groups (#872)
* Fix "500 internal error" in large groups (#856)

This reverts commit 28f0c6b1f8.

* Ship without touching prod and with some logs.
2022-09-12 20:54:11 +01:00
FRC
28f0c6b1f8
Revert "Fix "500 internal error" in large groups (#856)" (#871)
This reverts commit a6ed8c9228.
2022-09-12 17:26:46 +01:00
FRC
a6ed8c9228
Fix "500 internal error" in large groups (#856)
* Members to memberIds

* Moved to update-metrics
2022-09-12 16:44:24 +01:00
James Grugett
54c227cf6c
Updates to experimental home (#858)
* Line clamp question in prob change table

* Tweaks

* Expand option for daily movers

* Snap scrolling for carousel

* Add arrows to section headers

* Remove carousel from experimental/home

* React querify fetching your groups

* Edit home is its own page

* Add daily profit and balance

* Merge branch 'main' into new-home

* Make experimental search by your followed groups/creators

* Just submit, allow xs on pills

* Weigh in

* Use next/future/image component to optimize avatar images

* Inga/challenge icon (#857)

* changed challenge icon to custom icon
* fixed tip button alignment

* weighing in and trading "weigh in" for "trade"

Co-authored-by: Ian Philips <iansphilips@gmail.com>
Co-authored-by: Austin Chen <akrolsmir@gmail.com>
Co-authored-by: ingawei <46611122+ingawei@users.noreply.github.com>
Co-authored-by: mantikoros <sgrugett@gmail.com>
2022-09-08 01:36:34 -05:00
FRC
0acdec787d
Adds comments to posts (#844)
* Adds comments to posts

* Uncoupled CommentInput from Contracts

* Fix nits
2022-09-07 23:09:20 +01:00
Ian Philips
87060488f5 Convert market to lite market for Phil 2022-09-07 07:13:34 -06:00
Ian Philips
5af92a7d81 Update groups API 2022-09-06 09:24:26 -06:00
FRC
59f3936dad
Fix bug (#854) 2022-09-06 14:17:21 +01:00
James Grugett
cd8bb72f94 Daily movers table in experimental/home 2022-09-05 18:09:03 -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
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
Marshall Polaris
21b9d0efab
Clean up some old pre-Amplitude tracking code (#841) 2022-09-02 12:51:27 -07:00
Marshall Polaris
4406e53121
Make prefetching correctly use context cache (#835) 2022-09-01 19:38:09 -07:00
Ian Philips
c6eac97b64 Show group based on most recent creator added group 2022-09-01 08:29:56 -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
Ian Philips
26aba26da5
force long polling (#824) 2022-08-31 15:38:55 -06: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
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
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
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
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
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
James Grugett
cb08a114ae Better recommended contracts. Include from first group. 2022-08-27 22:26:39 -05: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
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
James Grugett
1c323c5a7f Simple recommended contracts based on contract creator 2022-08-24 12:59:23 -05: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
mantikoros
3313b55853 listAllContracts: sort by createdTime by default 2022-08-22 14:23:52 -05:00
mantikoros
009c85b61a listAllContracts: order by popularity score 2022-08-22 12:07:05 -05: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
Marshall Polaris
0972de9025
Make typing for comments more fancy (#776) 2022-08-19 01:06:40 -07:00