Closed acb-mv closed 1 day ago
ios/MullvadVPN/View controllers/Settings/Obfuscation/ShadowsocksObfuscationSettingsView.swift
line 52 at r2 (raw file):
I agree that it looks horrible. I could set the width of the `TextField`'s frame in points, but not in characters. Given that the text size could change, padding the string with spaces is the least-worst option.
The other option would be to wrap the TextField
in a ZStack
, placing a Text("00000")
or similar beneath it for sizing. Which we can do, though it doesn't quite sound like less of a hack.
ios/MullvadVPN/View controllers/Settings/Obfuscation/ShadowsocksObfuscationSettingsView.swift
line 52 at r2 (raw file):
We currently hard code 100 px for `SettingsInputCell` (used in wireguard port). I think we should use that for now here too.
Given that SwiftUI automatically scales text with the user's preferences (yes, we get Dynamic Text for free), this will break horribly the first time a person with poor eyesight and extra-large phone text uses our app. We could nerf Dynamic Text and hardwire everything to fixed sizes, but that would be a retrograde step.
ios/MullvadVPN/View controllers/Settings/SwiftUI components/SingleChoiceList.swift
line 217 at r9 (raw file):
The default background color should be dark, focused white. Check out `SettingsInputCell` for the correct colors.
Should we be using the SearchTextField
colours, given that this is not a search field?
🚨 End to end tests failed. Please check the failed workflow run.
Create the SwiftUI-based Shadowsocks port configuration page.
This uses the same
SingleChoiceList
element created forIOS-880
. However, since the UI is more complex, as custom user-entered ports are allowed, this element has been extended to implement this functionality (In fact, most of the changes in this PR are toSingleChoiceList
). Documentation and examples (in SwiftUI Previews) have been added for this element as well, as it should prove reusable for other screens.A screen recording of the UI is attached:
https://github.com/user-attachments/assets/863dd0d7-9c85-4a54-ab85-bca6bd311b9e
This change is