-
-
Notifications
You must be signed in to change notification settings - Fork 975
Add new section in settings for Nextcloud apps #2461
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 new section in settings for Nextcloud apps #2461
Conversation
Signed-off-by: Milen Pivchev <[email protected]>
Signed-off-by: Milen Pivchev <[email protected]>
Signed-off-by: Milen Pivchev <[email protected]>
Signed-off-by: Milen Pivchev <[email protected]>
Signed-off-by: Milen Pivchev <[email protected]>
| class CCCellMore: UITableViewCell { | ||
|
|
||
| @IBOutlet weak var labelText: UILabel! | ||
| @IBOutlet weak var imageIcon: UIImageView! | ||
| @IBOutlet weak var separator: UIView! | ||
| @IBOutlet weak var separatorHeigth: NSLayoutConstraint! | ||
|
|
||
| override var frame: CGRect { | ||
| get { | ||
| return super.frame | ||
| } | ||
| set (newFrame) { | ||
| var frame = newFrame | ||
| let newWidth = frame.width * 0.90 | ||
| let space = (frame.width - newWidth) / 2 | ||
| frame.size.width = newWidth | ||
| frame.origin.x += space | ||
| super.frame = frame | ||
| } | ||
| } | ||
| } | ||
|
|
||
| class NCMoreUserCell: UITableViewCell { | ||
|
|
||
| @IBOutlet weak var displayName: UILabel! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These were separated in their own files
| class BaseNCMoreCell: UITableViewCell { | ||
| let selectionColor: UIView = UIView() | ||
| let defaultCornerRadius: CGFloat = 10.0 | ||
|
|
||
| override var frame: CGRect { | ||
| get { | ||
| return super.frame | ||
| } | ||
| set (newFrame) { | ||
| var frame = newFrame | ||
| let newWidth = frame.width * 0.90 | ||
| let space = (frame.width - newWidth) / 2 | ||
| frame.size.width = newWidth | ||
| frame.origin.x += space | ||
| super.frame = frame | ||
| } | ||
| } | ||
|
|
||
| override func awakeFromNib() { | ||
| super.awakeFromNib() | ||
|
|
||
| selectedBackgroundView = selectionColor | ||
| backgroundColor = .secondarySystemGroupedBackground | ||
| layer.cornerRadius = defaultCornerRadius | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code was used for every cell, so I made a base class instead.
Signed-off-by: Milen Pivchev <[email protected]>
Signed-off-by: Milen Pivchev <[email protected]>
|
we could take the opportunity to migrate this simple view into swiftUI and the GUI does not convince me |
Hmm, we could've decided to do this earlier before these changes were made. But I can try nonetheless.
Any suggestions are welcome. We can maybe ask some of our UI designers to design a view. |
was only a consideration.
I have to think about it. |
jancborchardt
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
@jancborchardt you mean this part?
Since we only have 3 of these, should they be stacked left or be centered? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think that these shortcuts should be the first entry in the settings because they can be detrimental to usability and create friction. I would say that settings is probably the wrong place to advertise the presence of other apps, and I suggest something subtler and "dismissable". if we absolutely have to, what about moving them to the bottom of the list?
I see your point. I still need to move this forward however, so if @jancborchardt is ok with this I can move this section to the bottom. |
@mpivchev is there any recommended default or standard? Centered seems good. @marcoambrosini the issue if they are on the bottom is that they will be difficult to discover, defeating the purpose. It is obvious that the vertical list of entries goes on, but it would not be obvious that there is an entirely new element below. |
Signed-off-by: Milen Pivchev <[email protected]>
|
@jancborchardt Here is the new look:
|
|
In iOS Contacts, there is a bit more top and bottom padding inside the entries. Can you adjust that @mpivchev? :) |
|
@jancborchardt Is this better?
|
Signed-off-by: Milen Pivchev <[email protected]>
Signed-off-by: Milen Pivchev <[email protected]>
…add-other-nextcloud-apps-to-settings-as-suggestions Signed-off-by: Milen Pivchev <[email protected]> # Conflicts: # Nextcloud.xcodeproj/project.pbxproj # iOSClient/NCGlobal.swift
Signed-off-by: Milen Pivchev <[email protected]>
Signed-off-by: Milen Pivchev <[email protected]>
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## develop #2461 +/- ##
==========================================
- Coverage 9.03% 8.84% -0.20%
==========================================
Files 185 188 +3
Lines 25747 25799 +52
Branches 9501 9529 +28
==========================================
- Hits 2326 2281 -45
- Misses 23217 23324 +107
+ Partials 204 194 -10
☔ View full report in Codecov by Sentry. |
|
@jancborchardt pinging again in case you missed it |
jancborchardt
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Latest screenshot looks good! :)
|
iOS seems to stretch those buttons if less are available. I just found an example with 4 instead of 5 like in the screenshot above. But I did an additional mockup to show what it might look with only the three options. |
|
Yeah, that seems very nice @hannesfritz! @mpivchev could you adjust them like that? :) |
|
Branch restored so I can reimplement this soon |








This adds a new section in settings to promote our other apps:
If the app is installed, it opens it without doing anything else.
If the app is not installed, it leads to the app store page.
If the "more apps" icon is clicked, it opens a web page with other Nextcloud apps.
Additionally, a new URL scheme was made to add support for other apps to open this app and switch accounts (if account is logged in):
Finally, refactored some of the code and removed duplicate code.