Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Style the empty lists drawer to match Figma #1749

Merged
merged 2 commits into from
Jan 31, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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. [#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)
Expand Down
17 changes: 14 additions & 3 deletions Nos/Assets/Localization/Localizable.xcstrings
Original file line number Diff line number Diff line change
Expand Up @@ -4371,6 +4371,17 @@
}
}
},
"createYourFirstList" : {
"extractionState" : "manual",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Create your first list"
}
}
}
},
"dayAbbreviated" : {
"extractionState" : "manual",
"localizations" : {
Expand Down Expand Up @@ -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."
}
}
}
Expand Down Expand Up @@ -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" : {
Expand Down Expand Up @@ -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" : {
Expand Down
29 changes: 14 additions & 15 deletions Nos/Views/Home/FeedCustomizerView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand All @@ -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 {
Expand Down