Vanilla Javascript Reload (Astro View Transitions)

Open
#3,659 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
javascript
Domain
frontend, web-dev

Research direction

Start with the CDN page at https://ionicframework.com/docs/intro/cdn and Astro's View Transitions lifecycle-events guide. Reproduce the behavior across a transition, then determine whether Ionic or Astro owns reinitialization; the issue is complete when the ownership and supported next step are clear.

Written by the indexing model from the issue text.

Description

triage
URL

https://ionicframework.com/docs/intro/cdn

Issue Description

Using Ionic + Capacitor to create a native/web-app with Astro, the current issue is that View Transitions prevents the vanilla Javascript CDNs from reloading again. That throws away the styling that the HTML tag implements for the proper styling if the page is viewed on iOS, Android, or the web. Astro has functions to run scripts at different points of the transition process but after looking through the Ionic Component documentation, I don't see a way to re-initialize Ionic. I'm not sure if this is more of an Astro problem or an Ionic problem.

Dominant language
MDX
Stars
621
Forks
3.2k
Avg merge
1d 2h
Merged PRs (30d)
86

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ionic-team/ionic-docs

All issues in ionic-team/ionic-docs

Similar issues

More Web Dev issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.