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

Add reset icon to reset app hints option in the app about tab 475 #478

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
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,16 @@ Emojis for the following are chosen based on [gitmoji](https://gitmoji.dev/).

# [Upcoming] Scribe-iOS 3.1.0

### ✨ New Features

- The About tab now includes a link to Scribe's Mastodon account ([#474](https://github.com/scribe-org/Scribe-iOS/issues/474)).

### 🎨 Design Changes

- The top right corner of the keyboard installation directions now blinks when the view is clicked on ([#461](https://github.com/scribe-org/Scribe-iOS/issues/461)).
- The app hints now appear and disappear with a transition ([#462](https://github.com/scribe-org/Scribe-iOS/issues/462)).
- The installation page texts were made larger on certain devices to improve readability ([#466](https://github.com/scribe-org/Scribe-iOS/issues/466)).
- The Installation tab texts were made larger on certain devices to improve readability ([#466](https://github.com/scribe-org/Scribe-iOS/issues/466)).
- The reset app hints option in the About tab has an icon so that all menu options now have one ([#475](https://github.com/scribe-org/Scribe-iOS/issues/475)).

### 🌐 Localization

Expand Down
9 changes: 8 additions & 1 deletion Scribe/AboutTab/AboutTableData.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ struct AboutTableData {
sectionState: .matrix,
externalLink: true
),
Section(
sectionTitle: NSLocalizedString("app.about.mastodon", value: "Follow us on Mastodon", comment: ""),
imageString: "mastodon",
sectionState: .mastodon,
externalLink: true
),
Section(
sectionTitle: NSLocalizedString("app.about.share", value: "Share Scribe", comment: ""),
imageString: "square.and.arrow.up",
Expand Down Expand Up @@ -80,7 +86,8 @@ struct AboutTableData {
),
Section(
sectionTitle: NSLocalizedString("app.about.appHints", value: "Reset app hints", comment: ""),
imageString: "lightbulb",
imageString: "lightbulb.max",
hasNestedNavigation: true,
sectionState: .appHints
)
],
Expand Down
3 changes: 3 additions & 0 deletions Scribe/AboutTab/AboutViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ extension AboutViewController {
case .matrix:
openURLString(urlString: "https://matrix.to/#/#scribe_community:matrix.org", withEncoding: true)

case .mastodon:
openURLString(urlString: "https://wikis.world/@scribe", withEncoding: false)

case .wikimedia:
if let viewController = storyboard?.instantiateViewController(
identifier: "InformationScreenVC"
Expand Down
52 changes: 52 additions & 0 deletions Scribe/Assets.xcassets/MenuIcons/mastodon.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"images" : [
{
"filename" : "mastodon.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"filename" : "mastodon 1.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 4 additions & 2 deletions Scribe/Components/UITableViewCells/AboutTableViewCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,15 @@ final class AboutTableViewCell: UITableViewCell {
}

if section.hasNestedNavigation {
let resetIcon = UIImage(systemName: "arrow.circlepath")
let disclosureIcon = UIImage(systemName: "chevron.right")
let rightIcon = section.sectionState == .appHints ? resetIcon : disclosureIcon
let accessory = UIImageView(
frame: CGRect(
x: 0, y: 0, width: (disclosureIcon?.size.width)!, height: (disclosureIcon?.size.height)!
x: 0, y: 0, width: (rightIcon?.size.width)!, height: (rightIcon?.size.height)!
)
)
accessory.image = disclosureIcon
accessory.image = rightIcon
accessory.tintColor = menuOptionColor
accessoryView = accessory
}
Expand Down
1 change: 1 addition & 0 deletions Scribe/ParentTableCellModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ enum SectionState: Equatable {
case specificLang(String)
case none(UserInteractiveState)
case externalLink
case mastodon
}

enum UserInteractiveState {
Expand Down