Conversation
Sources/VLCSettingsController.m
Outdated
There was a problem hiding this comment.
I'm aware that this is a WIP so I'm just going to leave a single comment! 😄
What would you think about using [NSLayoutConstraint activateConstraints:@[];?
There was a problem hiding this comment.
I didn't know that was a thing! Definitely makes it look cleaner :D
There was a problem hiding this comment.
If you don't mind, please put more comments on stuff! I'm kinda stuck on most things anyways 🤦♂️
There was a problem hiding this comment.
Yes, and if we trust the documentation, it's even sometimes faster! 😄
There was a problem hiding this comment.
How do I go about adding a new string that needs to be localized??
There was a problem hiding this comment.
You need to add constants and their plain text counter-part to the en.lproj's "Root.strings" within the Settings.bundle.
There was a problem hiding this comment.
Same thing here. Needs localization
Mikanbu
left a comment
There was a problem hiding this comment.
Thanks for your work, you will find some small comments/thoughts in line~
Sources/VLCSettingsController.m
Outdated
There was a problem hiding this comment.
I think we can remove this bit of code since we don't support pre-iOS 6 anymore?
Sources/VLCSettingsController.m
Outdated
There was a problem hiding this comment.
I think we should consider using a macro at the top for the default values.
For example something like:
#define SETTINGS_HEADER_HEIGHT 64
We could also use a const for this if you prefer.
There was a problem hiding this comment.
Yes, that's a good idea and matches what we have in other classes.
Sources/VLCSettingsController.m
Outdated
There was a problem hiding this comment.
Are you sure about the About ☜(゚ヮ゚☜) string the right localization identifier?
There was a problem hiding this comment.
showAbout: as selector would be better :) The controller is not pushed
Sources/VLCSettingsController.m
Outdated
There was a problem hiding this comment.
What would you think about having a dynamic height?(mostly for accessibility reasons)
Like for example what @carolanitz did in bf01cc4
There was a problem hiding this comment.
You need to add constants and their plain text counter-part to the en.lproj's "Root.strings" within the Settings.bundle.
Sources/VLCSettingsController.m
Outdated
Sources/VLCSettingsController.m
Outdated
There was a problem hiding this comment.
Yes, that's a good idea and matches what we have in other classes.
Sources/VLCSettingsController.m
Outdated
There was a problem hiding this comment.
Can we generalize that font configuration similar to the way we handle colors in a global sense?
Sources/VLCSettingsController.m
Outdated
|
With 672bda1, the privacy cell is in the same section as the theme cell as shown in the mockup! |
Sources/VLCSettingsController.m
Outdated
There was a problem hiding this comment.
no hacks, please. If you want to ensure the correct height that leaves enough room you overwrite a cells systemLayoutSizeFittingSize or something like that. There are a bunch of articles on how to achieve this. Your implementation will not leave enough room when you have large text which is what you wanted if I understand the automatic dimension correctly. This will also make the MinimumSettingsrowheight obsolete
|
Sorry, small nitpicking again 😄 |
carolanitz
left a comment
There was a problem hiding this comment.
Looks already really good. There is a bunch of code that should probably be pulled out of the settingscontroller class and possibly even the file though :)
Sources/VLCSettingsController.m
Outdated
There was a problem hiding this comment.
do we really need all of these imports ?
Sources/VLCSettingsController.m
Outdated
There was a problem hiding this comment.
showAbout: as selector would be better :) The controller is not pushed
Sources/VLCSettingsController.m
Outdated
There was a problem hiding this comment.
do we need the IBAction here and the sender? I mean I don't care really but It's always a sign that something is connected over Interface Builder which is not the case here
There was a problem hiding this comment.
Don't know what I was thinking :p Rookie mistake!
Sources/VLCSettingsController.m
Outdated
There was a problem hiding this comment.
this should be presented now since it's not part of the Tableview
There was a problem hiding this comment.
I think we also need that actually in the local network screen
There was a problem hiding this comment.
^ This really needs to be consistent throughout the app. Can we adjust this in the local network screen as well as part of this PR but in a separate commit?
Sources/VLCSettingsController.m
Outdated
There was a problem hiding this comment.
can go away if you set the rowheight property up top
There was a problem hiding this comment.
I tried what you suggested but I think this is necessary to override the heightForRowAtIndexPath already declared in its parent class IASKSettingsViewController
Sources/VLCSettingsController.m
Outdated
There was a problem hiding this comment.
This will "break" and by that I mean the separator will be too short when you rotate the view since you set a static frame
Sources/VLCSettingsController.m
Outdated
There was a problem hiding this comment.
Can we write cell subclasses for this and not cram everything in this method and viewcontroller? Also magic numbers. By having subclass in an extra file we should also be able to remove some of the above imports I reckon, which will make the entire thing more readable
There was a problem hiding this comment.
VLCSettingsTableViewCell.h/m has been created!
Sources/VLCSettingsController.m
Outdated
Sources/VLCSettingsController.m
Outdated
There was a problem hiding this comment.
no hacks, please. If you want to ensure the correct height that leaves enough room you overwrite a cells systemLayoutSizeFittingSize or something like that. There are a bunch of articles on how to achieve this. Your implementation will not leave enough room when you have large text which is what you wanted if I understand the automatic dimension correctly. This will also make the MinimumSettingsrowheight obsolete
0145c93 to
9d3b8a0
Compare
There was a problem hiding this comment.
This was required to silence auto layout warnings. See https://stackoverflow.com/a/35053234/4064189
There was a problem hiding this comment.
could you try giving the constraints a priority of 999. This allows them to break temporarily while the height or width is 0
Sources/VLCSettingsController.m
Outdated
Sources/VLCSettingsTableViewCell.m
Outdated
There was a problem hiding this comment.
can we write new files in swift?
There was a problem hiding this comment.
also prepare for reuse is missing
There was a problem hiding this comment.
^ This really needs to be consistent throughout the app. Can we adjust this in the local network screen as well as part of this PR but in a separate commit?
Sources/AppearanceManager.swift
Outdated
There was a problem hiding this comment.
could you try giving the constraints a priority of 999. This allows them to break temporarily while the height or width is 0
There was a problem hiding this comment.
separators usually have a height of 1 or 0.5 even why the 2?
There was a problem hiding this comment.
Figma mockups say 2 but changing it to 1 ended up looking a lot better
There was a problem hiding this comment.
this font shouldn't be defined here
Sources/VLCSettingsTableViewCell.m
Outdated
There was a problem hiding this comment.
switch over the specifier.type
Sources/VLCSettingsController.m
Outdated
There was a problem hiding this comment.
value is too vague can we have a variable instead and a couple of checks that the object that you try to get out of there is really the type that you expect?
There was a problem hiding this comment.
All type checks are done by configureForSpecifier for different types of cells with functions from InAppSettingsKit :D
Sources/VLCSettingsTableViewCell.m
Outdated
There was a problem hiding this comment.
could we have the entire cell be a touch target and not the switch itself?
0b5ace7 to
c069cf8
Compare
c218603 to
e3ada4e
Compare
carolanitz
left a comment
There was a problem hiding this comment.
This looks already a lot better!!
I checked the PR out and constraints seem to break. I don't think you really need to have a designated xib for that since you just have the two labels in there. You can use the UITableviewCells ones for this. The subclass itself definitely makes sense. I'm not sure if Louis really wants to deviate from the standard cellheight here but if so we will find a simpler solution than creating a xib with a bunch of constraints to accomodate that and that can go into a separate PR as well
Sources/VLCSettingsController.m
Outdated
There was a problem hiding this comment.
can we move the self.tableview.heightForRow = UIDimensionAutomatic here as well?
Sources/VLCSettingsController.m
Outdated
There was a problem hiding this comment.
IASKSpecifier *specifier = [self.settingsReader specifierForIndexPath:indexPath];
Bool cellHasSlider = [specifier.type isEqual: kIASKPSSliderSpecifier];
return cellHasSlider ? nil : indexPath;
would that be more obvious ? We can leave it as is, just as a suggestion :)
Btw seeing the kIASKPSToggleSwitchSpecifier a few lines down as well I wonder if that shouldn't be included here
There was a problem hiding this comment.
The kIASKPSToggleSwitchSpecifier is to allow users to toggle the switch by pressing the cell. Is this not what you meant by have the entire cell be a touch target and not the switch itself? 🤔
There was a problem hiding this comment.
oh yeah you're right if we include it here the event wouldn't go through. can we just make sure that it doesn't get the grey selectionstate when you select the cell?
There was a problem hiding this comment.
can we not use the Textlabel and detaillabel from the UItableViewCell ?
There was a problem hiding this comment.
that would happen automatically if you use the standard elements
Sources/VLCSettingsController.m
Outdated
There was a problem hiding this comment.
can be removed if the separatorStyle is none
9302d4a to
dbdd06e
Compare
|
merged with ff9342f and following |
|
@ALL thanks for all the comments guys! this was a big one :D |



Checklist
bundle exec fastlane testfrom the root directory to see all new and existing tests passbundle exec fastlane lintto ensure the code style is validDescription
Settings view has been updated to match the mockups on Figma (almost)
There are still couple of things that need to be fixed but thought I would open this PR to share with you guys what I have so far 😄