Skip to content

Commit

Permalink
[milestone/11.4.3] Milestone 11.4.3 (bugfixes) (#834)
Browse files Browse the repository at this point in the history
* - SortBar: disable hidden items to also remove it from VoiceOver
- StaticTableViewRow: no longer embed controls directly into a UITableViewCell, but in their .contentView instead, fixing an issue with "blocked" controls in iOS 14.2 where the UITableViewCell's content view would be layered on top and consume all taps

* - StaticTableViewRow: adapt dater picker to iOS 14 (also tested style .inline, but that seems to be broken as of iOS 14.2, collapsing the month name)

* - fix UIWindow / UIScene conflict issue

* - updated build and version number
- updated release notes for 11.4.3

* - StaticTableViewRow: avoid duplicate constraint code

* - SortBar: add .accessibilityElementsHidden and posting of UIAccessibility layout change notification to inform VoiceOver

* updated changelog and fastlane release notes

* switching back to the latest master SDK commit

* fixed empty "Fake" view controller on new back history stack on iOS 14, when first view controller in stack was selected

* - setting a view title for the new back button history stack
- disable to use the view title as back button title, use generic "Back" instead

Co-authored-by: Matthias Hühne <[email protected]>
  • Loading branch information
felix-schwarz and hosy authored Nov 17, 2020
1 parent 6c38454 commit f6fc67c
Show file tree
Hide file tree
Showing 11 changed files with 112 additions and 81 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# ChangeLog

## Release version 11.4.3 (Mid-November 2020)

- Fix: iOS 14 UI Adaptions (#834)

## Release version 11.4.2 (November 2020)

- Support for new Display Sizes
Expand Down
19 changes: 2 additions & 17 deletions fastlane/metadata-emm/en-US/release_notes.txt
Original file line number Diff line number Diff line change
@@ -1,18 +1,3 @@
• Support for new Display Sizes
We supporting all upcoming new display sizes with native screen resolution.

• Favorites in Directory Picker
We added access to the favorite items directly from the directory picker.

• Rename Filename in Scan View
Now it is easier to rename a filename in the scan view by preselecting the filename.

• Fix: Save Attachments from Mail.app
Saving attachments from iOS Mail.app was broken via the share sheet.

• Fix: Authentication Error in FileProvider
Notifies the user with a notification if authentication fails in File Provider.

• Fix: New Folder in FileProvider
A newly created folder in File Provider was not selectable.
• Fix: iOS 14 UI Adaptions
Fixed some problems on iOS 14, with unresponsive UI elements.

19 changes: 2 additions & 17 deletions fastlane/metadata-owncloud-online/en-US/release_notes.txt
Original file line number Diff line number Diff line change
@@ -1,18 +1,3 @@
• Support for new Display Sizes
We supporting all upcoming new display sizes with native screen resolution.

• Favorites in Directory Picker
We added access to the favorite items directly from the directory picker.

• Rename Filename in Scan View
Now it is easier to rename a filename in the scan view by preselecting the filename.

• Fix: Save Attachments from Mail.app
Saving attachments from iOS Mail.app was broken via the share sheet.

• Fix: Authentication Error in FileProvider
Notifies the user with a notification if authentication fails in File Provider.

• Fix: New Folder in FileProvider
A newly created folder in File Provider was not selectable.
• Fix: iOS 14 UI Adaptions
Fixed some problems on iOS 14, with unresponsive UI elements.

19 changes: 2 additions & 17 deletions fastlane/metadata/en-US/release_notes.txt
Original file line number Diff line number Diff line change
@@ -1,18 +1,3 @@
• Support for new Display Sizes
We supporting all upcoming new display sizes with native screen resolution.

• Favorites in Directory Picker
We added access to the favorite items directly from the directory picker.

• Rename Filename in Scan View
Now it is easier to rename a filename in the scan view by preselecting the filename.

• Fix: Save Attachments from Mail.app
Saving attachments from iOS Mail.app was broken via the share sheet.

• Fix: Authentication Error in FileProvider
Notifies the user with a notification if authentication fails in File Provider.

• Fix: New Folder in FileProvider
A newly created folder in File Provider was not selectable.
• Fix: iOS 14 UI Adaptions
Fixed some problems on iOS 14, with unresponsive UI elements.

16 changes: 8 additions & 8 deletions ownCloud.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -4452,8 +4452,8 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
APP_SHORT_VERSION = 11.4.2;
APP_VERSION = 177;
APP_SHORT_VERSION = 11.4.3;
APP_VERSION = 178;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
Expand Down Expand Up @@ -4515,8 +4515,8 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
APP_SHORT_VERSION = 11.4.2;
APP_VERSION = 177;
APP_SHORT_VERSION = 11.4.3;
APP_VERSION = 178;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
Expand Down Expand Up @@ -4571,8 +4571,8 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
APP_SHORT_VERSION = 11.4.2;
APP_VERSION = 177;
APP_SHORT_VERSION = 11.4.3;
APP_VERSION = 178;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = ownCloud/ownCloud.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
Expand Down Expand Up @@ -4604,8 +4604,8 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
APP_SHORT_VERSION = 11.4.2;
APP_VERSION = 177;
APP_SHORT_VERSION = 11.4.3;
APP_VERSION = 178;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = ownCloud/ownCloud.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
Expand Down
7 changes: 5 additions & 2 deletions ownCloud/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,11 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
rootViewController = navigationController
}

window?.rootViewController = rootViewController!
window?.makeKeyAndVisible()
if !UIDevice.current.isIpad {
// Only set up window on non-iPad devices
window?.rootViewController = rootViewController!
window?.makeKeyAndVisible()
}

ImportFilesController.removeImportDirectory()

Expand Down
15 changes: 14 additions & 1 deletion ownCloud/Client/ClientRootViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ protocol ClientRootViewControllerAuthenticationDelegate : class {
func handleAuthError(for clientViewController: ClientRootViewController, error: NSError, editBookmark: OCBookmark?, preferredAuthenticationMethods: [OCAuthenticationMethodIdentifier]?)
}

class ClientRootViewController: UITabBarController, BookmarkContainer, ToolAndTabBarToggling {
class ClientRootViewController: UITabBarController, BookmarkContainer, ToolAndTabBarToggling, UINavigationControllerDelegate {

// MARK: - Constants
let folderButtonsSize: CGSize = CGSize(width: 25.0, height: 25.0)
Expand Down Expand Up @@ -277,6 +277,18 @@ class ClientRootViewController: UITabBarController, BookmarkContainer, ToolAndTa
})
}

func navigationController(_ navigationController: UINavigationController,
willShow viewController: UIViewController,
animated: Bool) {
if viewController == emptyViewController {
closeClient()
if #available(iOS 13.0, *) {
// Prevent re-opening of items on next launch in case user has returned to the bookmark list
view.window?.windowScene?.userActivity = nil
}
}
}

func coreReady(_ lastVisibleItemId: String?) {
OnMainThread {
if let core = self.core {
Expand All @@ -290,6 +302,7 @@ class ClientRootViewController: UITabBarController, BookmarkContainer, ToolAndTa
}

let emptyViewController = self.emptyViewController
emptyViewController.navigationController?.delegate = self
if VendorServices.shared.isBranded, !VendorServices.shared.canAddAccount {
emptyViewController.navigationItem.title = "Manage".localized
} else {
Expand Down
17 changes: 17 additions & 0 deletions ownCloud/Release Notes/ReleaseNotes.plist
Original file line number Diff line number Diff line change
Expand Up @@ -813,6 +813,23 @@ Users can choose to prefer the original photo instead of an edited version and a
</dict>
</array>
</dict>
<dict>
<key>Version</key>
<string>11.4.3</string>
<key>ReleaseNotes</key>
<array>
<dict>
<key>Title</key>
<string>Fix: iOS 14 UI Adaptions</string>
<key>Subtitle</key>
<string>Fixed some problems on iOS 14, with unresponsive UI elements.</string>
<key>Type</key>
<string>Fix</string>
<key>ImageName</key>
<string>bandage</string>
</dict>
</array>
</dict>
</array>
</dict>
</plist>
Original file line number Diff line number Diff line change
Expand Up @@ -608,6 +608,12 @@ extension ClientQueryViewController {
if lastPathComponent.isRootPath, let shortName = core?.bookmark.shortName {
self.navigationItem.title = shortName
} else {
if #available(iOS 14.0, *) {
self.navigationItem.backButtonDisplayMode = .generic
let lastPathComponent = (query.queryPath as NSString?)!.lastPathComponent
self.title = lastPathComponent
}

let titleButton = UIButton()
titleButton.setTitle(lastPathComponent, for: .normal)
titleButton.titleLabel?.font = UIFont.systemFont(ofSize: 17, weight: .semibold)
Expand Down
22 changes: 21 additions & 1 deletion ownCloudAppShared/Client/User Interface/SortBar.swift
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ public class SortBar: UIView, Themeable, UIPopoverPresentationControllerDelegate
public var showSelectButton: Bool = false {
didSet {
selectButton?.isHidden = !showSelectButton
selectButton?.accessibilityElementsHidden = !showSelectButton
selectButton?.isEnabled = showSelectButton

UIAccessibility.post(notification: .layoutChanged, argument: nil)
}
}

Expand Down Expand Up @@ -152,6 +156,8 @@ public class SortBar: UIView, Themeable, UIPopoverPresentationControllerDelegate

sortSegmentedControl.selectedSegmentIndex = SortMethod.all.index(of: sortMethod)!
sortSegmentedControl.isHidden = true
sortSegmentedControl.accessibilityElementsHidden = true
sortSegmentedControl.isEnabled = false
sortSegmentedControl.addTarget(self, action: #selector(sortSegmentedControllerValueChanged), for: .valueChanged)

// Sort Button
Expand All @@ -171,6 +177,8 @@ public class SortBar: UIView, Themeable, UIPopoverPresentationControllerDelegate
])

sortButton.isHidden = true
sortButton.accessibilityElementsHidden = true
sortButton.isEnabled = false
sortButton.addTarget(self, action: #selector(presentSortButtonOptions), for: .touchUpInside)

selectButton.setImage(UIImage(named: "select"), for: .normal)
Expand All @@ -186,14 +194,16 @@ public class SortBar: UIView, Themeable, UIPopoverPresentationControllerDelegate
selectButton.rightAnchor.constraint(lessThanOrEqualTo: self.safeAreaLayoutGuide.rightAnchor, constant: -rightPadding),
selectButton.heightAnchor.constraint(equalToConstant: sideButtonsSize.height),
selectButton.widthAnchor.constraint(equalToConstant: sideButtonsSize.width)
])
])
}

// Finalize view setup
self.accessibilityIdentifier = "sort-bar"
Theme.shared.register(client: self)

selectButton?.isHidden = !showSelectButton
selectButton?.accessibilityElementsHidden = !showSelectButton
selectButton?.isEnabled = showSelectButton
updateForCurrentTraitCollection()
}

Expand Down Expand Up @@ -225,11 +235,21 @@ public class SortBar: UIView, Themeable, UIPopoverPresentationControllerDelegate
switch (traitCollection.horizontalSizeClass, traitCollection.verticalSizeClass) {
case (.compact, .regular):
sortSegmentedControl?.isHidden = true
sortSegmentedControl?.accessibilityElementsHidden = true
sortSegmentedControl?.isEnabled = false
sortButton?.isHidden = false
sortButton?.accessibilityElementsHidden = false
sortButton?.isEnabled = true
default:
sortSegmentedControl?.isHidden = false
sortSegmentedControl?.accessibilityElementsHidden = false
sortSegmentedControl?.isEnabled = true
sortButton?.isHidden = true
sortButton?.accessibilityElementsHidden = true
sortButton?.isEnabled = false
}

UIAccessibility.post(notification: .layoutChanged, argument: nil)
}

// MARK: - Sort Direction Title
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -781,29 +781,42 @@ open class StaticTableViewRow : NSObject, UITextFieldDelegate {
self.identifier = identifier

let datePickerView = UIDatePicker()
datePickerView.translatesAutoresizingMaskIntoConstraints = false
datePickerView.date = dateValue
datePickerView.datePickerMode = .date
if #available(iOS 14, *) {
datePickerView.preferredDatePickerStyle = .wheels
datePickerView.setContentCompressionResistancePriority(.required, for: .vertical)
}
datePickerView.minimumDate = Date()
datePickerView.maximumDate = maximumDate
datePickerView.accessibilityIdentifier = identifier
datePickerView.addTarget(self, action: #selector(datePickerValueChanged(_:)), for: UIControl.Event.valueChanged)
datePickerView.translatesAutoresizingMaskIntoConstraints = false
datePickerView.setValue(Theme.shared.activeCollection.tableRowColors.labelColor, forKey: "textColor")

self.cell = ThemeTableViewCell(style: .default, reuseIdentifier: nil)
self.cell?.selectionStyle = .none
self.cell?.addSubview(datePickerView)
self.cell?.contentView.addSubview(datePickerView)

self.value = dateValue
self.action = action

datePickerView.layoutIfNeeded()

if let cell = self.cell {
NSLayoutConstraint.activate([
datePickerView.leftAnchor.constraint(equalTo: cell.safeAreaLayoutGuide.leftAnchor),
datePickerView.rightAnchor.constraint(equalTo: cell.safeAreaLayoutGuide.rightAnchor),
datePickerView.topAnchor.constraint(equalTo: cell.topAnchor),
datePickerView.heightAnchor.constraint(equalToConstant: 216.0)
])
var constraints : [NSLayoutConstraint] = [
datePickerView.leftAnchor.constraint(equalTo: cell.contentView.safeAreaLayoutGuide.leftAnchor),
datePickerView.rightAnchor.constraint(equalTo: cell.contentView.safeAreaLayoutGuide.rightAnchor),
datePickerView.topAnchor.constraint(equalTo: cell.contentView.topAnchor),
]

if #available(iOS 14, *) {
constraints.append(datePickerView.bottomAnchor.constraint(equalTo: cell.contentView.bottomAnchor))
} else {
constraints.append(datePickerView.heightAnchor.constraint(equalToConstant: 216.0))
}

NSLayoutConstraint.activate(constraints);
}
}

Expand All @@ -827,18 +840,18 @@ open class StaticTableViewRow : NSObject, UITextFieldDelegate {

cell = ThemeTableViewCell(style: .default, reuseIdentifier: nil)
cell?.selectionStyle = .none
cell?.addSubview(slider)
cell?.contentView.addSubview(slider)
type = .slider

self.value = value
self.action = action

if let cell = self.cell {
NSLayoutConstraint.activate([
slider.leftAnchor.constraint(equalTo: cell.safeAreaLayoutGuide.leftAnchor, constant: 20),
slider.rightAnchor.constraint(equalTo: cell.safeAreaLayoutGuide.rightAnchor, constant: -20),
slider.topAnchor.constraint(equalTo: cell.topAnchor),
slider.bottomAnchor.constraint(equalTo: cell.bottomAnchor)
slider.leftAnchor.constraint(equalTo: cell.contentView.safeAreaLayoutGuide.leftAnchor, constant: 20),
slider.rightAnchor.constraint(equalTo: cell.contentView.safeAreaLayoutGuide.rightAnchor, constant: -20),
slider.topAnchor.constraint(equalTo: cell.contentView.topAnchor),
slider.bottomAnchor.constraint(equalTo: cell.contentView.bottomAnchor)
])
}
}
Expand All @@ -853,7 +866,7 @@ open class StaticTableViewRow : NSObject, UITextFieldDelegate {

cell = ThemeTableViewCell(style: .default, reuseIdentifier: nil)
cell?.selectionStyle = .none
cell?.addSubview(customView)
cell?.contentView.addSubview(customView)

self.action = action

Expand All @@ -864,10 +877,10 @@ open class StaticTableViewRow : NSObject, UITextFieldDelegate {

// Insets
constraints = [
customView.leftAnchor.constraint(equalTo: cell.leftAnchor, constant: inset?.left ?? 0),
customView.rightAnchor.constraint(equalTo: cell.rightAnchor, constant: -(inset?.right ?? 0)),
customView.topAnchor.constraint(equalTo: cell.topAnchor, constant: inset?.top ?? 0),
customView.bottomAnchor.constraint(equalTo: cell.bottomAnchor, constant: -(inset?.bottom ?? 0))
customView.leftAnchor.constraint(equalTo: cell.contentView.leftAnchor, constant: inset?.left ?? 0),
customView.rightAnchor.constraint(equalTo: cell.contentView.rightAnchor, constant: -(inset?.right ?? 0)),
customView.topAnchor.constraint(equalTo: cell.contentView.topAnchor, constant: inset?.top ?? 0),
customView.bottomAnchor.constraint(equalTo: cell.contentView.bottomAnchor, constant: -(inset?.bottom ?? 0))
]

// Fixed height
Expand Down

0 comments on commit f6fc67c

Please sign in to comment.