Skip to content

Navigation API #543

Closed
Closed

Description

@domenic

Request for Mozilla Position on an Emerging Web Specification

Activity

  1. smaug---- commented on Jun 14, 2021

    @smaug----
    Collaborator

    I think the core of the API is rather good, although it shouldn't be called App History, since it is used also for other navigations
    (WICG/navigation-api#83)
    And personally I'm definitely not a fan of event.respondWith().

    But overall the proposed API is definitely saner than the old session history API :)

  2. domenic commented on Jun 14, 2021

    @domenic
    ContributorAuthor

    FWIW, respondWith() definitely needs a rename now, even more so than it did before: WICG/navigation-api#94 (comment)

  3. added
    venue: WHATWG
    on Jun 16, 2021
  4. samthor commented on Aug 20, 2021

    @samthor

    An update: the API now calls the aforementioned method transitionWhile(), see #151.

  5. domenic commented on Mar 8, 2022

    @domenic
    ContributorAuthor

    The rename has happened; this is now the navigation API!

  6. changed the title [-]App history API[/-] [+]Navigation API[/+] on Jun 13, 2022
  7. smaug---- commented on Jan 16, 2023

    @smaug----
    Collaborator

    Getting the session history in a bit better shape in HTML spec is requirement for this. whatwg/html#8620 is at least rather blocking issue.

  8. domenic commented on Mar 8, 2023

    @domenic
    ContributorAuthor

    Hi @smaug----,

    As discussed at the triage meeting, I'm interested in helping with whatwg/html#8620. We decided there the next step was for you and/or @petervanderbeken to investigate; per whatwg/html#8786 (comment)

    Olli: this is a longer term task. The spec algorithms will need changes and need to test first all the implementations. Panos will take it off the agenda for now, while Olli investigates.

    Has the investigation made any progress?

    Personally, I don't think it should be a blocker for the navigation API itself. Although I understand the general sentiment of wanting to clean up tech debt before proceeding with new features, I was hoping that the >40 issues we solved with whatwg/html#6315 would be enough to get us some goodwill there. Do you think Mozilla would be able to give a position on the navigation API before your investigations are complete?

    At this point the specification PR to HTML is complete at whatwg/html#8502, so I'd love to get a sense of whether we can check the "Mozilla is interested" box :).

  9. smaug---- commented on Mar 8, 2023

    @smaug----
    Collaborator

    @domenic have you investigated how Navigation API behaves or perhaps rather should behave when underlying session history is limited.
    I would have expected the issue to show up when it was implemented, but perhaps we're missing some tests?

  10. domenic commented on Mar 9, 2023

    @domenic
    ContributorAuthor

    We have, to some extent. The answer comes in two parts:

    • How can the navigation API cause truncation? Here the answer is the same as with location.assign(), history.pushState(), etc. All the same edge cases occur, e.g. the one you pointed out in Session history entries list is assumed to be unlimited in size whatwg/html#8620 (comment) , just with analogous APIs. Any changes we make will apply equally to all APIs involved, and any tests we write do not need to be navigation API specific. (Although maybe we should add some using the navigation API for good measure.)

    • What happens to the NavigationHistoryEntry objects exposed by the navigation API, when the session history entries are discarded due to this truncation? The answer here is that they should stop appearing in navigation.entries(), and dispose events should be fired. This will involve an algorithm similar to the ones in this section, which contains various algorithms for updating navigation.entries() and firing dispose if necessary. So far it contains ones for coming out of bfcache ("reactivation"), and same-document navigation; it would contain a slightly different one for session history trimming due to limits. We have a tentative test for this at https://github.com/web-platform-tests/wpt/blob/9618c695692cdf0abcdcea5c921603976ccd3a7b/navigation-api/per-entry-events/dispose-for-full-session-history.tentative.html (although I notice it could test that the entry is actually gone, not just that it fires dispose---we'll get right on that).

    Hope this helps, and again, looking forward to working with you all on getting this fully specced!

  11. domenic commented on Mar 23, 2023

    @domenic
    ContributorAuthor

    Hi folks, is there anything else I can do to help get Mozilla's position on this API? Apart from the lack of clarity on multi-implementer interest, the spec PR is about ready to land, having gone through a few rounds of review.

  12. smaug---- commented on Mar 24, 2023

    @smaug----
    Collaborator

    I'll try to find time next week to review the proposal a bit more. There are thing around index handling and NavigateEvent which are a bit unclear to me still. Index handling especially because of the limited session history size (so, I don't know how well the API works in those cases when entries are purged).

  13. MineDrum commented on Apr 5, 2023

    @MineDrum

    @smaug---- any update on this? :)

    The company I work for is considering using this if firefox plans on supporting it eventually

  14. petervanderbeken commented on Apr 5, 2023

    @petervanderbeken

    @smaug---- any update on this? :)

    See the discussion in the PR (whatwg/html#8502).

  15. domenic commented on Apr 12, 2023

    @domenic
    ContributorAuthor

    Is there anything more we can do to move the process forward, from the Chromium side? I think we've answered all the questions ~9 days ago, and from the looks of it most of the engagement is at a fairly low-level. I'm hopeful even if there are remaining issues during the implementation period, Mozilla might be able to decide whether or not they're positive/negative/neutral on the API at this point. Let me know if there's anything else we can do to move that along!

  16. smaug---- commented on Apr 12, 2023

    @smaug----
    Collaborator

    The review process is just a bit slow. And it is very low level since one needs to check whether the API works with the underlying session history, even with the theoretical fix for whatwg/html#8620
    I'd rather avoid to land something to the spec and then realize later that it has significant issues. The new API does after all add some new ways to expose the limits of session history.

    I think in general any help with whatwg/html#8620 would be great. That is an issue we have talked about for years, also during the meetings about Navigation API.

  17. zcorpan commented on Jun 13, 2023

    @zcorpan
    Member

    I've discussed this with @smaug---- and @petervanderbeken

    Suggested position: positive

    There are various details that we're not sure about in the spec and we'd like to continue reviewing and submit feedback about issues we find. But the API as a whole is a good improvement for implementing SPAs over the status quo.

  18. added
    ready to add
    on Jun 13, 2023
  19. added a commit that references this issue on Jun 20, 2023
    7449afc
  20. added a commit that references this issue on May 15, 2024
    79df09a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    position: positiveready to addvenue: WHATWG

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions