Skip to content

Commit

Permalink
Merge pull request #1658 from planetary-social/update-discover-tab
Browse files Browse the repository at this point in the history
Add new featured authors and new categories to the Discover tab
  • Loading branch information
pelumy authored Oct 21, 2024
2 parents 706c213 + 8b0903c commit 9f19aba
Show file tree
Hide file tree
Showing 10 changed files with 618 additions and 158 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Added a tag to published contact lists to help us detect the source of lost contact lists. [cleanstr#51](https://github.com/planetary-social/cleanstr/issues/51)
- Removed integration with Universal Name Space [#1636](https://github.com/planetary-social/nos/issues/1636)
- Remove most usage of xcstringstool-generated strings to improve performance. [#1458](https://github.com/planetary-social/nos/issues/1458)
- Added new authors and categories to the Discover tab. [#1592](https://github.com/planetary-social/nos/issues/1592)

### Internal Changes
- Migrate ObservableObject to @Observable where possible [#1458](https://github.com/planetary-social/nos/issues/1458)
Expand Down
20 changes: 20 additions & 0 deletions Nos.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,11 @@
045EDD052CAC025700B67964 /* ScrollViewProxy+Animate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 045EDD042CAC025700B67964 /* ScrollViewProxy+Animate.swift */; };
0496D6312C975E6900D29375 /* FlagOptionPicker.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0496D6302C975E6900D29375 /* FlagOptionPicker.swift */; };
04C9D7272CBF09C200EAAD4D /* TextField+PlaceHolderStyle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04C9D7262CBF09C200EAAD4D /* TextField+PlaceHolderStyle.swift */; };
04C9D7912CC29D5000EAAD4D /* FeaturedAuthor+Cohort1.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04C9D7902CC29D5000EAAD4D /* FeaturedAuthor+Cohort1.swift */; };
04C9D7932CC29D8300EAAD4D /* FeaturedAuthor+Cohort2.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04C9D7922CC29D8300EAAD4D /* FeaturedAuthor+Cohort2.swift */; };
04C9D7952CC29E0A00EAAD4D /* FeaturedAuthor+Cohort3.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04C9D7942CC29E0A00EAAD4D /* FeaturedAuthor+Cohort3.swift */; };
04C9D7972CC29E4A00EAAD4D /* FeaturedAuthor+Cohort4.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04C9D7962CC29E4A00EAAD4D /* FeaturedAuthor+Cohort4.swift */; };
04C9D7992CC29EDD00EAAD4D /* FeaturedAuthor+Cohort5.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04C9D7982CC29EDD00EAAD4D /* FeaturedAuthor+Cohort5.swift */; };
04F16AA72CBDBD91003AD693 /* DeleteConfirmationView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04F16AA62CBDBD91003AD693 /* DeleteConfirmationView.swift */; };
2D06BB9D2AE249D70085F509 /* ThreadRootView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2D06BB9C2AE249D70085F509 /* ThreadRootView.swift */; };
2D4010A22AD87DF300F93AD4 /* KnownFollowersView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2D4010A12AD87DF300F93AD4 /* KnownFollowersView.swift */; };
Expand Down Expand Up @@ -696,6 +701,11 @@
045EDD042CAC025700B67964 /* ScrollViewProxy+Animate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ScrollViewProxy+Animate.swift"; sourceTree = "<group>"; };
0496D6302C975E6900D29375 /* FlagOptionPicker.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FlagOptionPicker.swift; sourceTree = "<group>"; };
04C9D7262CBF09C200EAAD4D /* TextField+PlaceHolderStyle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "TextField+PlaceHolderStyle.swift"; sourceTree = "<group>"; };
04C9D7902CC29D5000EAAD4D /* FeaturedAuthor+Cohort1.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "FeaturedAuthor+Cohort1.swift"; sourceTree = "<group>"; };
04C9D7922CC29D8300EAAD4D /* FeaturedAuthor+Cohort2.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "FeaturedAuthor+Cohort2.swift"; sourceTree = "<group>"; };
04C9D7942CC29E0A00EAAD4D /* FeaturedAuthor+Cohort3.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "FeaturedAuthor+Cohort3.swift"; sourceTree = "<group>"; };
04C9D7962CC29E4A00EAAD4D /* FeaturedAuthor+Cohort4.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "FeaturedAuthor+Cohort4.swift"; sourceTree = "<group>"; };
04C9D7982CC29EDD00EAAD4D /* FeaturedAuthor+Cohort5.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "FeaturedAuthor+Cohort5.swift"; sourceTree = "<group>"; };
04F16AA62CBDBD91003AD693 /* DeleteConfirmationView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DeleteConfirmationView.swift; sourceTree = "<group>"; };
2D06BB9C2AE249D70085F509 /* ThreadRootView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ThreadRootView.swift; sourceTree = "<group>"; };
2D4010A12AD87DF300F93AD4 /* KnownFollowersView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = KnownFollowersView.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1583,6 +1593,11 @@
65BD8DC02BDAF2C300802039 /* DiscoverContentsView.swift */,
65BD8DBE2BDAF2C300802039 /* DiscoverTab.swift */,
030AE4282BE3D63C004DEE02 /* FeaturedAuthor.swift */,
04C9D7902CC29D5000EAAD4D /* FeaturedAuthor+Cohort1.swift */,
04C9D7922CC29D8300EAAD4D /* FeaturedAuthor+Cohort2.swift */,
04C9D7942CC29E0A00EAAD4D /* FeaturedAuthor+Cohort3.swift */,
04C9D7962CC29E4A00EAAD4D /* FeaturedAuthor+Cohort4.swift */,
04C9D7982CC29EDD00EAAD4D /* FeaturedAuthor+Cohort5.swift */,
65BD8DBF2BDAF2C300802039 /* FeaturedAuthorCategory.swift */,
03A743442CC048C700893CAE /* GoToFeedTip.swift */,
);
Expand Down Expand Up @@ -2380,16 +2395,19 @@
65D066992BD558690011C5CD /* DirectMessageWrapper.swift in Sources */,
504454702C90728500251A7E /* Event+Hydration.swift in Sources */,
659B27242BD9CB4500BEA6CC /* VerifiableEvent.swift in Sources */,
04C9D7932CC29D8300EAAD4D /* FeaturedAuthor+Cohort2.swift in Sources */,
C9C2B77F29E0731600548B4A /* AsyncTimer.swift in Sources */,
A32B6C7329A6BE9B00653FF5 /* FollowsView.swift in Sources */,
3F30020D29C382EB003D4F8B /* OnboardingLoginView.swift in Sources */,
C9A25B3D29F174D200B39534 /* ReadabilityPadding.swift in Sources */,
04C9D7952CC29E0A00EAAD4D /* FeaturedAuthor+Cohort3.swift in Sources */,
C9DFA972299BF9E8006929C1 /* CompactNoteView.swift in Sources */,
C9AC31AD2A55E0BD00A94E5A /* NotificationViewModel.swift in Sources */,
0326347A2C10C57A00E489B5 /* FileStorageAPIClient.swift in Sources */,
030E56CA2CC1BC6200A4A51E /* PublicKeyView.swift in Sources */,
C9EE3E632A053910008A7491 /* ExpirationTimeOption.swift in Sources */,
03C7E7A22CB9CD150054624C /* PointDownEmojiTipViewStyle.swift in Sources */,
04C9D7972CC29E4A00EAAD4D /* FeaturedAuthor+Cohort4.swift in Sources */,
C9A0DAE029C697A100466635 /* AboutView.swift in Sources */,
0496D6312C975E6900D29375 /* FlagOptionPicker.swift in Sources */,
04F16AA72CBDBD91003AD693 /* DeleteConfirmationView.swift in Sources */,
Expand Down Expand Up @@ -2484,13 +2502,15 @@
03E181472C754BA300886CC6 /* LinkView.swift in Sources */,
C90352BA2C1235CD000A5993 /* NosNavigationDestination.swift in Sources */,
03D1B4282C3C1A5D001778CD /* NostrIdentifier.swift in Sources */,
04C9D7992CC29EDD00EAAD4D /* FeaturedAuthor+Cohort5.swift in Sources */,
DC5F203F2A6AE24200F8D73F /* ImagePickerButton.swift in Sources */,
5B79F5EB2B97B5E9002DA9BE /* ConfirmUsernameDeletionSheet.swift in Sources */,
C9032C2E2BAE31ED001F4EC6 /* ProfileFeedType.swift in Sources */,
C9CDBBA429A8FA2900C555C7 /* GoldenPostView.swift in Sources */,
C92F01582AC4D6F700972489 /* NosTextField.swift in Sources */,
C9C2B77C29E072E400548B4A /* WebSocket+Nos.swift in Sources */,
C9DEC003298945150078B43A /* String+Lorem.swift in Sources */,
04C9D7912CC29D5000EAAD4D /* FeaturedAuthor+Cohort1.swift in Sources */,
038EF09D2CC16D640031F7F2 /* PrivateKeyView.swift in Sources */,
C97A1C8B29E45B4E009D9E8D /* RawEventController.swift in Sources */,
C9DEC0632989541F0078B43A /* Bundle+Current.swift in Sources */,
Expand Down
88 changes: 88 additions & 0 deletions Nos/Assets/Localization/Localizable.xcstrings
Original file line number Diff line number Diff line change
Expand Up @@ -6352,6 +6352,28 @@
}
}
},
"featuredAuthorCategoryEspanol" : {
"extractionState" : "manual",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Español"
}
}
}
},
"featuredAuthorCategoryFood" : {
"extractionState" : "manual",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Food"
}
}
}
},
"featuredAuthorCategoryGaming" : {
"extractionState" : "manual",
"localizations" : {
Expand Down Expand Up @@ -6470,6 +6492,17 @@
}
}
},
"featuredAuthorCategoryLifestyle" : {
"extractionState" : "manual",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Lifestyle"
}
}
}
},
"featuredAuthorCategoryMusic" : {
"extractionState" : "manual",
"localizations" : {
Expand Down Expand Up @@ -6647,6 +6680,61 @@
}
}
},
"featuredAuthorCategoryNZAustralia" : {
"extractionState" : "manual",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "NZ / Australia"
}
}
}
},
"featuredAuthorCategoryPhotography" : {
"extractionState" : "manual",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Photography"
}
}
}
},
"featuredAuthorCategoryPolitics" : {
"extractionState" : "manual",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Politics"
}
}
}
},
"featuredAuthorCategoryRandom" : {
"extractionState" : "manual",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Random"
}
}
}
},
"featuredAuthorCategorySciFi" : {
"extractionState" : "manual",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Sci-Fi"
}
}
}
},
"featuredAuthorCategorySports" : {
"extractionState" : "manual",
"localizations" : {
Expand Down
46 changes: 46 additions & 0 deletions Nos/Views/Discover/FeaturedAuthor+Cohort1.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
import Foundation

extension FeaturedAuthor {
static let cohort1 = [
FeaturedAuthor(
name: "Miguel Almodo",
npub: "npub1ajt9gp0prf4xrp4j07j9rghlcyukahncs0fw5ywr977jccued9nqrcc0cs",
categories: [.activists]
),
FeaturedAuthor(
name: "The Conversation",
npub: "npub1uuxnz0sq60thc098xfxqst7wnw77l0sm3r8nn48yspuvz4ecprksxdahzv",
categories: [.news]
),
FeaturedAuthor(
name: "Ainsley Costello",
npub: "npub13qrrw2h4z52m7jh0spefrwtysl4psfkfv6j4j672se5hkhvtyw7qu0almy",
categories: [.music]
),
FeaturedAuthor(
name: "Chris Liss",
npub: "npub1dwhr8j9uy6ju2uu39t6tj6mw76gztr4rwdd6jr9qtkdh5crjwt5q2nqfxe",
categories: [.sports]
),
FeaturedAuthor(
name: "Alicia Stockman",
npub: "npub1l3y60kjywvrrln5ftse553h2ltg53sm3zy55grvlncd78x3k5uqsmw8dff",
categories: [.music]
),
FeaturedAuthor(
name: "Judson McKinney and the Wanderers",
npub: "npub1jvt2hacqqzvwjkum30mlvmy52jer4p4crfh0veqstpk58rr9e7ms2fwh74",
categories: [.music]
),
FeaturedAuthor(
name: "Black in Aquatics",
npub: "npub1ee852umhw26afdfwgf90cky9ufaythwyarttqu59lazcrx56z0tsmx3mkz",
categories: [.sports]
),
FeaturedAuthor(
name: "Global Sports Central",
npub: "npub1qspus6smkn8mcdxg5jflh50s69vdgtwsd5p74gmjpzp2qekn5duqfv5afj",
categories: [.news, .sports]
)
]
}
41 changes: 41 additions & 0 deletions Nos/Views/Discover/FeaturedAuthor+Cohort2.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import Foundation

extension FeaturedAuthor {
static let cohort2 = [
FeaturedAuthor(
name: "Lou",
npub: "npub1rr3678k7ajms2sht0cqqeawy86sdd5ahn6akfj8zex9ng82zuh0sz8nywd",
categories: [.gaming]
),
FeaturedAuthor(
name: "We Distribute",
npub: "npub1w9wuqc3s6lr25c4sgj52werj3tngvt43qrccqrher4wvn7tjm32s2ck403",
categories: [.news, .tech]
),
FeaturedAuthor(
name: "Simon Howard",
npub: "npub1rt5h26ukmqsqa29ggt0h98tq2skgqr85f3znhwxule4z4pjhhd3qzs5k94",
categories: [.music]
),
FeaturedAuthor(
name: "BTCPhoto",
npub: "npub1vjl6n2llukcc6pe3am2hkwqh8twzh2ymlp7pdrdfq5tlqg08y26sd7ygzx",
categories: [.art]
),
FeaturedAuthor(
name: "Sam Hain",
npub: "npub1df47g7a39usamq83aula72zdz23fx9xw5rrfmd0v6p9t20n5u0ss2eqez9",
categories: [.art]
),
FeaturedAuthor(
name: "Joanna",
npub: "npub1a2a85jwde32zjsjk02ujasydqc3t2w9rfgfe97amm0r4d9mepfxsxf3fnn",
categories: [.activists, .health]
),
FeaturedAuthor(
name: "Josh Brown",
npub: "npub1yl8jc6znttslcpj3p6p8vuq98awu6w0xh4lqtu0lkjr772kpx4ysfqvz34",
categories: [.photography]
),
]
}
41 changes: 41 additions & 0 deletions Nos/Views/Discover/FeaturedAuthor+Cohort3.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import Foundation

extension FeaturedAuthor {
static let cohort3 = [
FeaturedAuthor(
name: "INPC",
npub: "npub1q33jywkl8r0e5g48lvrenxnr3lw59kzrw4e7p0cecslqzwc56eesjymqu0",
categories: [.music]
),
FeaturedAuthor(
name: "Mama Ganush",
npub: "npub1lq9lx5mh2m3pvdnckcta7h7h07qexa3gxvyakdzt73lqp3prt3jqx9pa2e",
categories: [.activists]
),
FeaturedAuthor(
name: "Fight for the Future",
npub: "npub1jcwuf0dh5vqsq44qavygqwjfecawf53fmx7gadlcdtuexz0548hqy4jyrz",
categories: [.activists, .tech]
),
FeaturedAuthor(
name: "Z Network",
npub: "npub1xm0rvnpw52nh7tk59ntly55w74rmd2cqvt3kg5zxrzz3rlssvspsk0gs6s",
categories: [.news, .activists]
),
FeaturedAuthor(
name: "Z Network Chomsky",
npub: "npub1a7mxreazql8ld0csdzk7wk6a5xjzcg7h632q78u3008lyr32lxks5t4ske",
categories: [.activists]
),
FeaturedAuthor(
name: "Patrick Boehler",
npub: "npub1n8gvnx827tdl46ke406sjx0t5ey4mrtptux766ejp9y2ff8cc3uqe4ufd0",
categories: [.news, .tech]
),
FeaturedAuthor(
name: "JSTR",
npub: "npub1vpdlxsc8dr4m580d43vj4ka0e6wmstzzxhvcermllhh5m9ytnhdq6wnaem",
categories: [.music]
)
]
}
31 changes: 31 additions & 0 deletions Nos/Views/Discover/FeaturedAuthor+Cohort4.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import Foundation

extension FeaturedAuthor {
static let cohort4 = [
FeaturedAuthor(
name: "Existing Sprinkles",
npub: "npub1f5kc2agn63ecv2ua4909z9ahgmr2x9263na36jh6r908ql0926jq3nvk2u",
categories: [.art]
),
FeaturedAuthor(
name: "ArchJourney",
npub: "npub1qhjxfxpjm7udr0agr6nuhuwf9383e4g9907g64r9hf6y4fh6t6uqpcp36k",
categories: [.art]
),
FeaturedAuthor(
name: "Neigsendoig Cocules",
npub: "npub1372csjhjv35sxcqm90ca2d0cfxsl6xku7j6hhswynwdy9m7zl98scn950w",
categories: [.music]
),
FeaturedAuthor(
name: "Lexie Bean",
npub: "npub1s8c5mk68qn0erxrx5waqz7xxk39x5xx2367879eqcv270tqs4tvsf5ewgf",
categories: [.activists]
),
FeaturedAuthor(
name: "Protest.net",
npub: "npub1z3thwmwasmp787zvk2aaq5qdjtjdkl637p52nph4flv668973c8qaz2du7",
categories: [.activists]
)
]
}
Loading

0 comments on commit 9f19aba

Please sign in to comment.