Skip to content
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

Add navigation guards to liveSocket #3051

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from

Commits on Feb 5, 2024

  1. This PR introduces a new option that can be specified when creating a

    livesocket instance: `navigation`.
    
    Navigation is an object that can define two functions: `beforeEach` and
    `afterEach`. The `beforeEach` function is called before each navigation
    event and can for example be used to store custom scroll positions. If
    the `beforeEach` function returns `false`, the navigation will be aborted.
    This can be used to implement a warning when the user tries to navigate
    while a form is still being edited. The `afterEach` function is called
    after a navigation event has been completed. It can be used to restore
    the scroll position that was stored in the `beforeEach` function.
    SteffenDE committed Feb 5, 2024
    Configuration menu
    Copy the full SHA
    46b0a70 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    62665f5 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    6b41f8b View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    a1d8224 View commit details
    Browse the repository at this point in the history
  5. actually fix scroll test

    SteffenDE committed Feb 5, 2024
    Configuration menu
    Copy the full SHA
    aa08491 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    0152e0f View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    68b88e5 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    03fb8bf View commit details
    Browse the repository at this point in the history

Commits on Feb 13, 2024

  1. Configuration menu
    Copy the full SHA
    4cb9264 View commit details
    Browse the repository at this point in the history