Commit Graph

53 Commits

Author SHA1 Message Date
James Grugett
7da46050e5
Swap home and explore (#244)
* Add activity page. Copy explore page into home

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

* Move category selector into contract search

* Make algolia filter by category

* Default tag page to all filter
2022-05-17 12:56:10 -05:00
James Grugett
19da0c6c82 Default to 'all' feed category when loading page. 2022-05-15 23:09:49 -04:00
Marshall Polaris
07ded756d9
Remove unused imports from random files (#224) 2022-05-13 18:30:52 -07:00
Marshall Polaris
33c0471c29
Clean up some markup around the top of the page (#189)
* Remove unnecessary wrapper div around sidebar

* Remove extra column used for alignment on homepage

* Remove extra wrapper div around whole page
2022-05-13 16:47:50 -07:00
mantikoros
9a4e5763f5
Categories (#132)
* basic market categories

* use tags to store market category

* display category in market

* display full category

* category selector component on feed

* Move feed data fetching to new file

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

* Compute and update category feeds!

* Show feeds based on category tabs

* Add react-query package!

* Use react query to cache contracts

* Remove 'other' category

* Add back personal / friends to feed categories

* Show scrollbar temporarily for categories

* Remove 5 categories, change geopolitics to world

* finance => economics

* Show categories on two lines on larger screens

Co-authored-by: James Grugett <jahooma@gmail.com>
2022-05-12 10:07:10 -05:00
Marshall Polaris
acc9c84e2e
More absolute imports (#156)
* Configure functions module to allow absolute imports

* Convert common imports in functions to be absolute

* Convert common imports in web to be absolute

* Convert lib imports in web to be absolute

* Convert hooks imports in web to be absolute

* Convert components imports in web to be absolute
2022-05-09 09:04:36 -04:00
James Grugett
06b7e49e98
[In progress] Server-side feed computation (#106)
* Store view counts & last viewed time

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

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

* Remove contract's lastUpdatedTime

* Remove folds activity feed

* Implement getFeed cloud function

* Hook up client to use getFeed

* Script to cache viewCounts and lastViewTime

* Batched wait all userRecommendations

* Cache view script runs on all users

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

* Delete view cache script

* Update feed script

* Tweak feed algorithm

* Compute recommendation scores from updateUserFeed

* Disable lastViewedScore factor

* Update lastCommentTime script

* Comment out console.log

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

* Listen for contract updates to feed.

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

* Track lastUpdatedTime

* Tweak logic of calling cloud functions in batches

* Tweak cloud function batching
2022-05-01 11:36:54 -05:00
James Grugett
4268e03293 Redirect to contract page if home loads initially with query params 2022-04-12 23:11:10 -05:00
James Grugett
e53cde5b34 Quick back navigation into feed 2022-04-11 16:13:26 -05:00
James Grugett
ec49a73c74
Algo feed (#77)
* Implement algo feed

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

* Fix problem with useUpdatedContracts.

* Tweak some params
2022-04-09 18:10:58 -05:00
James Grugett
20db898753 Home: remove tabs for Recent activity vs Explore 2022-04-04 00:27:25 -05:00
Austin Chen
34e7a27125
Standardize on a single Tabs component (#72)
* Extract out Tabs component

* Use tabs component on /home

* Use Tabs on Fold pages too
2022-03-30 23:24:35 -07:00
Austin Chen
e39f6d4125 Move fold items into folds/ 2022-03-17 00:56:25 -07:00
James Grugett
93287f8dc1
Answers in feed (#63)
* Compute answer group feed items

* Refactor feed code into 5 files under feed directory.

* Convert to typed ActivityItems

* Use feed "mode". Clean up cases.

* Implement feed answer groups!

* FR: Use nested comments/bets under answers for contract page. filter more items out of FR feed.

* Linkify answer text on activity feed

* Default feed excluded tags are case insensitive

* Show followed folds first

* Allow filtering your trades

* Store users's last sort in localstorage

* Use avatar of user that submitted answer and name instead of pencil icon. Spacing. Show up to 3 comments in asnwer group.

* Don't reveal market creator's bets

* Fix communites feed to be abbreviated

* Remove complicated answer group logic

Co-authored-by: Austin Chen <akrolsmir@gmail.com>
2022-03-14 15:29:32 -05:00
James Grugett
fe49ae4d5a Hide fast fold follow widget for now 2022-03-09 22:08:55 -06:00
Austin Chen
da4ce99755
Merge Manifold for Teams infra into main codebase (#61)
* Add dev target for TheoremOne

* Restrict signups to theoremone.co emails

* Add new indices

* Forbid reads from unauthenticated users

* Client-side render pages that need auth

These pages are now client-side rendered:
- /home
- /leaderboards
- /market/...
- /fold/...

* Hide 404 for private Manifolds

* Brand instance for TheoremOne

* Hide "Add Funds" and "Personalize your feed"

* "M$" =>  "T$"

* Hide Discord & About Page too

* Update placeholders for teams

* Update firestore.indexes.json

* Switch /analytics to propz

* Migrate per-env code into common/

* More migrations to PROJECT_ID

* Conditionally use SSG depending on public vs private instance

* Fix props to be empty object

* Move more logic into access

* Spin out config files for each environment

* Generify most of the customizable brand stuff

* Move IS_PRIVATE_MANIFOLD to access.ts

* Rename access.ts to envs/constants.ts

* Add "dev:dev" alias

* Rever firestore rules to existing settings

* Fixes according to James's review
2022-03-08 18:43:30 -08:00
James Grugett
d7d8fb94c4
Trim activity feed (#60)
* Trim activity feed: show only items from last 24 hours, remove contract description, shorter width.

* Preserve feed ordering based on initial fetch of bets

* Add see more button, description to explore items
2022-03-04 18:06:11 -06:00
Austin Chen
d9fb2c0557 Tweak padding 2022-03-03 01:07:21 -08:00
James Grugett
c6eb729e46 Remove border on feed tabs 2022-02-28 15:22:01 -08:00
James Grugett
0ccba20d5c Add explore tab on home feed that shows random inactive markets. 2022-02-27 13:37:11 -08:00
James Grugett
ab5ea0181d Feed: Send only contracts with bets in last 24 hours. Instead of all contracts: 2.2MB => 0.8MB 2022-02-25 02:11:10 -06:00
James Grugett
cd590031e7 Feed updates: 1. Order by any bet instead of top 10 & comments 2. No resolved contracts 3. Show loading while fetching recent bets clientside so order preserved 4. Don't change order from new bets 2022-02-25 01:59:53 -06:00
James Grugett
207a12df55 Listen to followed folds. Follow button retreives from local storage. 2022-02-20 23:12:35 -06:00
mantikoros
096a9e773a refactor /home logic to useActiveContracts 2022-02-19 18:02:40 -06:00
mantikoros
60f72fa6ab FastFoldFollowing: check if followedFoldIds is defined 2022-02-19 17:26:49 -06:00
mantikoros
2c572dd89a FastFoldFollowing: check if user defined 2022-02-19 17:23:03 -06:00
mantikoros
13727bb19f
Fast fold following (#51)
* fast follow folds

* FastFoldFollowing component on homepage
2022-02-19 17:17:36 -06:00
James Grugett
2a5172cb48 Switch to sending only recent bets and comments from static props 2022-02-18 12:43:13 -06:00
James Grugett
20ec09b7c6 Remove filter out of binary contracts 2022-02-17 18:39:06 -06:00
James Grugett
d6f15deff4 Fix home page in dev on branches that are not free-response 2022-02-17 01:02:48 -06:00
Austin Chen
7338bdd47a
Automatically sort Tailwind classes with Prettier (#45)
* Add Prettier Tailwind plugin

* Autoformat Tailwind classes with Prettier
2022-02-11 10:40:22 -08:00
James Grugett
546005139b Fix recent activity label on mobile 2022-02-07 22:06:58 -06:00
James Grugett
faa49b750e Always show follow a community prompt 2022-02-06 20:03:42 -06:00
Austin Chen
ab6cfd2564 Show all recent activity if user has no folds 2022-02-06 16:03:36 -08:00
James Grugett
1c8c2a4126 Fix home error after new contracts 2022-02-05 15:56:42 -06:00
James Grugett
31fbd6b900 Send all comments and bets to home page, so feed loads immediately 2022-02-04 20:09:34 -06:00
James Grugett
637a76cf34 Cache first step of generating feed: folds you follow and contracts you bet on. 2022-02-04 17:24:54 -06:00
Austin Chen
a46c311a99 Clean up titles on /home 2022-02-04 10:30:13 -08:00
James Grugett
ca89fd158d Make home communities look better on mobile. Add Covid & AI. 2022-02-03 19:00:17 -06:00
James Grugett
c36ce3e521 Change home tags to communities 2022-02-03 17:40:37 -06:00
James Grugett
e5f553fa1a Merge branch 'main' into custom-feed 2022-02-03 17:33:12 -06:00
James Grugett
587e1e5d61 Add loading spinner while feed loads 2022-02-03 17:12:09 -06:00
James Grugett
3cf4cb7a77 Show custom feed of contracts from folds your follow or have bet on. 2022-02-03 16:54:08 -06:00
Austin Chen
426d41ba44 Surface a list of tags on /home 2022-02-03 11:00:49 -08:00
James Grugett
f80ef1cd34 Add hot markets to home feed 2022-02-02 00:40:46 -06:00
James Grugett
9d2b99f237 Listen for updates of contracts on home 2022-01-30 22:03:20 -06:00
James Grugett
649c6f4642
Make navbar render signed in or signed out by page (#39) 2022-01-27 17:06:31 -06:00
jahooma
f2c4d3e9c1 Change to white backgrounds for content. Remove page's margin, set individually. 2022-01-27 16:37:43 -06:00
mantikoros
9acb07aa14 home: remove hot, closing soon sections 2022-01-27 14:23:55 -06:00
mantikoros
fd03eb841f home: remove incomplete loading of contract data 2022-01-22 18:36:35 -06:00