-
Notifications
You must be signed in to change notification settings - Fork 136
[POS as a Tab] Persist Value for Site #14218
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
Conversation
📲 You can test the changes from this Pull Request in WooCommerce-Wear Android by scanning the QR code below to install the corresponding build.
|
|
📲 You can test the changes from this Pull Request in WooCommerce Android by scanning the QR code below to install the corresponding build.
|
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.
Thanks @toupper, the code works as expected. I left one minor suggestions.
I noticed detekt is failing and you recently asked about a pre-commit/pre-push hooks. Here is a pre-push hook I created after our conversation. It essentially runs detekt and then out-loud reads Detekt Passed or Detekt Failed, which is quite convenient if you want to switch to a different context but want to make sure you don't forget. (if you are pushing through AS, make sure to mark enable-hooks checkbox).
#!/bin/bash
echo "Running detekt check..."
./gradlew detektAll
EXIT_CODE=$?
if [ $EXIT_CODE -ne 0 ]; then
echo "***********************************************"
echo " Detekt failed "
echo " Please fix the above issues before pushing "
echo "***********************************************"
say "Detekt failed" 2>/dev/null || true
exit 1 # This will block the push
else
echo "Detekt passed successfully!"
say "Detekt passed" 2>/dev/null || true
exit 0 # Allow the push to proceed
fi
WooCommerce/src/main/kotlin/com/woocommerce/android/ui/woopos/tab/WooPosTabController.kt
Outdated
Show resolved
Hide resolved
|
Thanks for the pre-push hook @malinajirka! That looks great, to avoid forgetting it as in this case. |
Closes WOOMOB-620
Description
With this PR, we persist whether the POS tab was shown for a site in the last run, so we can show it as soon as possible. This makes it easier to jump to POS faster. Read more about this idea in the original issue or this PR woocommerce/woocommerce-ios#15753
Steps to reproduce
The tests that have been performed
Site switching, default values, login.
Images/gif
Before
Even if it happens quite fast, note how the tab takes a while to be shown.
Screen_Recording_20250619_120716_Woo.Pre-Alpha.mp4
After
Screen_Recording_20250619_120428_Woo.Pre-Alpha.mp4
RELEASE-NOTES.txtif necessary. Use the "[Internal]" label for non-user-facing changes.