solidjs / solidjs/solid-router
[FEATURE REQUEST] Shared element transitions support
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.3k
- Forks
- 180
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 19
Description
This is likely out of the scope for the time being, especially since the feature is still locked behind the chrome://flags/#document-transition flag in chrome canary.
Some resources on the incoming API in question:
- https://github.com/WICG/shared-element-transitions
- https://github.com/WICG/shared-element-transitions/blob/main/developer-guide.md
- https://www.youtube.com/watch?v=JCJUPJ_zDQ4
The transitions function by rendering the soon to be page as a separate DOM structure (kinda similar to solid's Portal) then taking a screenshot of both the previous element and the new element. These screenshots get animated in some form before the new page's contents become interactable again.
It would be really cool to see this feature power solid SPAs as soon as browsers begin to support it.
High level, this could look like:
const App = () => {
return (
<div style={{width: "100vw", height: "100vh"}}>
<NavBar />
<Routes>
<Route path="/" element={<Dashboard/>} />
<Route path="/content/:id" element={<Content/>} transition={true} />
</Routes>
</div>
);
};
it's assumed the user has configured any required css to customize the transition.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No repository file, test, or entry point is named. Start by reading the linked shared-element-transitions developer guide and checking the current router transition model; done would mean a defined, browser-supported approach for powering shared element transitions in Solid SPAs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend, web-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100