Skip to content

Commit

Permalink
Show only replies from people you follow in Following by default (#2279)
Browse files Browse the repository at this point in the history
* Show only replies from people you follow by default in Following

* Patch
  • Loading branch information
gaearon authored Mar 6, 2024
1 parent dc7564b commit 192223f
Show file tree
Hide file tree
Showing 12 changed files with 52 additions and 39 deletions.
8 changes: 8 additions & 0 deletions .changeset/ten-tools-exercise.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
'@atproto/ozone': patch
'@atproto/bsky': patch
'@atproto/api': patch
'@atproto/pds': patch
---

Change Following feed prefs to only show replies from people you follow by default
3 changes: 2 additions & 1 deletion lexicons/app/bsky/actor/defs.json
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,8 @@
},
"hideRepliesByUnfollowed": {
"type": "boolean",
"description": "Hide replies in the feed if they are not by followed users."
"description": "Hide replies in the feed if they are not by followed users.",
"default": true
},
"hideRepliesByLikeCount": {
"type": "integer",
Expand Down
2 changes: 1 addition & 1 deletion packages/api/src/bsky-agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { sanitizeMutedWordValue } from './util'

const FEED_VIEW_PREF_DEFAULTS = {
hideReplies: false,
hideRepliesByUnfollowed: false,
hideRepliesByUnfollowed: true,
hideRepliesByLikeCount: 0,
hideReposts: false,
hideQuotePosts: false,
Expand Down
1 change: 1 addition & 0 deletions packages/api/src/client/lexicons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5184,6 +5184,7 @@ export const schemaDict = {
type: 'boolean',
description:
'Hide replies in the feed if they are not by followed users.',
default: true,
},
hideRepliesByLikeCount: {
type: 'integer',
Expand Down
2 changes: 1 addition & 1 deletion packages/api/src/client/types/app/bsky/actor/defs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ export interface FeedViewPref {
/** Hide replies in the feed. */
hideReplies?: boolean
/** Hide replies in the feed if they are not by followed users. */
hideRepliesByUnfollowed?: boolean
hideRepliesByUnfollowed: boolean
/** Hide replies in the feed if they do not have this number of likes. */
hideRepliesByLikeCount?: number
/** Hide reposts in the feed. */
Expand Down
66 changes: 33 additions & 33 deletions packages/api/tests/bsky-agent.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ describe('agent', () => {
feedViewPrefs: {
home: {
hideReplies: false,
hideRepliesByUnfollowed: false,
hideRepliesByUnfollowed: true,
hideRepliesByLikeCount: 0,
hideReposts: false,
hideQuotePosts: false,
Expand All @@ -252,7 +252,7 @@ describe('agent', () => {
feedViewPrefs: {
home: {
hideReplies: false,
hideRepliesByUnfollowed: false,
hideRepliesByUnfollowed: true,
hideRepliesByLikeCount: 0,
hideReposts: false,
hideQuotePosts: false,
Expand All @@ -278,7 +278,7 @@ describe('agent', () => {
feedViewPrefs: {
home: {
hideReplies: false,
hideRepliesByUnfollowed: false,
hideRepliesByUnfollowed: true,
hideRepliesByLikeCount: 0,
hideReposts: false,
hideQuotePosts: false,
Expand Down Expand Up @@ -306,7 +306,7 @@ describe('agent', () => {
feedViewPrefs: {
home: {
hideReplies: false,
hideRepliesByUnfollowed: false,
hideRepliesByUnfollowed: true,
hideRepliesByLikeCount: 0,
hideReposts: false,
hideQuotePosts: false,
Expand Down Expand Up @@ -336,7 +336,7 @@ describe('agent', () => {
feedViewPrefs: {
home: {
hideReplies: false,
hideRepliesByUnfollowed: false,
hideRepliesByUnfollowed: true,
hideRepliesByLikeCount: 0,
hideReposts: false,
hideQuotePosts: false,
Expand Down Expand Up @@ -368,7 +368,7 @@ describe('agent', () => {
feedViewPrefs: {
home: {
hideReplies: false,
hideRepliesByUnfollowed: false,
hideRepliesByUnfollowed: true,
hideRepliesByLikeCount: 0,
hideReposts: false,
hideQuotePosts: false,
Expand Down Expand Up @@ -400,7 +400,7 @@ describe('agent', () => {
feedViewPrefs: {
home: {
hideReplies: false,
hideRepliesByUnfollowed: false,
hideRepliesByUnfollowed: true,
hideRepliesByLikeCount: 0,
hideReposts: false,
hideQuotePosts: false,
Expand Down Expand Up @@ -432,7 +432,7 @@ describe('agent', () => {
feedViewPrefs: {
home: {
hideReplies: false,
hideRepliesByUnfollowed: false,
hideRepliesByUnfollowed: true,
hideRepliesByLikeCount: 0,
hideReposts: false,
hideQuotePosts: false,
Expand Down Expand Up @@ -464,7 +464,7 @@ describe('agent', () => {
feedViewPrefs: {
home: {
hideReplies: false,
hideRepliesByUnfollowed: false,
hideRepliesByUnfollowed: true,
hideRepliesByLikeCount: 0,
hideReposts: false,
hideQuotePosts: false,
Expand Down Expand Up @@ -496,7 +496,7 @@ describe('agent', () => {
feedViewPrefs: {
home: {
hideReplies: false,
hideRepliesByUnfollowed: false,
hideRepliesByUnfollowed: true,
hideRepliesByLikeCount: 0,
hideReposts: false,
hideQuotePosts: false,
Expand Down Expand Up @@ -534,7 +534,7 @@ describe('agent', () => {
feedViewPrefs: {
home: {
hideReplies: false,
hideRepliesByUnfollowed: false,
hideRepliesByUnfollowed: true,
hideRepliesByLikeCount: 0,
hideReposts: false,
hideQuotePosts: false,
Expand Down Expand Up @@ -566,7 +566,7 @@ describe('agent', () => {
feedViewPrefs: {
home: {
hideReplies: false,
hideRepliesByUnfollowed: false,
hideRepliesByUnfollowed: true,
hideRepliesByLikeCount: 0,
hideReposts: false,
hideQuotePosts: false,
Expand Down Expand Up @@ -598,7 +598,7 @@ describe('agent', () => {
feedViewPrefs: {
home: {
hideReplies: false,
hideRepliesByUnfollowed: false,
hideRepliesByUnfollowed: true,
hideRepliesByLikeCount: 0,
hideReposts: false,
hideQuotePosts: false,
Expand Down Expand Up @@ -630,7 +630,7 @@ describe('agent', () => {
feedViewPrefs: {
home: {
hideReplies: true,
hideRepliesByUnfollowed: false,
hideRepliesByUnfollowed: true,
hideRepliesByLikeCount: 0,
hideReposts: false,
hideQuotePosts: false,
Expand Down Expand Up @@ -662,7 +662,7 @@ describe('agent', () => {
feedViewPrefs: {
home: {
hideReplies: false,
hideRepliesByUnfollowed: false,
hideRepliesByUnfollowed: true,
hideRepliesByLikeCount: 0,
hideReposts: false,
hideQuotePosts: false,
Expand Down Expand Up @@ -694,14 +694,14 @@ describe('agent', () => {
feedViewPrefs: {
home: {
hideReplies: false,
hideRepliesByUnfollowed: false,
hideRepliesByUnfollowed: true,
hideRepliesByLikeCount: 0,
hideReposts: false,
hideQuotePosts: false,
},
other: {
hideReplies: true,
hideRepliesByUnfollowed: false,
hideRepliesByUnfollowed: true,
hideRepliesByLikeCount: 0,
hideReposts: false,
hideQuotePosts: false,
Expand Down Expand Up @@ -733,14 +733,14 @@ describe('agent', () => {
feedViewPrefs: {
home: {
hideReplies: false,
hideRepliesByUnfollowed: false,
hideRepliesByUnfollowed: true,
hideRepliesByLikeCount: 0,
hideReposts: false,
hideQuotePosts: false,
},
other: {
hideReplies: true,
hideRepliesByUnfollowed: false,
hideRepliesByUnfollowed: true,
hideRepliesByLikeCount: 0,
hideReposts: false,
hideQuotePosts: false,
Expand Down Expand Up @@ -772,14 +772,14 @@ describe('agent', () => {
feedViewPrefs: {
home: {
hideReplies: false,
hideRepliesByUnfollowed: false,
hideRepliesByUnfollowed: true,
hideRepliesByLikeCount: 0,
hideReposts: false,
hideQuotePosts: false,
},
other: {
hideReplies: true,
hideRepliesByUnfollowed: false,
hideRepliesByUnfollowed: true,
hideRepliesByLikeCount: 0,
hideReposts: false,
hideQuotePosts: false,
Expand Down Expand Up @@ -811,14 +811,14 @@ describe('agent', () => {
feedViewPrefs: {
home: {
hideReplies: false,
hideRepliesByUnfollowed: false,
hideRepliesByUnfollowed: true,
hideRepliesByLikeCount: 0,
hideReposts: false,
hideQuotePosts: false,
},
other: {
hideReplies: true,
hideRepliesByUnfollowed: false,
hideRepliesByUnfollowed: true,
hideRepliesByLikeCount: 0,
hideReposts: false,
hideQuotePosts: false,
Expand Down Expand Up @@ -907,7 +907,7 @@ describe('agent', () => {
$type: 'app.bsky.actor.defs#feedViewPref',
feed: 'home',
hideReplies: false,
hideRepliesByUnfollowed: false,
hideRepliesByUnfollowed: true,
hideRepliesByLikeCount: 0,
hideReposts: false,
hideQuotePosts: false,
Expand All @@ -916,7 +916,7 @@ describe('agent', () => {
$type: 'app.bsky.actor.defs#feedViewPref',
feed: 'home',
hideReplies: true,
hideRepliesByUnfollowed: true,
hideRepliesByUnfollowed: false,
hideRepliesByLikeCount: 10,
hideReposts: true,
hideQuotePosts: true,
Expand Down Expand Up @@ -946,7 +946,7 @@ describe('agent', () => {
feedViewPrefs: {
home: {
hideReplies: true,
hideRepliesByUnfollowed: true,
hideRepliesByUnfollowed: false,
hideRepliesByLikeCount: 10,
hideReposts: true,
hideQuotePosts: true,
Expand Down Expand Up @@ -977,7 +977,7 @@ describe('agent', () => {
feedViewPrefs: {
home: {
hideReplies: true,
hideRepliesByUnfollowed: true,
hideRepliesByUnfollowed: false,
hideRepliesByLikeCount: 10,
hideReposts: true,
hideQuotePosts: true,
Expand Down Expand Up @@ -1008,7 +1008,7 @@ describe('agent', () => {
feedViewPrefs: {
home: {
hideReplies: true,
hideRepliesByUnfollowed: true,
hideRepliesByUnfollowed: false,
hideRepliesByLikeCount: 10,
hideReposts: true,
hideQuotePosts: true,
Expand Down Expand Up @@ -1039,7 +1039,7 @@ describe('agent', () => {
feedViewPrefs: {
home: {
hideReplies: true,
hideRepliesByUnfollowed: true,
hideRepliesByUnfollowed: false,
hideRepliesByLikeCount: 10,
hideReposts: true,
hideQuotePosts: true,
Expand Down Expand Up @@ -1070,7 +1070,7 @@ describe('agent', () => {
feedViewPrefs: {
home: {
hideReplies: true,
hideRepliesByUnfollowed: true,
hideRepliesByUnfollowed: false,
hideRepliesByLikeCount: 10,
hideReposts: true,
hideQuotePosts: true,
Expand All @@ -1089,7 +1089,7 @@ describe('agent', () => {

await agent.setFeedViewPrefs('home', {
hideReplies: false,
hideRepliesByUnfollowed: false,
hideRepliesByUnfollowed: true,
hideRepliesByLikeCount: 0,
hideReposts: false,
hideQuotePosts: false,
Expand All @@ -1112,7 +1112,7 @@ describe('agent', () => {
feedViewPrefs: {
home: {
hideReplies: false,
hideRepliesByUnfollowed: false,
hideRepliesByUnfollowed: true,
hideRepliesByLikeCount: 0,
hideReposts: false,
hideQuotePosts: false,
Expand Down Expand Up @@ -1155,7 +1155,7 @@ describe('agent', () => {
$type: 'app.bsky.actor.defs#feedViewPref',
feed: 'home',
hideReplies: false,
hideRepliesByUnfollowed: false,
hideRepliesByUnfollowed: true,
hideRepliesByLikeCount: 0,
hideReposts: false,
hideQuotePosts: false,
Expand Down
1 change: 1 addition & 0 deletions packages/bsky/src/lexicon/lexicons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5184,6 +5184,7 @@ export const schemaDict = {
type: 'boolean',
description:
'Hide replies in the feed if they are not by followed users.',
default: true,
},
hideRepliesByLikeCount: {
type: 'integer',
Expand Down
2 changes: 1 addition & 1 deletion packages/bsky/src/lexicon/types/app/bsky/actor/defs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ export interface FeedViewPref {
/** Hide replies in the feed. */
hideReplies?: boolean
/** Hide replies in the feed if they are not by followed users. */
hideRepliesByUnfollowed?: boolean
hideRepliesByUnfollowed: boolean
/** Hide replies in the feed if they do not have this number of likes. */
hideRepliesByLikeCount?: number
/** Hide reposts in the feed. */
Expand Down
1 change: 1 addition & 0 deletions packages/ozone/src/lexicon/lexicons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5184,6 +5184,7 @@ export const schemaDict = {
type: 'boolean',
description:
'Hide replies in the feed if they are not by followed users.',
default: true,
},
hideRepliesByLikeCount: {
type: 'integer',
Expand Down
2 changes: 1 addition & 1 deletion packages/ozone/src/lexicon/types/app/bsky/actor/defs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ export interface FeedViewPref {
/** Hide replies in the feed. */
hideReplies?: boolean
/** Hide replies in the feed if they are not by followed users. */
hideRepliesByUnfollowed?: boolean
hideRepliesByUnfollowed: boolean
/** Hide replies in the feed if they do not have this number of likes. */
hideRepliesByLikeCount?: number
/** Hide reposts in the feed. */
Expand Down
1 change: 1 addition & 0 deletions packages/pds/src/lexicon/lexicons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5184,6 +5184,7 @@ export const schemaDict = {
type: 'boolean',
description:
'Hide replies in the feed if they are not by followed users.',
default: true,
},
hideRepliesByLikeCount: {
type: 'integer',
Expand Down
2 changes: 1 addition & 1 deletion packages/pds/src/lexicon/types/app/bsky/actor/defs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ export interface FeedViewPref {
/** Hide replies in the feed. */
hideReplies?: boolean
/** Hide replies in the feed if they are not by followed users. */
hideRepliesByUnfollowed?: boolean
hideRepliesByUnfollowed: boolean
/** Hide replies in the feed if they do not have this number of likes. */
hideRepliesByLikeCount?: number
/** Hide reposts in the feed. */
Expand Down

0 comments on commit 192223f

Please sign in to comment.