From 2e29b50a851fc0f8574be7f2cf0228718bb0a997 Mon Sep 17 00:00:00 2001 From: mplorentz Date: Fri, 31 Jan 2025 14:19:22 -0500 Subject: [PATCH 1/2] Style the empty lists drawer to match Figma --- CHANGELOG.md | 1 + Nos/Assets/Localization/Localizable.xcstrings | 17 +++++++++-- Nos/Views/Home/FeedCustomizerView.swift | 29 +++++++++---------- 3 files changed, 29 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ce600f72b..0ada996b6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fixed: while searching for users to add to a list, NIP-05 searches dismiss the view. [#165](https://github.com/verse-pbc/issues/issues/165) - Fixed a crash when processing a malformed delete (kind 5) event. [#170](https://github.com/verse-pbc/issues/issues/170) - Fixed: tapping a user on a list causes a crash. [#172](https://github.com/verse-pbc/issues/issues/172) +- Removed link to Listr.lol when list is empty. ### Internal Changes - Added function for creating a new list and a test verifying list editing. [#112](https://github.com/verse-pbc/issues/issues/112) diff --git a/Nos/Assets/Localization/Localizable.xcstrings b/Nos/Assets/Localization/Localizable.xcstrings index 9bb1d3997..1ff2deda4 100644 --- a/Nos/Assets/Localization/Localizable.xcstrings +++ b/Nos/Assets/Localization/Localizable.xcstrings @@ -4371,6 +4371,17 @@ } } }, + "createYourFirstList" : { + "extractionState" : "manual", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Create your first list" + } + } + } + }, "dayAbbreviated" : { "extractionState" : "manual", "localizations" : { @@ -12552,7 +12563,7 @@ "en" : { "stringUnit" : { "state" : "translated", - "value" : "It doesn’t look like you have created any lists." + "value" : "It doesn’t look like you have created any lists. Add lists to your feed to filter by topic." } } } @@ -14194,7 +14205,7 @@ "en" : { "stringUnit" : { "state" : "translated", - "value" : "Your **@username** is your identity in the Nos community.\u2028\nChoose a name that reflects you or your organization. Make it memorable and distinct!" + "value" : "Your **@username** is your identity in the Nos community.
\nChoose a name that reflects you or your organization. Make it memorable and distinct!" } }, "es" : { @@ -19452,7 +19463,7 @@ "en" : { "stringUnit" : { "state" : "translated", - "value" : "Well done, you've successfully claimed your **@username**!\u2028\nYou can share this name with other people in the Nostr and Fediverse communities to make it easy to find you." + "value" : "Well done, you've successfully claimed your **@username**!
\nYou can share this name with other people in the Nostr and Fediverse communities to make it easy to find you." } }, "es" : { diff --git a/Nos/Views/Home/FeedCustomizerView.swift b/Nos/Views/Home/FeedCustomizerView.swift index 7958083f7..856f9c6b6 100644 --- a/Nos/Views/Home/FeedCustomizerView.swift +++ b/Nos/Views/Home/FeedCustomizerView.swift @@ -56,20 +56,7 @@ struct FeedCustomizerView: View { items: feedController.listRowItems, footer: { Group { - if feedController.listRowItems.isEmpty { - Group { - Text("Create your own lists on ") + - Text("Listr ") - .foregroundStyle(Color.accent) + - Text(Image(systemName: "link")) - .foregroundStyle(Color.accent) - } - .onTapGesture { - if let url = URL(string: "https://listr.lol/feed") { - UIApplication.shared.open(url) - } - } - } else { + if !feedController.listRowItems.isEmpty { SecondaryActionButton( "manageYourLists", font: .clarity(.semibold, textStyle: .footnote), @@ -83,7 +70,19 @@ struct FeedCustomizerView: View { .padding() }, noContent: { - Text("noLists") + VStack(spacing: 28) { + Text("noLists") + .font(.clarity(.medium)) + .multilineTextAlignment(.center) + SecondaryActionButton( + "createYourFirstList", + font: .clarity(.semibold, textStyle: .footnote) + ) { + analytics.feedCustomizerClosed() + shouldNavigateToLists = true + } + } + .padding(24) } ) } else { From 7d26dc243485f3cde22e804a3980a86ab58e81c5 Mon Sep 17 00:00:00 2001 From: mplorentz Date: Fri, 31 Jan 2025 14:23:36 -0500 Subject: [PATCH 2/2] Add link to changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ada996b6..46e9a14f9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,7 +21,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fixed: while searching for users to add to a list, NIP-05 searches dismiss the view. [#165](https://github.com/verse-pbc/issues/issues/165) - Fixed a crash when processing a malformed delete (kind 5) event. [#170](https://github.com/verse-pbc/issues/issues/170) - Fixed: tapping a user on a list causes a crash. [#172](https://github.com/verse-pbc/issues/issues/172) -- Removed link to Listr.lol when list is empty. +- Removed link to Listr.lol when list is empty. [#176](https://github.com/verse-pbc/issues/issues/176) ### Internal Changes - Added function for creating a new list and a test verifying list editing. [#112](https://github.com/verse-pbc/issues/issues/112)