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

Remove corner image and icon image #515

Merged
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
4 changes: 2 additions & 2 deletions .github/workflows/pr_ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ jobs:
${{ runner.os }}-xcode-
- name: Build
run: |
xcodebuild -scheme Scribe -destination 'platform=iOS Simulator,name=iPhone 16,OS=latest' clean build
xcodebuild -scheme Scribe -destination 'platform=iOS Simulator,name=iPhone 15,OS=latest' clean build

- name: Test
run: |
xcodebuild -scheme Scribe -destination 'platform=iOS Simulator,name=iPhone 16,OS=latest' test
xcodebuild -scheme Scribe -destination 'platform=iOS Simulator,name=iPhone 15,OS=latest' test
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ Emojis for the following are chosen based on [gitmoji](https://gitmoji.dev/).
- Scribe commands can now be triggered directly on a selected word by pressing the Scribe key and then choosing which command to use ([#141](https://github.com/scribe-org/Scribe-iOS/issues/141)).
- Users can toggle whether the double space period shortcut is enabled on a per keyboard basis ([#479](https://github.com/scribe-org/Scribe-iOS/issues/479)).

### 🎨 Design Changes

- The About tab corner icons were removed to make RTL language menus easier to maintain ([#514](https://github.com/scribe-org/Scribe-iOS/issues/425)).

### ♻️ Code Refactoring

- All orphaned documentation comments have been removed from the codebase ([#425](https://github.com/scribe-org/Scribe-iOS/issues/425)).
Expand Down
6 changes: 3 additions & 3 deletions Scribe/AboutTab/AboutViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ extension AboutViewController {

present(mailComposeViewController, animated: true, completion: nil)
} else {
/// Show alert mentioning the email address
// Show alert mentioning the email address.
let alert = UIAlertController(
title: "Send us an email?", message: "Reach out to us at [email protected]", preferredStyle: .alert
)
Expand Down Expand Up @@ -241,12 +241,12 @@ extension AboutViewController {
let currentOffset = scrollView.contentOffset.y

if currentOffset > tableViewOffset {
// Scrolling up
// Scrolling up.
UIView.animate(withDuration: 0.2) {
hostingController.view.alpha = 0
}
} else if currentOffset == tableViewOffset {
// Show the view only when scrolled to the top
// Show the view only when scrolled to the top.
UIView.animate(withDuration: 0.1) {
hostingController.view.alpha = 1
}
Expand Down
38 changes: 0 additions & 38 deletions Scribe/AboutTab/InformationScreenVC.swift
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,6 @@ class InformationScreenVC: UIViewController {
@IBOutlet var textViewPad: UITextView!
var textView: UITextView!

@IBOutlet var cornerImageViewPhone: UIImageView!
@IBOutlet var cornerImageViewPad: UIImageView!
var cornerImageView: UIImageView!

@IBOutlet var iconImageViewPhone: UIImageView!
@IBOutlet var iconImageViewPad: UIImageView!
var iconImageView: UIImageView!

var text: String = ""
var section: SectionState = .privacyPolicy

Expand All @@ -61,35 +53,26 @@ class InformationScreenVC: UIViewController {
contentContainerView = contentContainerViewPad
headingLabel = headingLabelPad
textView = textViewPad
cornerImageView = cornerImageViewPad
iconImageView = iconImageViewPad

scrollViewPhone.removeFromSuperview()
scrollContainerViewPhone.removeFromSuperview()
relativeViewPhone.removeFromSuperview()
contentContainerViewPhone.removeFromSuperview()
headingLabelPhone.removeFromSuperview()
textViewPhone.removeFromSuperview()
cornerImageViewPhone.removeFromSuperview()
iconImageViewPhone.removeFromSuperview()

} else {
scrollContainerView = scrollContainerViewPhone
relativeView = relativeViewPhone
contentContainerView = contentContainerViewPhone
headingLabel = headingLabelPhone
textView = textViewPhone
cornerImageView = cornerImageViewPhone
iconImageView = iconImageViewPhone

scrollViewPad.removeFromSuperview()
scrollContainerViewPad.removeFromSuperview()
relativeViewPad.removeFromSuperview()
contentContainerViewPad.removeFromSuperview()
headingLabelPad.removeFromSuperview()
textViewPad.removeFromSuperview()
cornerImageViewPad.removeFromSuperview()
iconImageViewPad.removeFromSuperview()
}
}

Expand Down Expand Up @@ -122,7 +105,6 @@ class InformationScreenVC: UIViewController {

func setupInformationPageUI() {
setAppTextView()
setCornerImageView()

textView.backgroundColor = .clear
scrollContainerView.backgroundColor = .clear
Expand All @@ -131,24 +113,11 @@ class InformationScreenVC: UIViewController {
contentContainerView.backgroundColor = lightWhiteDarkBlackColor
applyCornerRadius(elem: contentContainerView, radius: contentContainerView.frame.width * 0.05)

cornerImageView.clipsToBounds = true
contentContainerView.clipsToBounds = true

textView.isEditable = false
}

func setCornerImageView() {
if DeviceType.isPhone {
for constraint in cornerImageView.constraints where constraint.identifier == "cornerImageView" {
constraint.constant = 70
}
} else if DeviceType.isPad {
for constraint in cornerImageView.constraints where constraint.identifier == "cornerImageView" {
constraint.constant = 125
}
}
}

func setupPrivacyPolicyPage() {
navigationItem.title = NSLocalizedString("app.about.legal.privacy_policy", value: "Privacy policy", comment: "")
headingLabel.attributedText = NSMutableAttributedString(
Expand Down Expand Up @@ -214,9 +183,6 @@ This POLICY is effective as of the 24th of May, 2022.
textView.linkTextAttributes = [
NSAttributedString.Key.foregroundColor: linkBlueColor
]

iconImageView.image = UIImage.availableIconImage(with: "lock.shield")
iconImageView.tintColor = UITraitCollection.current.userInterfaceStyle == .dark ? scribeCTAColor : keyCharColor
}

func setupLicensesPage() {
Expand All @@ -232,9 +198,6 @@ This POLICY is effective as of the 24th of May, 2022.
textView.linkTextAttributes = [
NSAttributedString.Key.foregroundColor: linkBlueColor
]

iconImageView.image = UIImage.availableIconImage(with: "doc.text")
iconImageView.tintColor = UITraitCollection.current.userInterfaceStyle == .dark ? scribeCTAColor : keyCharColor
}

func setupWikimediaAndScribePage() {
Expand All @@ -247,6 +210,5 @@ This POLICY is effective as of the 24th of May, 2022.
text: wikimediaAndScribeText, fontSize: fontSize, imageWidth: contentContainerView.frame.width * 0.6
)
textView.textColor = keyCharColor
iconImageView.image = UIImage.availableIconImage(with: "wikimediaInfoPage")
}
}
2 changes: 1 addition & 1 deletion Scribe/AppTexts/WikimediaAndScribe.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import SwiftUI
let wikimediaAndScribeTitle = NSLocalizedString("app.about.community.wikimedia", value: "Wikimedia and Scribe", comment: "")
let wikimediaAndScribeCaption = NSLocalizedString("app.about.community.wikimedia.caption", value: "How we work together", comment: "")

let wikimediaAndScribeText1 = "\n" + NSLocalizedString("app.about.community.wikimedia.text_1", value: "Scribe would not be possible without countless contributions by Wikimedia contributors to the many projects that they support. Specifically Scribe makes use of data from the Wikidata Lexicographical data community, as well as data from Wikipedia for each language that Scribe supports.", comment: "") + "\n\n"
let wikimediaAndScribeText1 = NSLocalizedString("app.about.community.wikimedia.text_1", value: "Scribe would not be possible without countless contributions by Wikimedia contributors to the many projects that they support. Specifically Scribe makes use of data from the Wikidata Lexicographical data community, as well as data from Wikipedia for each language that Scribe supports.", comment: "") + "\n\n"
let wikimediaAndScribeText2 = "\n\n" + NSLocalizedString("app.about.community.wikimedia.text_2", value: "Wikidata is a collaboratively edited multilingual knowledge graph hosted by the Wikimedia Foundation. It provides freely available data that anyone can use under a Creative Commons Public Domain license (CC0). Scribe uses language data from Wikidata to provide users with verb conjugations, noun-form annotations, noun plurals, and many other features.", comment: "") + "\n\n"
let wikimediaAndScribeText3 = "\n\n" + NSLocalizedString("app.about.community.wikimedia.text_3", value: "Wikipedia is a multilingual free online encyclopedia written and maintained by a community of volunteers through open collaboration and a wiki-based editing system. Scribe uses data from Wikipedia to produce autosuggestions by deriving the most common words in a language as well as the most common words that follow them.", comment: "") + "\n"

Expand Down
26 changes: 2 additions & 24 deletions Scribe/Base.lproj/AppScreen.storyboard
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="32700.99.1234" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="z4h-ME-igh">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="23094" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="z4h-ME-igh">
<device id="retina5_9" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22685"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23084"/>
<capability name="Named colors" minToolsVersion="9.0"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
Expand Down Expand Up @@ -147,19 +147,6 @@
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="utw-Av-57D" userLabel="ContentContainerViewPhone">
<rect key="frame" x="0.0" y="0.0" width="345" height="263.33333333333331"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="linkCornerBackground" translatesAutoresizingMaskIntoConstraints="NO" id="WCN-LS-ohh" userLabel="CornerImageViewPhone">
<rect key="frame" x="280" y="0.0" width="65" height="65"/>
<constraints>
<constraint firstAttribute="width" constant="65" identifier="cornerImageView" id="FnV-tP-2Hh"/>
<constraint firstAttribute="width" secondItem="WCN-LS-ohh" secondAttribute="height" multiplier="1:1" id="LQo-2d-Plx"/>
</constraints>
</imageView>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="jlT-uf-n6p" userLabel="IconImageViewPhone">
<rect key="frame" x="310.66666666666669" y="4.9999999999999982" width="29.333333333333314" height="29.333333333333329"/>
<constraints>
<constraint firstAttribute="width" secondItem="jlT-uf-n6p" secondAttribute="height" multiplier="1:1" id="NA4-rt-Q1X"/>
</constraints>
</imageView>
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" scrollEnabled="NO" textAlignment="natural" translatesAutoresizingMaskIntoConstraints="NO" id="5si-aN-b15" userLabel="InfoTextViewPhone">
<rect key="frame" x="15" y="15.000000000000014" width="315" height="233.33333333333337"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
Expand All @@ -171,13 +158,8 @@
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="jlT-uf-n6p" firstAttribute="width" secondItem="WCN-LS-ohh" secondAttribute="width" multiplier="0.45" id="AtU-s4-DGC"/>
<constraint firstAttribute="trailing" secondItem="WCN-LS-ohh" secondAttribute="trailing" id="C6F-gj-0X1"/>
<constraint firstAttribute="trailing" secondItem="5si-aN-b15" secondAttribute="trailing" constant="15" id="GZW-qz-Sdz"/>
<constraint firstItem="5si-aN-b15" firstAttribute="leading" secondItem="utw-Av-57D" secondAttribute="leading" constant="15" id="JAB-P5-eWe"/>
<constraint firstAttribute="trailing" secondItem="jlT-uf-n6p" secondAttribute="trailing" constant="5" id="Qg8-uN-j1o"/>
<constraint firstItem="WCN-LS-ohh" firstAttribute="top" secondItem="utw-Av-57D" secondAttribute="top" id="Wmw-8t-6Rb"/>
<constraint firstItem="jlT-uf-n6p" firstAttribute="top" secondItem="utw-Av-57D" secondAttribute="top" constant="5" id="gF1-Bz-aSR"/>
<constraint firstItem="5si-aN-b15" firstAttribute="top" secondItem="utw-Av-57D" secondAttribute="top" constant="15" id="tUH-ih-CCK"/>
<constraint firstAttribute="bottom" secondItem="5si-aN-b15" secondAttribute="bottom" constant="15" id="xOI-5W-7ox"/>
</constraints>
Expand Down Expand Up @@ -232,12 +214,8 @@
<connections>
<outlet property="contentContainerViewPad" destination="8hd-gU-IBe" id="EPP-0N-Z1i"/>
<outlet property="contentContainerViewPhone" destination="utw-Av-57D" id="2qw-tq-nge"/>
<outlet property="cornerImageViewPad" destination="AKE-81-A9j" id="2xT-09-IDc"/>
<outlet property="cornerImageViewPhone" destination="WCN-LS-ohh" id="Kjr-73-jbI"/>
<outlet property="headingLabelPad" destination="QQb-Sb-zfQ" id="Uwk-bl-aHo"/>
<outlet property="headingLabelPhone" destination="Hsr-GS-NQS" id="oUb-sN-G8x"/>
<outlet property="iconImageViewPad" destination="qIq-U8-VFG" id="ZIm-Yr-Lev"/>
<outlet property="iconImageViewPhone" destination="jlT-uf-n6p" id="96Z-OI-L30"/>
<outlet property="relativeViewPad" destination="BdK-Gj-AOl" id="AVm-c6-wST"/>
<outlet property="relativeViewPhone" destination="61J-Jd-qbi" id="oof-TL-fd2"/>
<outlet property="scrollContainerViewPad" destination="E9S-tJ-4qs" id="2Zr-oj-WqG"/>
Expand Down
Loading
Loading