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

[fix/branding refinement] Branding: Color and UI Improvements #1057

Merged
merged 19 commits into from
Nov 12, 2021

Conversation

hosy
Copy link
Collaborator

@hosy hosy commented Oct 20, 2021

Description

  • Setup a complete customer branding with only two color values darkBrandColor and lightBrandColor
  • set all other branding color and style values to optional values
  • ownBrander gomplate script was moved into this repository
  • show always detailed single account view, instead of server list (if only one account is configured) (also for unbranded app)
  • show Add Account in detailed single account view, if can-add-account is true
  • added some default colors for branded builds and regrading which darkBrandColor or lightBrandColor were used
  • added a new color style loginStatusBarStyle to set a custom status bar style for the login view
  • if the key app.version-number exists, fastlane will use this value as app and extension short version number, which gives the possibility to set custom version numbers

Related Issue

https://github.com/owncloud/enterprise/issues/4804
https://github.com/owncloud/enterprise/issues/4759
#1014
https://github.com/owncloud/enterprise/issues/4828

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Simulator Screen Shot - iPhone 12 Pro - 2021-10-20 at 15 08 25

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • Added changelog files for the fixed issues in folder changelog/unreleased

@hosy hosy self-assigned this Oct 20, 2021
@hosy hosy added this to the 11.7.2-Fix milestone Oct 20, 2021
@hosy hosy linked an issue Oct 20, 2021 that may be closed by this pull request
1 task
… app and extension short version number, which gives the possibility to set custom version numbers
if let object = self.viewControllers.last {
let loginController = ["StaticLoginViewController", "StaticLoginSingleAccountServerListViewController"]

if self.presentedViewController == nil, loginController.contains(String(describing: type(of: object))) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: you could add a protocol that can be adopted by StaticLoginViewController and StaticLoginSingleAccountServerListViewController, which could then be used to control the use loginStatusBarStyle rather than statusBarStyle. That would avoid the use of class names as strings and separate responsibilities more clearly, while also avoiding an (impossible to resolve) dependency of ownCloudAppShared on the app or other components.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for that hint! I added a protocol to solve the dependency problem and class name problems.

@@ -243,10 +244,15 @@ public class ThemeCollection : NSObject {
let rowColor : UIColor? = UIColor.black.withAlphaComponent(0.1)
self.tableRowBorderColor = colors.resolveColor("Table.tableRowBorderColor", rowColor)

var defaultTableRowLabelColor = darkColor
if VendorServices.shared.isBranded {
defaultTableRowLabelColor = UIColor(hex: 0x000000)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems very specific. Should this really be the default for all branding, both light and dark?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this should be default for all brandings, but can be overridden by Branding.plist

- added a protocol for setting the custom status bar style, instead of using static class names
- using the correct SDK method for round rect
@hosy
Copy link
Collaborator Author

hosy commented Nov 9, 2021

@felix-schwarz all CR findings are fixed or I added a comment and you can give it a new try. Thanks!

@hosy hosy requested a review from jesmrec November 11, 2021 08:55
@hosy
Copy link
Collaborator Author

hosy commented Nov 11, 2021

@jesmrec not sure, if this one need deeper testing by your side? Most things were tested by @NannaBarz and by you in the 11.7.2 preview version for the customers.

@jesmrec
Copy link
Contributor

jesmrec commented Nov 11, 2021

This was already tested. Testing of such colours and branding options has to be done with a global perspective, taking all of them as a whole. This is a task to be scheduled and done somewhen. This specific PR is OK to be moved forward.

@hosy
Copy link
Collaborator Author

hosy commented Nov 11, 2021

@jesmrec ok, would be cool if you can approve the PR.

@hosy hosy merged commit fa81414 into milestone/11.7.2 Nov 12, 2021
@delete-merged-branch delete-merged-branch bot deleted the fix/branding-refinement branch November 12, 2021 12:28
hosy added a commit that referenced this pull request Dec 1, 2021
* added additional build information to the Branding.plist file:
- ios-app and ios-sdk commit hash
- copy the Branding.plist with additional app and build information as file name

* [feature/biometrical-mdm-setting ]Suggest Biometrical Unlock (#1046)

* Suggest biometrical unlock, after setting up passcode

* - do not show Cancel button, if password is enforced
- update biometrical UI switch value in settings view
- fixed bug, dismissing the view, if biometrical is not available

* moved extension into ownCloudAppShared folder

* Branding: (#1045)

- add new `branding.user-defaults-default-values` class settings key to allow registration of alternative defaults for user defaults

* - fix bug where a quick access entry showed no items when selected a second time. (#1044)

* used better wording for "Cellular transfers"

* - in branded clients: removed UISwitch to enable/disable deletion of available offline files in manage screen
- fixed text center layout in table view cell

* fixed UI issue in sharing view

* #4801 "Log out"  text changes

* #4801 text changes for "Prevent gestures"

* - ThemeTableViewCell, StaticTableViewRow: new .plain message style (#1053)

- add new view controller to present license texts for each component individually

* [feature/modular-localization] Modular localization (#1054)

* - Branding class:
	- move logic for VendorServices.appName to Branding.appDisplayName
	- change app.name variable value to that of Branding.appDisplayName
- switch String.localized from NSLocalizedString() to OCLocale.localize()
- SwiftLint: adapt to latest SwiftLint version

* - add .localized(replacements) function to provide easy access to custom variables support in OCLocale

* - update SDK

* [feature/mdm-auto-connect] Skip Account Screen via MDM (#1056)

* #4801 Skip "Manage" screen / automatically open "Files" screen after login via MDM parameter account.auto-connect

* - SceneDelegate: use .first (which returns nil in case there are no bookmarks) instead of bookmark(at: 0) (which crashes in case there are no bookmarks because the array is empty and the method tries to access an item at index 0)

* added auto-connect after every setup, not only the first setup

Co-authored-by: Felix Schwarz <fs-git@iospirit.com>

* [feature/mdm-biometrical-unlock]  MDM setting for Biometrical Unlock (#1058)

* #4818 control via MDM to auto enable biometrical unlock

* overwrites user defaults with MDM settings and use existing getter/setter; renamed MDM key to use-biometrical-unlock

* - use user defaults for use-biometrical-unlock
- show Face ID authorization immediately after enabling Face ID

* [feature/hide-background-location-settings] Do not show Background Location section by default (#1051)

* #1050 The Background Uploads section should be only shown, if Auto Upload Photos/Videos was enabled. Otherwise the setting section Background Uploads confuses the user, why the disabled options in this section could not be enabled.

* fixed removing table view section

* [fix/branding refinement] Branding: Color and UI Improvements (#1057)

* Fixed branding issues

* - fixed default searchBar background and placeholder text color for branded builds
- show single account server list, if only one account is configured for branded and unbranded builds

* - fixed default (unselected) tab bar color
- added table view section border to branded account table view

* - fixed rounded border for text fields in branded login UI
- removed table row separator in branding login view
- fixed colors in contrast mode, if tint color is white
- fixed UIAlertView tint color

* fixed tint color in UIAlertController in dark mode for branding colors

* fixed color value again

* fixed tint color in single account server list cell view

* fixed missing profile UI

* removed optional branding values (only two color values are now needed for a complete branding, all other values are optional)

* fixed border color in single account server view, if navigationbar background color is white

* added gomplate template for Branding.plist creation to the iOS repo
adopted template for new Parameter and removed default values i template

* fixed some color issues, if tint color is white

* fixed setting custom UISearchBar backgroundColor on iOS 12

* set profile url as prefilled default value into setup url field

* added a new color style loginStatusBarStyle to set a custom status bar style for the login view

* if the key app.version-number exists, fastlane will use this value as app and extension short version number, which gives the possibility to set custom version numbers

* Fixed CR findings:
- added a protocol for setting the custom status bar style, instead of using static class names
- using the correct SDK method for round rect

* fixed merge error

* [fix/branding-login-retry] Retry Section for Branded Login Error (#1047)

* add a error section with a retry button in branded login view

* #4786 added a retry interval of 10 seconds. In this time interval the app retries to establish the connection before a error message will be shown

* only retry for network issues

* only show retry section on network issues

* - changed retry time interval to 30 seconds
- retries minimum of 3 times

* Update ownCloud/Static Login/Interface/StaticLoginSetupViewController.swift

Co-authored-by: Felix Schwarz <fs-git@iospirit.com>

* fixed connection retry and show retry section UI

* HTTP pipeline is ready to schedule HTTP requests before the Static Login View Controller is brought up. Moved it before setting up the UIWindow

* removed connection retries output and put it into the log

Co-authored-by: Felix Schwarz <fs-git@iospirit.com>

* [fix/single-accouont-display-name] Show Display Name in Branded Single Account View (#1049)

* username could be like a uuid, which is not user readable. Instead now showing the displayName and if not available, the userName

* fixed syntax error

* fixed compile error

* first draft for retrieving the user display name for the header view

* retrieving the users display name by init a connection and reloading the table view

* - new version and build number
- new release notes entry

* [feature/appstore-buildflag] Remove App Store / IAP code via build flag (#1052)

* - add support and documentation for DISABLE_APPSTORE_LICENSING build flag

* - ReleaseNotesHostViewController: remove unused reference to StoreKit
- OCLicenseDuration: make sure SKProductSubscriptionPeriod conversion code is excluded when using the DISABLE_APPSTORE_LICENSING build flag

* [fix/clear-lock] Clear lock when determining unlock expiry (#1061)

* - AppLockmanager: clear unlock and lastApplicationBackgroundedDate in case an unlock has expired, to protect against subsequent attempts setting the device time to an earlier date

* - AppLockManager: clear unlocked state if device time is earlier than lastBackgrounded time

* - fix logic bug and improve structure

* - AppLockManager: now returns correct unlock status when detecting that time was turned back

* [feature/custom-app-scheme] Custom app/auth schemes (#1060)

* - add support and documentation for DISABLE_APPSTORE_LICENSING build flag

* - ReleaseNotesHostViewController: remove unused reference to StoreKit
- OCLicenseDuration: make sure SKProductSubscriptionPeriod conversion code is excluded when using the DISABLE_APPSTORE_LICENSING build flag

* - add support for app.custom-app-scheme and app.custom-auth-scheme to Fastfile
- add documentation for new custom scheme Branding.plist parameters

* - remove test values from Branding.plist

* - move build options from `app.` space to `build.` space and rename options accordingly
- add legacy support for previously used Branding.plist build customization option names
- add `BuildOptions` class to `ownCloudApp` framework to make build customization options visible in documentation

* - ensure BuildOptions class is actually loaded/initialized

* - update Xcode to 12.5.1 for GitHub workflow configuration-documentation.yml

* - adapt code in `ImportPasteboardAction.swift` to also compile in Xcode 12.4

* Configuration documentation updated

Co-authored-by: felix-schwarz <felix-schwarz@users.noreply.github.com>
Co-authored-by: Matthias Hühne <mhuehne@owncloud.com>

* - switch to ios-sdk milestone/11.7.2

* add an accesibility id for the access files row, so that it can be matched by the autom tests

* quote shell command, because it can contain spaces in path name

* added public release notes for version 11.8.0

* fixed regression test findings

* fixed toolbar visibility on iPad, if should not be shown

* updated in-app changelog and added calens changelog entries

* Calens changelog updated

* - change SDK to 11.8 release

* - updated fastlane release notes
- changed changelog folder name

* Calens changelog updated

Co-authored-by: Felix Schwarz <fs-git@iospirit.com>
Co-authored-by: felix-schwarz <felix-schwarz@users.noreply.github.com>
Co-authored-by: Jesus Recio <jrecio@izertis.com>
Co-authored-by: hosy <hosy@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE REQUEST] Compact Account List (one Account)
3 participants