GithubHelp home page GithubHelp logo

martrapp / astro-vtbot Goto Github PK

View Code? Open in Web Editor NEW
156.0 156.0 2.0 13.89 MB

The ๐Ÿ‘œ Bag of Tricks โœจ for Astro's View Transitions. โญ๏ธ Please star to support this work!

Home Page: https://events-3bg.pages.dev/

License: ISC License

JavaScript 3.15% Astro 52.40% TypeScript 42.18% CSS 1.88% Shell 0.39%
astro components view-transitions

astro-vtbot's Introduction

Hi there ๐Ÿ‘‹ I'm Martin!

I have often benefited from open source and am now happy to be able to give something back!
I am currently enjoying being a maintainer at https://github.com/withastro.

astro-vtbot's People

Contributors

delucis avatar dependabot[bot] avatar ergberg avatar github-actions[bot] avatar k16e-me avatar martrapp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

k16e-me levino

astro-vtbot's Issues

Starlight sidebar badges outlined style issue

Describe the Bug

Note: the issue has initially been reported in withastro/starlight#1764

  1. Navigate to https://events-3bg.pages.dev/jotter/history-of-changes/ and notice the sidebar entry for this page containing a badge with an outlined style as expected for the current page:
SCR-20240418-kszb
  1. Navigate with a full navigation to https://events-3bg.pages.dev/jotter/ and notice the sidebar entry for the previous page ("Recent changes") with a colored badge as expected as it's not the current page:
image
  1. Navigate to the "Recent changes" page using the sidebar link and notice that the sidebar badge is not updated to an outlined style as expected for the current page:
image

What's the expected result?

The sidebar badges should be updated to an outlined style when the page is the current one (and vice versa when it's no longer the current one).

Link to Minimal Reproducible Example

https://events-3bg.pages.dev/jotter/history-of-changes/

Participation

  • I am willing to submit a pull request for this issue.

Site header link is not responding on clicks

Describe the Bug

Hello, Martin! I'm reaching out this time regarding an issue I've encountered with the SiteTitle component, possibly related to vtbot or my setup, not sure yet. This problem arose after integrating VT into the system.

I've implemented a custom SiteTitle component featuring two links/logos. However, upon testing, I noticed that clicking on the first link doesn't redirect to the main website. The second link/logo functions correctly, directing to the main page of docs.

Upon inspecting the dev console, I encountered the following error: "Uncaught (in promise) TypeError: Cannot read properties of null (reading 'setAttribute')", which points to StarlightConnector.astro.

To provide more context, here's the link to the custom component:
https://github.com/mearashadowfax/ScrewFast/blob/main/src/components/ui/starlight/SiteTitle.astro

The docs link: https://screwfast.uk/welcome-to-docs/

What's the expected result?

When clicking on either of the two links/logos in the SiteTitle component, the user should be redirected to the corresponding URL.

Link to Minimal Reproducible Example

https://github.com/mearashadowfax/ScrewFast/tree/add-starlight-vt

Participation

  • I am willing to submit a pull request for this issue.

LoadingIndicator can't find some image to display and generates 404s

Describe the Bug

Without an explicit link[rel="icon"] in the page, the <LoadingIndicator /> tries to load undefined from the server ;-)

What's the expected result?

No errors

Link to Minimal Reproducible Example

just remove favicon from the site

Participation

  • I am willing to submit a pull request for this issue.

Starlight's sidebar visibility issues with view transitions

Describe the Bug

First of all, thank you for these great tools and tricks!

I am encountering a couple of issues with the view transitions implementation on my Starlight site. These issues include:

Sidebar initially invisible: When landing on a page with active view transitions, the sidebar is initially invisible. However, after reloading the page, the sidebar becomes visible and remains so for subsequent navigation.

Sidebar showing up on inappropriate pages: When navigating to certain pages, such as the docs home page, the sidebar is displayed even though it shouldn't be. Reloading the page seems to resolve this issue temporarily.

Steps to Reproduce:

  1. Navigate to the docs site (link is in the footer).
  2. Click on Get started button.
  3. Observe that the sidebar is initially invisible.
  4. Reload the page.
  5. Note that the sidebar becomes visible after reloading.
  6. Navigate to a page where the sidebar should not be displayed (e.g., docs home page).
  7. Observe that the sidebar is still visible on the page.
  8. Reload the page.
  9. Note that the sidebar disappears after reloading.

What's the expected result?

Display a sidebar without the need to reload the page.

Link to Minimal Reproducible Example

mearashadowfax/ScrewFast#40

Participation

  • I am willing to submit a pull request for this issue.

Support for fallback

First off, astro-vtbot is great! It allows me to keep a persistent CSS animation going across page transitions, so thank you!

One request: please add support for <ViewTransitions fallback="animate | swap | none" />. Astro's View Transitions allow for setting a fallback method in browsers that don't natively support the View Transitions API, like currently Safari and Firefox. I'm using fallback="swap" because I don't like the way fallback="animate" first hides the existing content before it shows the new content instead of a cross-fade (feels glitchy to me), so I prefer instant replacement SPA-style as a fallback. Unfortunately at the moment astro-vtbot seems to ignore this and instead enforces the fallback animation in those browsers (which I understand is the Astro default). Would be great if it could preserve the original functionality there.

Typings stop working inside slugs

Describe the Bug

After bootstraping a fresh Astro project using the blog template and installing the astro-vtbot integration the typings of the slug are set to any like in the following example.

Before installing:

image

After installing

image

I've tried reloading the window on VSCode and even restarting the ts-server after installing the package but for some reason the issue persists.

What's the expected result?

The expected result is to not have typing issues ๐Ÿ˜

Link to Minimal Reproducible Example

I don't have a repro link

Participation

  • I am willing to submit a pull request for this issue.

The connected script is not working correctly (chat)

Describe the Bug

I use this service, I connected it in astro.config in the head, when it loads everything works correctly, but when I go to the page inside the documentation it stops working.

Please tell me how can I connect it correctly so that it works correctly? maybe inside the plugin?
I connected this plugin https://events-3bg.pages.dev/jotter/starlight/inner-workings/integration/#overriding-the-head-component

Thank you for your attention

What's the expected result?

loaded correctly when going to another page

Link to Minimal Reproducible Example

https://github.com/testomatio/docs

Participation

  • I am willing to submit a pull request for this issue.

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.