Commit Graph

313 Commits

Author SHA1 Message Date
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
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
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
d56435b9cd Signed out home page shows dynamic trending markets 2022-08-15 19:34:45 -06: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
Marshall Polaris
0f7f55ec0a Fix embarrassing bug in server auth 2022-08-12 20:14:24 -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
Marshall Polaris
e2eae01ad8
Add a shitload of logging to the server auth code (#749) 2022-08-11 20:46:18 -07: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
Marshall Polaris
521c479abf Fix an embarrassing bug in getPrivateUser 2022-08-09 23:55:41 -07: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
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
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
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
c93f9c5483 See challenges you've accepted too 2022-08-04 15:58:48 -06:00