-
Notifications
You must be signed in to change notification settings - Fork 389
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
@W-17411362: LoginActivity Fit and Finish #2668
@W-17411362: LoginActivity Fit and Finish #2668
Conversation
activity.window.decorView.systemUiVisibility = SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR or SYSTEM_UI_FLAG_LIGHT_STATUS_BAR | ||
if (SDK_INT > R) { | ||
runCatching { | ||
activity.window?.insetsController?.setSystemBarsAppearance( |
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.
@brandonpage - Here's a modern way to accomplish what this once did with a dandy to-do so we can clean up once API 30 is our minimum. I did some reading, and though the names have changed the overall approach is almost identical.
@@ -194,6 +195,9 @@ open class LoginActivity: FragmentActivity() { | |||
override fun onCreate(savedInstanceState: Bundle?) { | |||
super.onCreate(savedInstanceState) | |||
enableEdgeToEdge() | |||
if (viewModel.dynamicBackgroundTheme.value == Dark) { |
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.
@brandonpage - I added this new dynamicBackgroundTheme
state so we can know if the view model considers the background "light" or "dark".
libs/SalesforceSDK/src/com/salesforce/androidsdk/ui/LoginViewModel.kt
Outdated
Show resolved
Hide resolved
libs/SalesforceSDK/src/com/salesforce/androidsdk/ui/components/LoginServerBottomSheet.kt
Outdated
Show resolved
Hide resolved
libs/SalesforceSDK/src/com/salesforce/androidsdk/app/SalesforceSDKManager.kt
Show resolved
Hide resolved
Can we get rid of sfDarkLoginColors ? |
Unless Eric has evidence to the contrary I'd say yes. I think the overflow menu and login server picker can respect dark theme (as they always have). The header text/icons shouldn't care because they should respond dynamically to the webiew background color. |
…igation Bar Theme Relative To Dynamic Top Bar Colors)
…o Enable Applied Theme In Login Composable Functions)
…K Manager Theme For Dynamic Background Theme Values)
ff202bb
to
6067faa
Compare
libs/SalesforceSDK/src/com/salesforce/androidsdk/ui/components/LoginView.kt
Outdated
Show resolved
Hide resolved
…Description Update)
…tring Resources In All Login Composables)
@JohnsonEricAtSalesforce Things I was expecting to see in this PR:
|
@@ -1,15 +1,15 @@ | |||
<?xml version="1.0" encoding="utf-8"?> | |||
<resources> | |||
|
|||
<!-- Errors --> |
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.
The leading indentation for this source was pretty mixed, so since we're adding a significant number of lines I thought a gentle reformat to Android Studio's defaults would be helpful.
@@ -117,7 +120,7 @@ fun LoginServerListItem( | |||
}, | |||
label = "offset" | |||
) | |||
var rowSizePixels by remember { mutableStateOf(IntSize(0,0)) } | |||
var rowSizePixels by remember { mutableStateOf(IntSize(0, 0)) } |
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 also gave the login composables a reformat to Android Studio's defaults.
libs/SalesforceSDK/src/com/salesforce/androidsdk/ui/components/LoginServerListItem.kt
Show resolved
Hide resolved
I'm getting these entered in GUS as well. We had some but not all of these under our general finish work item. |
So much of QR Code login is customizable according to the implementation we released in 12.x, including the placement and function of this button, that I feel it belongs to the app. The real kicker in my view there is that MSDK doesn't control what that button actually does. Our template app's example uses one version of image capture logic but each implementation can completely customize that. It's also nice that with the Perhaps our guiding logic should be to add MSDK-provided buttons for features where MSDK controls the logic they expose and let apps use |
…gin components except the show menu button placed over dynamic color)
libs/SalesforceSDK/src/com/salesforce/androidsdk/ui/components/PickerBottomSheet.kt
Show resolved
Hide resolved
…cation Button, Set Up Biometric Authentication Button And Overall Cleanup Of Login Bottom Bar Buttons)
…web view on page start)
🎸 Ready For Final Review! 🥁
This actually got a lot easier today since #2670 included all the bottom sheet styling for select server and add connection (which looks great. Thanks!)
Note: This has a counterpart in the templates repository: https://github.com/forcedotcom/SalesforceMobileSDK-Templates/pull/444/files