Skip to content

Conversation

@JorgeMucientes
Copy link
Contributor

@JorgeMucientes JorgeMucientes commented Sep 16, 2025

Closes WOOMOB-1350

Description

This PR adds a new Bookings tab to the bottom navigation bar:

  • Overrides the maximum limit of 5 tabs to enable showing/hiding tabs dynamically
  • Adds new BookingsTabController to check if bookings tabs should be shown when the app is resumed.

This PR doesn't include:

  • Logic to check if the users is CIAB
  • Logic to check if the user has bookable products published
  • Unit tests for BookingsTabController and ShowBookingsTab those will be added once the logic the missing logic fron the above 2 points is added.

Testing information

  1. Run the app in debug mode and check a new Bookings tab is shown
  2. Run the app in release mode and check the Bookings tab is not visible

The tests that have been performed

The above ☝🏼

Images/gif

Screen_recording_20250916_202317.mp4
  • I have considered if this change warrants release notes and have added them to RELEASE-NOTES.txt if necessary. Use the "[Internal]" label for non-user-facing changes.

@dangermattic
Copy link
Collaborator

dangermattic commented Sep 16, 2025

3 Warnings
⚠️ Class BookingsTabController is missing tests, but unit-tests-exemption label was set to ignore this.
⚠️ Class ShowBookingsTab is missing tests, but unit-tests-exemption label was set to ignore this.
⚠️ This PR is assigned to the milestone 23.3. This milestone is due in less than 2 days.
Please make sure to get it merged by then or assign it to a milestone with a later deadline.
1 Message
📖

This PR contains changes to Tracks-related logic. Please ensure (author and reviewer) the following are completed:

  • The tracks events must be validated in the Tracks system.
  • Verify the internal Tracks spreadsheet has also been updated.
  • Please consider registering any new events.
  • The PR must be assigned the category: tracks label.

Generated by 🚫 Danger

@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Sep 16, 2025

📲 You can test the changes from this Pull Request in WooCommerce Android by scanning the QR code below to install the corresponding build.

App Name WooCommerce Android
Platform📱 Mobile
FlavorJalapeno
Build TypeDebug
Commit3b1c9cb
Direct Downloadwoocommerce-prototype-build-pr14621-3b1c9cb.apk

@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Sep 16, 2025

📲 You can test the changes from this Pull Request in WooCommerce-Wear Android by scanning the QR code below to install the corresponding build.
App Name WooCommerce-Wear Android
Platform⌚️ Wear OS
FlavorJalapeno
Build TypeDebug
Commit3b1c9cb
Direct Downloadwoocommerce-wear-prototype-build-pr14621-3b1c9cb.apk

@JorgeMucientes JorgeMucientes added category: tracks Related to analytics, including Tracks Events. unit-tests-exemption labels Sep 16, 2025
@JorgeMucientes JorgeMucientes marked this pull request as ready for review September 16, 2025 18:49
@AdamGrzybkowski AdamGrzybkowski self-assigned this Sep 17, 2025
Copy link
Contributor

@AdamGrzybkowski AdamGrzybkowski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 🚢

Comment on lines +10 to +11
// Add here: Fetch if site has any published bookable product AND if site is CIAB
return@withContext Result.success(FeatureFlag.BOOKINGS_MVP.isEnabled())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JorgeMucientes Do you want to update this logic now, given there's new code in trunk to check for CIAB sites?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the suggestion. I'll address that as part of WOOMOB-1351

@AdamGrzybkowski
Copy link
Contributor

AdamGrzybkowski commented Sep 17, 2025

@JorgeMucientes I've noticed the events are not registered - I believe it's not a strong requirement, correct?

Co-authored-by: Adam Grzybkowski <agrzybkowski@outlook.com>
@JorgeMucientes
Copy link
Contributor Author

@JorgeMucientes I've noticed the events are not registered - I believe it's not a strong requirement, correct?

Good catch. Actually, in a fairly recent conversation, it was decided that registering events is now mandatory p1749551598595309-slack-C03L1NF1EA3

So good reminder! I initiated registration here:

# Conflicts:
#	WooCommerce/src/main/kotlin/com/woocommerce/android/util/FeatureFlag.kt
@JorgeMucientes JorgeMucientes merged commit 8e165c0 into trunk Sep 17, 2025
15 of 17 checks passed
@JorgeMucientes JorgeMucientes deleted the issue/woomob-1307-android-bookings-tab branch September 17, 2025 15:18
@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 11.42857% with 31 lines in your changes missing coverage. Please review.
✅ Project coverage is 38.49%. Comparing base (c7472db) to head (3b1c9cb).
⚠️ Report is 11 commits behind head on trunk.

Files with missing lines Patch % Lines
...e/android/ui/bookings/tab/BookingsTabController.kt 0.00% 19 Missing ⚠️
...ommerce/android/ui/bookings/BookingListFragment.kt 0.00% 5 Missing ⚠️
...ommerce/android/ui/bookings/tab/ShowBookingsTab.kt 0.00% 4 Missing ⚠️
...mmerce/android/ui/main/BottomNavigationPosition.kt 0.00% 2 Missing ⚠️
...kotlin/com/woocommerce/android/util/FeatureFlag.kt 66.66% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##              trunk   #14621      +/-   ##
============================================
- Coverage     38.50%   38.49%   -0.02%     
+ Complexity     9768     9767       -1     
============================================
  Files          2061     2064       +3     
  Lines        115396   115429      +33     
  Branches      15363    15370       +7     
============================================
  Hits          44430    44430              
- Misses        66851    66883      +32     
- Partials       4115     4116       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants