Skip to content

Latest commit

 

History

History
253 lines (165 loc) · 12.4 KB

File metadata and controls

253 lines (165 loc) · 12.4 KB

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

[2026-04-29]

Added

  • odyssey_toggle_button now accepts a layout attr (:inline default, :stacked for vertical radio-style list). In stacked mode, options render as a full-width vertical list — each row has a radio circle SVG (filled blue when selected, outlined when not) with the option name to the right and an optional description beneath it. Options support a description key for stacked mode.
  • Added .ody-neutral-{0,50,100,200,250,300,350,400} CSS helper classes for applying Odyssey neutral palette colors to text.
  • Added complete set of .ody-* CSS classes covering H1–H3, P1–P3, Mobile Footer, and link variants across regular/medium/bold weights.

[2026-04-27]

Added

  • AccountUser now includes a locale field (optional String.t()), extracted from the "locale" key in the JWT user claims.
  • PeekAuth plug now assigns peek_verified_claims on the conn — the full verified JWT claims map — giving LiveViews and controllers direct access to raw claim data without re-parsing the token.

[2026-03-23]

Added

  • odyssey_select now accepts an optional label attr, wrapping the component in a fieldset with label styling consistent with other Odyssey form components.
  • odyssey_select now supports form-integrated mode when a field attr is provided (like odyssey_toggle_button). Manages a hidden input for form binding with single and multiple selection via the multiple attr. Standalone mode (via on_select) remains unchanged.

Changed

  • odyssey_select color dots are now only rendered when the item has a color value. Items without a color field no longer show a grey fallback dot.

[2026-03-14]

Added

  • Added odyssey_product_picker component — a form-integrated product selector with "All" / "Specific" toggle and per-product checkboxes. Expects products as %{id, name, color} atom-keyed maps. Auto-extracts selected_ids from the form field value (supports maps, structs, and Ecto changesets) when not explicitly provided.
  • Added OdysseyProductPicker JS hook for client-side checkbox ↔ hidden field sync.
  • Added odyssey_select component — a generic dropdown LiveComponent with search/filter.
  • Added product picker and select demos to the showcase app with LiveView tests.

[2026-03-05]

Changed

  • query_platform/4 now handles all 2xx status codes as success, returning {:ok, body} with the raw response body. Previously only 200 responses with a %{data: data} GraphQL structure were treated as success, causing non-GraphQL platform APIs (e.g. ACME) to incorrectly fall through to the error path.
  • Added logging to verify_peek_auth/2 and verify_client_request/2 to help debug token verification failures. Warning messages now include the specific error reason and config_id context.

[2026-02-27]

Fixed

  • odyssey_toggle_button with label no longer makes entire row clickable (was triggering first button when clicking anywhere on the row).
  • odyssey_tabs active tab now has pointer-events-none to prevent unnecessary re-navigation when clicking the current tab.

[2026-02-24]

Changed

  • odyssey_activity_picker now accepts optional activities list. When provided, skips GraphQL fetch and uses the passed activities directly. install_id is now optional (only required when activities not provided).
  • odyssey_tooltip now wraps inner_block content when provided instead of showing info icon. Use <.odyssey_tooltip text="..."><button>Click me</button></.odyssey_tooltip> to add tooltip to custom elements.
  • odyssey_alert icon now vertically aligns with title text instead of centering on entire content block.

[2026-02-17]

Added

  • Added PeekAppSDK.Client.query_platform/4 for cross-brand API querying. Accepts install_id, HTTP method, URL path, and body params.

[2026-02-13]

Added

  • query_peek_pro/4 now automatically retries on 429 rate limit errors with exponential backoff (200ms base, randomized, capped at 2s, up to 5 retries). No API changes required.

[2026-02-12]

Breaking

  • odyssey_alert is now content-width by default (flex w-fit) instead of centered full-width. Use the new full attr for full-width alerts with actions pushed to the right, or class="w-full" for manual control.

Added

  • Added full attr to odyssey_alert for full-width alerts with dismiss/actions pushed to the right.
  • PostHog now supports platform field in partner map (optional, defaults to "peek"). All distinct_id values are prefixed with platform (e.g., "peek-partner-123", "cng-partner-456"). Run scripts/posthog_migration.js to alias existing users before deploying.
  • PostHog identify and track now set platform as a property.
  • Added scripts/posthog_migration.js for migrating existing PostHog data to include platform.

Fixed

  • Fix size of color input to be a square
  • Add icon button to encourage squares
  • Fix design of daisy modal close button

[2026-02-11]

Added

  • Added odyssey_tooltip component to the demo app showcase with examples for both default and top caret variants.
  • Added optional tooltip and tooltip_location attrs to odyssey_toggle_button component.
  • Added location attr to odyssey_tooltip supporting top, bottom, left, right (default: top).
  • Added dismissable attr and <:action> slot to odyssey_alert for inline dismiss button and custom actions.
  • Added disabled attr to odyssey_toggle_button to disable interaction.
  • Toggle button tooltip now renders after the button group when no label is provided.
  • Added odyssey_color_input component with blue chevron styling matching dropdown design.

[2026-02-09]

Changed

  • BREAKING: odyssey_prefix_input component no longer applies width styling to the input field itself. Width must now be set on the parent container for full customization control.
    • Migration: Wrap the component in a container with your desired width class (e.g., <div class="w-[200px] inline-block"><.odyssey_prefix_input ... /></div>)

[2026-01-06]

Changed

  • Fixed bug in toggle button where changes weren't propagating correctly inside nested forms.
  • Fix link styling to remove underline for back button.

[2025-12-02]

Added

  • Events can now be routed to a PostHog project of your choosing by configuring :posthog_key.
    • PeekAppSDK.Metrics.track_install/2 will automatically identify the partner in PostHog on install (sets name and is_test) and then capture app.install.
    • PeekAppSDK.Metrics.track/3 (partner variant) sends custom events to PostHog and automatically includes distinct_id, partner_id, partner_name, partner_is_test, and app_slug.

Changed

  • BREAKING: Metrics API is now partner-first for key functions:
    • PeekAppSDK.Metrics.track/3 now expects a partner map as the first argument when routing to PostHog (track(partner, event_id, payload)).
    • PeekAppSDK.Metrics.track_install/2 now expects a partner map as the first argument and will identify + capture in PostHog when configured.
    • PeekAppSDK.Metrics.track_uninstall/2 now expects a partner map as the first argument and will capture app.uninstall in PostHog when configured.

Migration examples:

  • Before:
    • PeekAppSDK.Metrics.track("order.placed", %{anonymousId: partner_id, level: "info"})
    • PeekAppSDK.Metrics.track_install(partner_id, partner_name, is_test)
    • PeekAppSDK.Metrics.track_uninstall(partner_id, partner_name, is_test)
  • After:
    • PeekAppSDK.Metrics.track(%{external_refid: partner_id, name: partner_name, is_test: is_test}, "order.placed", %{level: "info"})
    • PeekAppSDK.Metrics.track_install(%{external_refid: partner_id, name: partner_name, is_test: is_test})
    • PeekAppSDK.Metrics.track_uninstall(%{external_refid: partner_id, name: partner_name, is_test: is_test})

Note: Legacy arities remain temporarily for compatibility but are considered deprecated and may be removed in the next major release.

Fixed

  • Cosmetic fix for the activity picker component.

[2025-11-25]

Changed

  • Updated core Odyssey a.btn button link styling in assets/components/core-components.css to remove underlines from button links per internal design rules.

[2025-11-24]

Added

  • Added new icon variants to odyssey_icon: alert, warning, info, success, cancel, arrow-left, trashcan, and loading.

[2025-11-20]

Added

  • Added odyssey_prefix_input component for prefixed inputs (for example currency and percentages) in the Odyssey UI library.
    • Supports both standalone usage and Phoenix.HTML.Form field integration.
    • Documented and showcased in the demo app under the Forms tab with discount and percentage examples.
  • Added odyssey_date_picker component for selecting dates with Odyssey styling and icons.
    • Supports both standalone usage and Phoenix.HTML.Form field integration.
    • Included in the demo app under the Forms tab with start/expiration date examples.
    • Ships with focused tests to keep Odyssey UI coverage high.

Changed

  • Updated Odyssey .btn disabled styles so each variant keeps its own color when disabled, instead of using DaisyUI's generic disabled background.

Fixed

  • Fixed a bug where changeset errors were being reset and not displayed by the prefix input when used with a form field; validation errors from the changeset now render correctly.

[2025-11-11]

Added

  • Added optional label attribute to odyssey_activity_picker component
    • When a label is provided, the activity picker is automatically wrapped in a fieldset with proper label styling
    • Follows the same pattern as Phoenix core input components for consistency
    • Maintains 100% backward compatibility - existing usage without labels continues to work unchanged

Fixed

  • Toggle button no longer emits an event when clicking the already-selected option, preventing redundant LiveView events in both standalone and form-integrated usage.

[2025-11-07]

Added

  • Added optional label attribute to odyssey_toggle_button and odyssey_toggle_button_input components
    • When a label is provided, the toggle button is automatically wrapped in a fieldset with proper label styling
    • Follows the same pattern as Phoenix core input components for consistency
    • Maintains 100% backward compatibility - existing usage without labels continues to work unchanged
    • Works seamlessly with both standalone and form-integrated usage

[2025-11-04]

Added

  • Added odyssey_toggle_button component from Odyssey
  • Created the beginning of a demo project

Removed

  • BREAKING: Removed core components - applications should use their own core component file from Phoenix instead of relying on shared components to make Phoenix upgrades easier

[2025-10-15]

Changed

  • BREAKING: Configuration key peek_app_key has been renamed to peek_api_key
  • BREAKING: Configuration key peek_api_url has been deprecated in favor of peek_api_base_url
    • The new peek_api_base_url should contain only the base URL (e.g., "https://apps.peekapis.com")
    • The SDK automatically appends appropriate paths (e.g., /backoffice-gql) for different API endpoints
    • Migration path:
      • Existing apps using peek_api_url will continue to work for backoffice calls with deprecation warnings

      • New features like update_configuration_status will fail with clear migration instructions if peek_api_url is configured

      • Update your configuration from:

        config :peek_app_sdk,
          peek_api_url: "https://apps.peekapis.com/backoffice-gql"

        to:

        config :peek_app_sdk,
          peek_api_base_url: "https://apps.peekapis.com"

Added

  • Support for passing x-peek-auth token in request body parameters for scenarios where custom headers cannot be controlled (e.g., form submissions, third-party integrations)
    • Body parameters take precedence over headers when both are present
    • Enables authentication in form submission scenarios and legacy systems
  • Configuration validation that prevents use of deprecated peek_api_url with new features
  • Deprecation warnings when using legacy peek_api_url configuration for backoffice calls
  • Clear error messages with migration instructions for deprecated configuration

Fixed

  • URL construction now properly handles base URLs without hardcoded paths