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

Update to astro 3.x #111

Closed
alec-c4 opened this issue Aug 31, 2023 · 11 comments
Closed

Update to astro 3.x #111

alec-c4 opened this issue Aug 31, 2023 · 11 comments

Comments

@alec-c4
Copy link

alec-c4 commented Aug 31, 2023

Hey!
Are there any plans to update the theme to support astro 3.x?

@satnaing
Copy link
Owner

satnaing commented Sep 3, 2023

Yes
I'm currently working on it.

@susanta96
Copy link

Great !! I am using this as well. It would be better to use, v3. However, I am upgrading it but when I tried to use ViewTransition API, which is the new one in v3. It's breaking the toggle theme functionality between pages.

Please try to resolve this, if possible. I am also trying to resolve this, Viewtranstions is also calling other pages beforehand as well.

@hanskalisvaart
Copy link

Can someone smarter than me tell me why Astro 3.x broke the header?

@tanishqmanuja
Copy link
Contributor

tanishqmanuja commented Sep 11, 2023

@hanskalisvaart, can you try if scopedStyleStrategy: "where" in astro config fixes it ?
EDIT: also have to add transition:persist to header

<header transition:persist>
  ...
</header>

@nimrra
Copy link

nimrra commented Sep 11, 2023

i also want to use ViewTransition API,

@hanskalisvaart
Copy link

@hanskalisvaart, can you try if scopedStyleStrategy: "where" in astro config fixes it ? EDIT: also have to add transition:persist to header

<header transition:persist>
  ...
</header>

Putting Putting scopedStyleStrategy: "where" in the astro.config.mjs file at the location:
export default defineConfig({
scopedStyleStrategy: 'where',
fixed the header!

satnaing added a commit that referenced this issue Sep 14, 2023
Upgrade to astro v3. Update dependencies. Fix codes and features due to migration.

BREAKING CHANGE: Astro v3

resolve #111
@satnaing
Copy link
Owner

Hello everyone!

I just made a PR for Astro v3 and ViewTransitions API; plus a few minor updates. You can give suggestions and try experimenting with it on version-3 branch or live URL
You can also give feedback on my implementation details, trade-offs I've made, or anything.

Thanks

@Jordain
Copy link

Jordain commented Sep 17, 2023

Hey Satnaing, if you are in dark mode and click on any of the header links it flashes white before changing back to black.

@satnaing
Copy link
Owner

Hello @Jordain
Does that problem still exist in AstroPaper v3?

On which browser does it happen?

@Jordain
Copy link

Jordain commented Sep 19, 2023

@satnaing Yep, Firefox

@satnaing
Copy link
Owner

Hey Satnaing, if you are in dark mode and click on any of the header links it flashes white before changing back to black.

Previously, commit fdabb82 introduced a transition effect for the background color when toggling between light and dark modes. This effect caused a white flash when clicking on header links in dark mode, especially in Firefox.
It appears that this theme switch transition effect was somehow triggered whenever navigating. To fix this, for now, I just removed the transition code in the body.

Thanks for pointing this out @Jordain

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants