Skip to content

Conversation

@adborbas
Copy link
Contributor

@adborbas adborbas commented Nov 25, 2025

Fixes an issue where the booking note did not update on selection change on iPad.

Description

The root of the issue was that we were holding onto the notes as a @State and so iPadOS did not pick up the change. I've made that a Binding and have also adopted to the patrn of Content used in the BookingDetailViewModel.

Test Steps

  1. Use an iPad
  2. Login to a store with CIAB.
  3. Navigate to Bookings.
  4. Open a booking with a note or add to one.
  5. Open multiple bookings in the split, validate each show's own note.

Screenshots

Before After
Simulator Screen Recording - iPad Pro 11-inch (M4) - 2025-11-25 at 14 22 34 Simulator Screen Recording - iPad Pro 11-inch (M4) - 2025-11-25 at 14 20 10

  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

@adborbas adborbas added this to the 23.8 milestone Nov 25, 2025
@adborbas adborbas added the type: bug A confirmed bug. label Nov 25, 2025
@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Nov 25, 2025

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

App NameWooCommerce iOS Prototype
Build Numberpr16398-bfc28be
Version23.7
Bundle IDcom.automattic.alpha.woocommerce
Commitbfc28be
Installation URL6cah0t29u8oog
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

Copy link
Contributor

@RafaelKayumov RafaelKayumov left a comment

Choose a reason for hiding this comment

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

Tested. Works as described 👍

Nit: I wonder if it's necessary to add the NotesContent + BookingNotesRowView wrappers since the MultilineEditableTextRow.value is turned into binding?

Would it be enough just to keep string note and make it @Published and then pass it to MultilineEditableTextRow as binding?

final class BookingDetailsViewModel: ObservableObject {
    ...
    @Published var note = ""
    ...
}
func updateDisplayProperties(from booking: Booking) {
...
    noteText = booking.note
...
}

func bookingNotesView() -> some View {
        MultilineEditableTextRow(value: $viewModel.noteText,
                                 placeholder: Localization.bookingNotesRowText,
                                 detailTitle: Localization.bookingNoteNavbarText) { newNote in
            return await viewModel.updateNote(to: newNote)
        }
    }

@adborbas
Copy link
Contributor Author

@RafaelKayumov, yes, that is a totally valid option as well. But I've opted for the NoteContent to better fit into how the other sections are working. They contain the data as well and do not access it directly from the viewModel.

@adborbas adborbas force-pushed the adborbas/fix-sticky-booking-note branch from d30f888 to bfc28be Compare November 26, 2025 08:28
@dangermattic
Copy link
Collaborator

1 Warning
⚠️ This PR is assigned to the milestone 23.8. 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.

Generated by 🚫 Danger

@RafaelKayumov RafaelKayumov self-requested a review November 26, 2025 08:41
@adborbas adborbas merged commit 623370a into trunk Nov 26, 2025
13 checks passed
@adborbas adborbas deleted the adborbas/fix-sticky-booking-note branch November 26, 2025 09:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: bug A confirmed bug.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants