Logo
    Search

    Browser CSS Page Transitions API aka Shared Element Transitions

    enJune 27, 2022

    Podcast Summary

    • Discussing the browser transitions API proposal and its potential impact on web developmentThe browser transitions API proposal aims to improve website experiences by providing developers with new tools for creating engaging and seamless transitions. Prismic, a headless CMS, was praised for its simplicity and versatility, while LogRocket was introduced as a valuable tool for debugging user interactions.

      The browser transitions API proposal aims to bridge the gap between website and native app experiences by providing developers with new tools to create more engaging and seamless transitions. During this episode of SYN, Scott Talinsky and Wes Boss discussed this proposal, which is still in the proposal stage, and provided insights into its potential impact on web development. They also highlighted the sponsors of the episode, Prismic and LogRocket. Prismic, a headless CMS, was praised for its simplicity and versatility, as it can be used with various frameworks and technologies, including Next.js, Nuxt, Gatsby, Svelte, and vanilla JavaScript. Prismic offers a REST API and GraphQL support, making it an attractive choice for developers. Additionally, Prismic provides helpful resources, such as an intro to headless CMS and content modeling, which can be crucial when designing content types and structuring relationships between them. LogRocket, the second sponsor, was introduced as a valuable tool for debugging and understanding user interactions. By offering session replays, LogRocket enables developers to see exactly what a user did when an error occurred, allowing them to gain insights and resolve issues more effectively. Overall, the episode provided a mix of technical discussions and sponsor highlights, making it a valuable resource for developers looking to stay informed about the latest web development trends and tools.

    • New proposal for an API to enable smooth animations on the webA new API aims to make web animations smoother and more performant, allowing for a more competitive user experience with native apps

      LogRocket provides a detective-like experience for developers to analyze and solve issues on their websites by offering video evidence of user interactions. This tool allows for a faster resolution of issues compared to traditional methods, as developers can observe the exact behavior causing the problem. Additionally, the web is at a disadvantage when it comes to browser animations compared to native apps. Developers often have to use JavaScript libraries to create page transitions, which can be less performant than letting the browser handle the animations itself. A new proposal for an API aims to address this issue by enabling smooth animations between views or pages on the web with minimal effort, making the web more competitive with native apps in terms of user experience.

    • New feature in web development: Persistent animationsPersistent animations allow for full-page transitions and seamless UI morphing, improving user experience and making animation implementation more accessible and enjoyable for developers.

      The discussion revolves around a new feature in web development called "persistent animations" or "shared element transitions." This goes beyond basic fade transitions between pages and allows for full-page animations and the morphing of UI elements from one page to another. The intention is to create a more engaging and seamless user experience. For instance, clicking on a card in a grid could cause the card to open up into the full page, with the card's elements animating into their new positions on the next page. While these animations are possible with existing tools and libraries, the discussion expresses excitement about this feature being integrated directly into the web development process, making it more accessible and enjoyable for developers. This is a significant improvement over the current methods, which can be cumbersome and require more effort to implement. These animations were initially part of design specifications like Material Design, but implementing them has been a challenge. Now, with this new feature, the process is expected to be smoother and more intuitive.

    • New animation technique eliminates need for duplicating elements during transitionsA new animation technique allows a single element to morph and move to its new position, eliminating the need for complex frameworks and simplifying the animation process

      The new animation technique being discussed eliminates the need for duplicating elements during page transitions in animation. Instead, a single element morphs and moves to its new position on the screen. This method, which likely relies on the browser handling the animation behind the scenes, offers several advantages. It eliminates the need for complex frameworks and the associated learning curve, making it more accessible to developers. Additionally, it allows for a more standardized approach to animations, as everyone can use the same techniques. This method is also performant and can be used for both entry and exit animations, such as a new element fading in as an old one fades out. However, the specifics of how this is accomplished at a technical level remain unclear, and further research may be necessary for a complete understanding. Overall, this new animation technique has the potential to simplify and streamline the animation process for developers, making it more efficient and effective.

    • Control transitions between pages with the Page Transition APIThe Page Transition API allows developers to create seamless animations and manage events effectively during page transitions using standardized methods and new JavaScript events.

      The Page Transition API is a new standardized way to control transitions between pages, allowing developers to create seamless animations and manage events more effectively. The API includes new JavaScript events like before page show or page hide, as well as the ability to control document transitions using the createDocumentTransition method. Developers can also use the Web Animations API and requestAnimationFrame for setting up animations. This API offers several advantages, such as being standardized, reducing the need for custom implementations in different frameworks, and potentially leading to easier coding with the use of plugins or components. The API is similar to the Web Animations API, with the option to use simpler methods for most common use cases. An example of this can be found in the linked code, and it's interesting to note that Chris Coyer, a well-known web developer, had written about a similar concept over a year before the API was announced.

    • Microsoft Edge's abandoned page transitions APIMicrosoft Edge's proprietary page transitions API using meta tags is no longer in use, but Sarah Drasner's demo offers a glimpse into the potential future of page transitions and animations, now only accessible through Chrome Canary with a specific flag enabled.

      Before Microsoft Edge adopted Chromium as its engine, it had a proprietary page transitions API using meta tags. This API allowed for content revealing transitions, but it was eventually scrapped when Microsoft switched to Chromium. Sarah Drasner, a web designer, had created a popular demo of this feature in 2018, which is now only accessible through Chrome Canary with a specific flag enabled. Although this feature is not yet standardized or widely available, it offers an intriguing glimpse into the potential future of page transitions and animations. If you're interested in experimenting with this cutting-edge technology, you can try it out in Chrome Canary by enabling the document transition API flag. Keep in mind, however, that this is not something that should be used for production purposes. Instead, it could serve as an opportunity to explore and master the latest web design trends and technologies.

    • Exploring the Potential of CSS Multi-column Layout Level 3The new CSS feature, Multi-column Layout Level 3, could revolutionize web design with visually appealing and complex layouts, but it might take a year or two before it's widely available.

      The web design community is excited about the potential of a new CSS feature called "Multi-column Layout Level 3" or MCL3. This feature could allow for more complex and visually appealing layouts without the need for JavaScript. The speakers in the discussion compare it to other CSS features like Grid and Flexbox, which took a significant amount of time to be fully implemented in browsers. They speculate that it might take a year or two before MCL3 is widely available. The possibilities of this feature are vast, including seamless page transitions and the ability to add sound effects. Some designers are even dreaming of creating web versions of video mixers and their cheesy transitions. Overall, the community is looking forward to the creative possibilities that MCL3 could bring to web design.

    Recent Episodes from Syntax - Tasty Web Development Treats

    792: Perfect Sitemaps for SEO

    792: Perfect Sitemaps for SEO

    Scott and Wes break down the importance of sitemaps for SEO. They dive into the different file formats, essential fields, and common pitfalls to avoid when creating and submitting your sitemap to search engines.

    Show Notes

    Hit us up on Socials!

    Syntax: X Instagram Tiktok LinkedIn Threads

    Wes: X Instagram Tiktok LinkedIn Threads

    Scott: X Instagram Tiktok LinkedIn Threads

    Randy: X Instagram YouTube Threads

    791: LLRT The Serverless Runtime w/ Richard Davison

    791: LLRT The Serverless Runtime w/ Richard Davison

    Scott and Wes chat with Richard Davison from AWS about LLRT, a new runtime tailored specifically for Lambda. They dive into the benefits of using LLRT, challenges with JavaScript in serverless, and why Rust was chosen for its development.

    Show Notes

    Sick Picks

    Shameless Plugs

    • Richard: Javascript

    Hit us up on Socials!

    Syntax: X Instagram Tiktok LinkedIn Threads

    Wes: X Instagram Tiktok LinkedIn Threads

    Scott: X Instagram Tiktok LinkedIn Threads

    Randy: X Instagram YouTube Threads

    790: State of JS 2023 Reactions

    790: State of JS 2023 Reactions

    Scott and Wes dive into the 2023 State of JavaScript survey, breaking down the latest trends and pain points in front-end frameworks, build tools, and JavaScript runtimes. Tune in for their hot takes and insights on what’s shaping the JavaScript landscape this year!

    Show Notes

    Sick Picks

    Shameless Plugs

    Hit us up on Socials!

    Syntax: X Instagram Tiktok LinkedIn Threads

    Wes: X Instagram Tiktok LinkedIn Threads

    Scott: X Instagram Tiktok LinkedIn Threads

    Randy: X Instagram YouTube Threads

    789: Do More With AI - LLMs With Big Token Counts

    789: Do More With AI - LLMs With Big Token Counts

    Join Scott and CJ as they dive into the fascinating world of AI, exploring topics from LLM token sizes and context windows to understanding input length. They discuss practical use cases and share insights on how web developers can leverage larger token counts to maximize the potential of AI and LLMs.

    Show Notes

    Hit us up on Socials!

    Syntax: X Instagram Tiktok LinkedIn Threads

    Wes: X Instagram Tiktok LinkedIn Threads

    Scott: X Instagram Tiktok LinkedIn Threads

    CJ: X Instagram YouTube TwitchTV

    Randy: X Instagram YouTube Threads

    788: Supabase: Open Source Firebase for Fullstack JS Apps

    788: Supabase: Open Source Firebase for Fullstack JS Apps

    Scott and CJ chat with Paul Copplestone, CEO and co-founder of Supabase, about the journey of building an open source alternative to Firebase. Learn about the tech stack, the story behind their excellent documentation, and how Supabase balances business goals with open-source values.

    Show Notes

    • 00:00 Welcome to Syntax!
    • 00:30 Who is Paul Copplestone?
    • 01:17 Why ‘Supa’ and not ‘Super’?
    • 02:26 How did Supabase start?
    • 08:42 Simplicity in design.
    • 10:32 How do you take Supabase one step beyond the competition?
    • 12:35 How do you decide which libraries are officially supported vs community maintained?
      • 15:17 You don’t need a client library!
    • 16:48 Edge functions for server-side functionality.
    • 18:51 The genesis of pgvector.
    • 20:59 The product strategy.
    • 22:25 What’s the story behind Supabase’s awesome docs?
    • 25:26 The tech behind Supabase.
    • 35:46 How do you balance business goals with open source?
    • 42:01 What’s next for Supabase?
    • 44:15 Supabase’s GA + new features.
    • 48:24 Who runs the X account?
    • 50:39 Sick Picks + Shameless Plugs.

    Sick Picks

    Shameless Plugs

    Hit us up on Socials!

    Syntax: X Instagram Tiktok LinkedIn Threads

    Wes: X Instagram Tiktok LinkedIn Threads

    Scott: X Instagram Tiktok LinkedIn Threads

    CJ: X Instagram YouTube TwitchTV

    Randy: X Instagram YouTube Threads

    787: You Should Try Vue.js

    787: You Should Try Vue.js

    Scott and CJ dive deep into the world of Vue.js, exploring what makes this frontend framework unique and why it stands out from React and Svelte. CJ gives a comprehensive tour, covering everything from getting started to advanced features like state management and Vue’s built-in styles.

    Show Notes

    Vue.js: The Documentary.

    Sick Picks

    Shameless Plugs

    Hit us up on Socials!

    Syntax: X Instagram Tiktok LinkedIn Threads

    Wes: X Instagram Tiktok LinkedIn Threads

    Scott: X Instagram Tiktok LinkedIn Threads

    Randy: X Instagram YouTube Threads

    786: What Open Source license should you use?

    786: What Open Source license should you use?

    Scott and CJ dive into the world of open source, breaking down its meaning, benefits, and the various types of licenses you’ll encounter. From permissive licenses like MIT and Apache 2.0 to copy-left licenses such as GNU GPLv3, they’ll help you choose and apply the right license for your project.

    Show Notes

    Hit us up on Socials!

    Syntax: X Instagram Tiktok LinkedIn Threads

    Wes: X Instagram Tiktok LinkedIn Threads

    Scott: X Instagram Tiktok LinkedIn Threads

    Randy: X Instagram YouTube Threads

    785: What’s Next for NextJS with Tim Neutkens

    785: What’s Next for NextJS with Tim Neutkens

    Scott and Wes dive into the world of Next.js with special guest Tim Neutkens from Vercel. They explore the latest updates, including the React Compiler and React Server Components, discussing their impact on developer workflows and the future of Next.js development.

    Show Notes

    • 00:00 Welcome to Syntax!
    • 00:30 What does the React Compiler do?
    • 05:04 Will React Compiler help with managing Context?
    • 06:39 What happens if you’re not using a React Compiler?
    • 09:30 Will this work on any NextJS version?
    • 12:18 What are React Server Components?
    • 16:28 Shipping all the data inside an encapsulated component.
    • 20:17 Clearing up the frustrations around retrofitting server components.
    • 23:13 Handing migration.
    • 28:30 Is this just a fetch request with props?
    • 36:41 How closely are the NextJS and React teams working?
    • 41:53 Will we ever get Async Client Components?
    • 43:52 Async Local Storage API.
    • 45:31 Turbopack.
    • 57:51 Sick Picks & Shameless Plugs.

    Sick Picks

    Shameless Plugs

    Hit us up on Socials!

    Syntax: X Instagram Tiktok LinkedIn Threads

    Wes: X Instagram Tiktok LinkedIn Threads

    Scott: X Instagram Tiktok LinkedIn Threads

    Randy: X Instagram YouTube Threads

    784: Logging × Blogging × Testing × Freelancing

    784: Logging × Blogging × Testing × Freelancing

    In this Potluck episode, Scott and Wes tackle listener questions on modern blogging, website environmental impact, and using LangChain with LLMs. They also cover CSS hyphens, unit vs. integration testing, and balancing web development with new parenthood.

    Show Notes

    Sick Picks

    Shameless Plugs

    Hit us up on Socials!

    Syntax: X Instagram Tiktok LinkedIn Threads

    Wes: X Instagram Tiktok LinkedIn Threads

    Scott: X Instagram Tiktok LinkedIn Threads

    Randy: X Instagram YouTube Threads

    783: How We Built a Netflix Style “Save for Offline” Feature Into Syntax

    783: How We Built a Netflix Style “Save for Offline” Feature Into Syntax

    Scott and Wes dive into the world of browser caching for audio files, exploring the File System API and the Cache API. They discuss size restrictions across different browsers, how tools like Riverside.fm leverage IndexedDB, and walk through code examples for creating, retrieving, and managing cached audio data.

    Show Notes

    Hit us up on Socials!

    Syntax: X Instagram Tiktok LinkedIn Threads

    Wes: X Instagram Tiktok LinkedIn Threads

    Scott:X Instagram Tiktok LinkedIn Threads

    Randy: X Instagram YouTube Threads

    Related Episodes

    Hasty Treat - Seven Interesting JavaScript Proposals - Async Do, JSON Modules, Immutable Array Methods, and More!

    Hasty Treat - Seven Interesting JavaScript Proposals - Async Do, JSON Modules, Immutable Array Methods, and More!

    In this Hasty Treat, Scott and Wes talk about seven new JavaScript proposals — what they do, where they’re at, and how you might use them.

    Deque - Sponsor

    Deque’s axe DevTools makes accessibility testing easy and doesn’t require special expertise. Find and fix issues while you code. Get started with a free trial of axe DevTools Pro at deque.com/syntax. No credit card needed.

    LogRocket - Sponsor

    LogRocket lets you replay what users do on your site, helping you reproduce bugs and fix issues faster. It’s an exception tracker, a session re-player and a performance monitor. Get 14 days free at logrocket.com/syntax.

    Show Notes

    03:32 - Seven new JavaScript proposals

    06:25 - JSON Modules

    09:55 - Array Find From Last

    11:40 - Async Do

    • https://github.com/tc39/proposal-async-do-expressions
    • Async do will allow you to group together a block of code and mark it as async.
    • No need for an iife
    • Downside to this is that it’s a code block, so if you need to return any values, you’ll need to jump that up a scope level.
     Promise.all([   async do {     let result = await fetch('thing A');     await result.json();   },   async do {     let result = await fetch('thing B');     await result.json();   }, ]).then(([a, b]) => console.log([a, b]));  

    14:33 - Change Array By Copy

    17:48 - Temporal

    18:35 - As Patterns

    20:47 - Pattern Matching

        {props => match (props) {     when ({ loading }) { ; }     when ({ error }) { ; }     when ({ data }) { ; }   }}   

    Tweet us your tasty treats!

    I can has() new CSS Selector?!

    I can has() new CSS Selector?!

    In this Hasty Treat, Scott and Wes talk about new CSS selectors :has, :where, and :is.

    MagicBell - Sponsor

    MagicBell is the the notification inbox for your product. Add a MagicBell to your product for announcements, billing, workflow, and other notifications. The free plan supports up to 100 Monthly Active Users - use the coupon code SYNTAXFM for 10% off the first 12 months.

    LogRocket - Sponsor

    LogRocket lets you replay what users do on your site, helping you reproduce bugs and fix issues faster. It’s an exception tracker, a session re-player and a performance monitor. Get 14 days free at logrocket.com/syntax.

    Show Notes

     // Finds all p tags that have an anchor tag as a child p:has(a) {} // Can find children of parent as well // Finds the button of a paragraph that contains an a tag  p:has(a) button {} // Finds all p tags that don't have an anchor tag as a child p:not(:has(a)) {} // Finds all p tags where a is a direct sibling p:has(> a) {} // would find 

    Hi

    // would not find

    hi

    In the past we would write

     header p:hover, main p:hover, footer p:hover {   color: red;   cursor: pointer; }  

    :where is essentially a short had for making this easier considering the 2nd half of these selectors is the same. Will make your css dryer

     :where(header, main, footer) p:hover {}  

    Also super handy in avoiding css blocks being ignored for unsupported features.

     // Doesn't work div:has(p), div:some_new_selector(p)  // Will still work for :has if has is supported :where(div:has(p), div:some_new_selector(p))  

    Tweet us your tasty treats

    Hasty Treat - Future Tech We’re Excited About

    Hasty Treat - Future Tech We’re Excited About

    In this Hasty Treat, Scott and Wes talk about future tech — some things you may not have heard about yet, and why we’re excited about them!

    Freshbooks - Sponsor

    Get a 30 day free trial of Freshbooks at freshbooks.com/syntax and put SYNTAX in the “How did you hear about us?” section.

    LogRocket - Sponsor

    LogRocket lets you replay what users do on your site, helping you reproduce bugs and fix issues faster. It’s an exception tracker, a session re-player and a performance monitor. Get 14 days free at logrocket.com/syntax.

    Show Notes

    05:20 - Astro

    • What it is:
    • Why we’re excited about it:
      • Server Side JS frameworks, combine Svelte, React, Vue as needed in one component that is an SFC using markdown style meta data.
      • Scoped CSS by default (a la Svelte). Sass out of the box.
      • Collections import for .md files
     // pages/blog.astro --- import PostPreview from '../components/PostPreview.astro';  const blogPosts = import.meta.collections('./post/*.md'); ---  <main>   <h1>Blog Postsh1>   {blogPosts.map((post) => (     <PostPreview post={post} />   )} main>  

    12:06 - ViteKit

    • What it is:
      • Framework-agnostic
      • API routes
      • Pages (frontend, optional hydration)
      • Adapter for Node, static, Vercel, cf worker, etc. Inspired by SvelteKit.

    15:58 - Svelte Kit

    19:07 - Remix.run

    • What it is:
    • Why we’re excited about it:
      • Made by Michael Jackson, Ryan Florence
      • License-based
      • React-based
      • Caching-focused, uses “the platform”
      • Centralized data loading, works without client JS if needed
      • Better nested routing

    Links

    Tweet us your tasty treats!

    Hasty Treat - The TLD Game

    Hasty Treat - The TLD Game

    In this Hasty Treat, Scott and Wes are playing a game! It’s called the TLD game, where Scott and Wes try to stump each other with questions about top level domains.

    LogRocket - Sponsor

    LogRocket lets you replay what users do on your site, helping you reproduce bugs and fix issues faster. It’s an exception tracker, a session re-player and a performance monitor. Get 14 days free at logrocket.com/syntax.

    Show Notes

    1:55 - The rules of the game

    We pick a TLD from a list, and the other person needs to guess:

    1. Is it for a country or business? -5 points
    2. What country, business, or type of business is it for? -5 points
    3. How much per year does it cost to register? You may also say “unregisterable” +/- off by $$
    4. is scott.___ and wes.___ available? -10 for each

    5:40 - .BO

    7:51 - .BZH

    9:50 - .BANANAREPUBLIC

    11:15 - .BABY

    14:04 - .KR

    16:09 - .MOTO

    17:25 - .AW

    19:16 - .IM

    Links

    Tweet us your tasty treats!

    Introducing LogRocket’s Galileo

    Introducing LogRocket’s Galileo
    Today, we have a message from LogRocket, the company behind PodRocket. LogRocket CEO, Matthew Arbesfeld, and Senior Engineering Manager, Renzo Lucioni, sit down to talk about LogRocket's new machine learning layer Galileo. Galileo cuts through the noise of traditional monitoring and analytics tools, proactively scanning your applications to surface the most critical issues impacting your users. Links https://logrocket.com/features/galileo (https://logrocket.com/features/galileo) https://lp.logrocket.com/lp/galileo-beta (https://lp.logrocket.com/lp/galileo-beta) What does LogRocket do? LogRocket combines frontend monitoring, product analytics, and session replay to help software teams deliver the ideal product experience. Try LogRocket for free today (https://logrocket.com/signup/?pdr). Special Guest: Renzo Lucioni .