Code Monkey home page Code Monkey logo

Comments (7)

sarah11918 avatar sarah11918 commented on May 24, 2024 1

ASIDE: @martrapp I see that this PR was released but with no changeset or docs, so I never saw it before merging. Is this also something we need to factor in to new view transitions docs? withastro/astro#10908

from docs.

sarah11918 avatar sarah11918 commented on May 24, 2024

Seems like a job for @martrapp to weigh in on? Martin, can you provide clarity/guidance here for whatever might be missing from docs perspective, and confirm that we have an exhaustive list here?

Then, would be happy to receive a PR to docs to document these properties!

from docs.

martrapp avatar martrapp commented on May 24, 2024

Hi @sarah11918, thank you for pinging!

As @Fryuni said, it would be good to have the event's properties and there purpose defined in the docs. Especially because they are already partly used in the examples. As discussed on discord, it might make sense to have the description in the reference section.

As nobody knows the view transition events better than @Fryuni, I can of course confirm that the list was exhaustive when the issue was opened. A new signal property was just added last week.

  • signal: AbortSignal was added for both before-* events.
    Loaders can hook on this property to abort long running asynchronous work like fetch()
    Swaps can also observe the signal. A new navigation should always have precedence over the current one

What I also can add, as it may be less obvious:

  • Astro's built-in animations support forward and back as value for directions. Other values are possible, but require some additional way to generate the necessary CSS.

  • The info property has been added to mimic the NavigateEvent property of the same name in the Navigation API.

I would be happy to help with a PR, but I won't open one myself on this topic, as there are certainly better technical writers than me ;-)

from docs.

Fryuni avatar Fryuni commented on May 24, 2024

I would be happy to help with a PR, but I won't open one myself on this topic, as there are certainly better technical writers than me ;-)

Me as well! I'm happy to help, but there are better writers.

from docs.

Fryuni avatar Fryuni commented on May 24, 2024

Well, I can try writing something and then an actual good writer can make it readable 😆

from docs.

sarah11918 avatar sarah11918 commented on May 24, 2024

Go for it!! I have faith in you! (And, I have a red pen if that faith is misplaced...)

from docs.

martrapp avatar martrapp commented on May 24, 2024

Is this also something we need to factor in to new view transitions docs?

Once we make that "official" it would fit well to the description of the swap function in the astro:before-swap event

from docs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.