Turn acceptsReservation into a ReserveAction
ClosedPublic

Authored by broulik on Feb 23 2020, 1:24 PM.

Details

Summary

According to [1] it can be the URL to a reservation page. Turn it into a ReserveAction to have a single code path for this on the consumer side.

[1] https://schema.org/acceptsReservations

Test Plan
  • Got a website with acceptsReservation URL and had a "Make a Reservation" button show up in p-b-i

Diff Detail

Repository
R1003 KItinerary: Travel Reservation handling library
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
broulik created this revision.Feb 23 2020, 1:24 PM
Restricted Application added a project: KDE PIM. · View Herald TranscriptFeb 23 2020, 1:24 PM
Restricted Application added a subscriber: kde-pim. · View Herald Transcript
broulik requested review of this revision.Feb 23 2020, 1:24 PM
vkrause accepted this revision.Feb 23 2020, 2:13 PM

Maybe check for startsWith("https:")?

This revision is now accepted and ready to land.Feb 23 2020, 2:13 PM
broulik updated this revision to Diff 76223.Feb 23 2020, 2:56 PM
broulik retitled this revision from RFC: Turn acceptsReservation into a ReserveAction to Turn acceptsReservation into a ReserveAction.
broulik edited the test plan for this revision. (Show Details)
vkrause accepted this revision.Feb 23 2020, 3:01 PM
broulik planned changes to this revision.Feb 23 2020, 4:43 PM

Actually, it's only marked as String so it can be "Yes" and "No" as fallback, so it's either a bool (or convertible to one) or URL.

broulik updated this revision to Diff 76268.Feb 24 2020, 9:42 AM
broulik edited the test plan for this revision. (Show Details)
  • Check for string Yes/No and else convert to action
This revision is now accepted and ready to land.Feb 24 2020, 9:42 AM
vkrause accepted this revision.Feb 24 2020, 11:49 AM
This revision was automatically updated to reflect the committed changes.