Commit Graph

208 Commits

Author SHA1 Message Date
ingawei
5ba4a9dce7
Inga/tip button (#1043)
* added tip jar
* made market actions/comments and manalink buttons IconButtons
2022-10-13 01:53:26 -05:00
James Grugett
789bec2a4f Expand replies by default (quick fix for comment links not working) 2022-10-12 17:49:04 -05:00
Marshall Polaris
c44f223064
Fix some hydration issues (#1033)
* Extract `useIsClient` hook

* Fix a bunch of hydration bugs relevant to the contract page
2022-10-12 14:07:07 -07:00
ingawei
1d618ba337
Inga/fr remove double comments (#1019)
incorporating answer comments into general comments section
2022-10-12 13:05:58 -05:00
Sinclair Chen
3cdd790ae9
Autosave post, market, comment rich text (#1015)
* Fix freezing when typing big docs

* Make rich text fields autosave to localstorage

* Add autosave for comments

* delete vestigial text editor from challenges

* Clear autosave on submit post/market/comment

* lint
2022-10-11 12:52:27 -07:00
James Grugett
b57ff68654 Fix highlight & scroll to comment 2022-10-07 14:40:38 -05:00
James Grugett
9d12fa3af0 Limit order trade log: '/' to 'of'. Remove 'of' in 'of YES'. 2022-10-06 18:03:44 -05:00
Marshall Polaris
a9d5dd7fc8
Memoize FeedBet component (#999) 2022-10-04 23:17:09 -07:00
Marshall Polaris
ddb186dd98
Change Tipper interface, memoize FeedComment (#1000)
* Change `Tipper` interface, memoize `FeedComment`

* Fixup per James feedback

* More fixup per James feedback
2022-10-04 23:16:56 -07:00
mantikoros
cb613705e9
Consistent tips (#984)
* consistent tip button

* hide tips for self

* prettier
2022-10-01 15:51:08 -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
Marshall Polaris
a1c3d0a2dd
Fix up comment permalink stuff (#915)
* Eliminate needless state/effects to highlight comments

* Scroll to comment on render if highlighted
2022-09-22 12:58:40 -07:00
Marshall Polaris
6ee8d90bdb
Eliminate redundant showReply/replyTo state (#917) 2022-09-22 12:40:44 -07:00
Marshall Polaris
6e2aa622ab
Refactor, improve efficiency of contract tabs stuff (#909)
* Move comments and tips fetching down into comments tab rendering

* Consolidate `contract-activity.tsx` into `contract-tabs.tsx`

* Move LP fetching into bets tab
2022-09-20 21:02:17 -07:00
Marshall Polaris
8870f0d356
Don't always require tips to render comments (#898) 2022-09-20 15:58:47 -07: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
Marshall Polaris
faaf502114
Remove old check in free answer comment rendering (#906) 2022-09-20 14:11:26 -07:00
Marshall Polaris
a2d9e8e3d2
Cleanup free answer comment stuff (#897)
* Remove unused most-recent-bet-time stuff

* Remove strange reply box hiding behavior

* Tidying markup
2022-09-20 14:03:33 -07:00
Marshall Polaris
bfe00595e7
Make comments with bet outcome but no answer outcome appear (#894) 2022-09-19 00:53:10 -07:00
Marshall Polaris
a9e5020904
Render free response comment threads more simply without bets (#893) 2022-09-18 19:16:48 -07:00
Marshall Polaris
58dcbaaf6e
Precalculate and store current positions for users who make comments (#878) 2022-09-18 15:57:50 -07:00
mantikoros
44f9a1faa2 fix labels 2022-09-17 19:12:44 -05:00
mantikoros
f71791bdd5 fix labels 2022-09-17 19:10:34 -05:00
Marshall Polaris
b903183fff
Paginate contract bets tab (#881)
* Apply pagination to bets list on contract

* Make contract trades tab number actually match number of entries
2022-09-15 13:47:07 -07:00
Ian Philips
e9f136a653 Single source of truth for predict 2022-09-15 09:12:56 -06:00
Marshall Polaris
7144e57c93
Denormalize user display fields onto bets (#853)
* Denormalize user display fields onto bets

* Make bet denormalization script fast enough to run it on prod

* Make `placeBet`/`sellShares` immediately post denormalized info
2022-09-14 01:33:59 -07:00
Marshall Polaris
1ebb505752
Fix liquidity feed display to look right (#877) 2022-09-14 01:13:53 -07:00
mantikoros
273b815e54 hide house liquidity on feed 2022-09-14 00:51:43 -05:00
mantikoros
3d3caa7a42 remove comment bet area 2022-09-12 16:50:38 -05:00
Austin Chen
4c801f76b4
Submit comments on ctrl/cmd-enter (#830)
* Submit comments on ctrl/cmd-enter

* Remove unused import

* Tweak padding on /tournaments

* Always submit on ctrl+enter

Since we took out group chats, this should be fine for all comments
2022-09-09 11:09:31 -07: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
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
Marshall Polaris
4c429cd519
Remove some old code related to the old feed (#843) 2022-09-02 12:51:14 -07:00
Marshall Polaris
27b46f4306 Fix order of comments in threads and under answers 2022-08-31 01:16:57 -07: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
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
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
mantikoros
03e07037ea
ban users from posting (#810) 2022-08-28 00:23:25 -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
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
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
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
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
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
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
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