virtual-scroller: Let there be less (DOM) (Chrome Dev Summit 2018)

Поделиться
HTML-код
  • Опубликовано: 3 дек 2024
  • НаукаНаука

Комментарии • 61

  • @aram5642
    @aram5642 9 месяцев назад +1

    The hidden culprit of virtual scroller (at least in angular CDK) is that the rows have to be of same height. That is not always a design-acceptable requirement

  • @NathanRidley
    @NathanRidley 6 лет назад +33

    Google needs to implement virtual scrolling in the Chrome developer tools console. Too many logs and the dev tools grind to a halt.

    • @ScrinGuard
      @ScrinGuard 6 лет назад

      In what situation? In my case when I use the scroll event I use a debounce function to throttle calls if it is called more than once in a short period of time, only one instance will be called.

    • @NathanRidley
      @NathanRidley 6 лет назад +2

      @@ScrinGuard In the console, not in the viewport. The console is implemented by the Chromium dev team, so unless you fork your own version of Chromium and implement a better developer console, the answer to "in what situation" is "in every situation where you end up with thousands of log messages"

    • @malipetek
      @malipetek 5 лет назад +1

      Just hover over a base64 image url

  • @arkanciscan
    @arkanciscan 6 лет назад +49

    I still want to know how a is going to ctrl-f an infinite list of items that aren't in the DOM

    • @VincentKammerer
      @VincentKammerer 6 лет назад +2

      This is not a goal of this work, as it isn't even reachable. However, the goal can be to ctrl-f a very large (as opposed to infinite) list of items that are in the DOM but not rendered.

    • @Trucidare
      @Trucidare 6 лет назад +6

      Skip to 24:45. He explains it as "Invisible DOM" which allows for ctrl+f and page indexing even though it's not actually rendered on the page.

    • @llothar68
      @llothar68 6 лет назад

      @@elf-pavlik The items are not in the DOM thats part of the speed. You will need to provide your own search functionality.

    • @Oswee
      @Oswee 6 лет назад +2

      ExtJS long time ago had this kind of feature but this looks really good. Really important feature especially in enterprise grade SaaS where large tables should be rendered.

    • @overaul
      @overaul 6 лет назад

      You have the same problem with any infinite scroll based feed

  • @Sebienbeau
    @Sebienbeau 6 лет назад +10

    Impressive, but two questions:
    * Is "invisible" the only way to allow search in page to work? Because you still have to create a DOM node for each list item, loading time will be slow, leading to freezing view on loading... Could the framework query for text content with JavaScript API, without having to create a DOM node?
    * All items have variable size. How to you compute the total scrollbar size without rendering each items?!

  • @dinikasaxena
    @dinikasaxena 6 лет назад

    Really exciting! These are all the obvious things you'd want with js framework's implementation of virtual scrolling. I'm glad there's work being done on this

  • @mohammadkazemzadeh2299
    @mohammadkazemzadeh2299 2 года назад +2

    what happened to this project after 3 years?

  • @samuelgrahame3617
    @samuelgrahame3617 6 лет назад

    Best way to do it. Keep all content in Javascript. Render the elements usin Javascript. Calculate the height based on how many lines in the content. You could then ad a absulute 1x1 element at the bottom of the screen where n x row height avg

  • @AdamYarris
    @AdamYarris 6 лет назад +7

    Will the virtual scroller be compatible with things like CSS's nth-child and related pseudo-classes?

    • @slothymcgee6388
      @slothymcgee6388 6 лет назад

      or root variables?

    • @BitSec
      @BitSec 6 лет назад

      I think Yes because at 10:00 in you will see that they change the css to dark or bigger items and it also works for things that aren't yet inside the visual area.

    • @YinonOved
      @YinonOved 5 лет назад

      i think in some cases you would want it to ignore list elements which are not in dom yet - like for example not showing a bottom line if the element is last

  • @hohpark
    @hohpark 6 лет назад +1

    Great information! We can consider these ideas into our virtual list component and hope to support these feature by chromium soon (so that we can remove lots of js logics to handle virtual)

  • @derstreber2
    @derstreber2 6 лет назад +5

    I wonder if his clicker is powered by JavaScript.

  • @wedding_photography
    @wedding_photography 6 лет назад +4

    So if you don't lay out all 5000 elements on font resize, how do you know your precise scroll position?

    • @llothar68
      @llothar68 6 лет назад

      You don't and you don't really need. You estimate and then you do update the size when measuring later. I'm on desktop and there it works well with background threads.

    • @MCasterAnd
      @MCasterAnd 6 лет назад

      You scroll to the element that was first visible in the viewport?

    • @YTSliv
      @YTSliv 6 лет назад

      It's done on initial render once possibly offscreen, and onwards only show in-viewport content.
      So realistically you do not want any of those children and relayout the entire thing.

  • @Textras
    @Textras 6 лет назад +9

    Game changer but this has been a very long time coming. Long overdue. Please, prioritized and accelerated this.

  • @joelmackenzie
    @joelmackenzie 3 года назад

    Looks like this has been cancelled. :( What should I use instead?

  • @rickcode22
    @rickcode22 Год назад

    Is this virtual scroller can work to the entire page? because with react-window it generates a second scroll on the list that I'm working on

  • @omri9325
    @omri9325 5 лет назад +1

    Does it affect SEO?

  • @sitcomrave
    @sitcomrave 6 лет назад +3

    Where are the links for repo and examples ?

    • @pikaxDev
      @pikaxDev 6 лет назад +1

      github.com/valdrinkoshi/virtual-scroller

  • @pridetinuotrauka8822
    @pridetinuotrauka8822 6 лет назад

    So where's the scrollbar in the scroller? How users going to know, that that content is scollable? And will it be able to show the scrollbar bar positioned correctly?

    • @samuelgrahame3617
      @samuelgrahame3617 6 лет назад

      You add a 1x1 absolute div at the bottom right had side of the height of all the content.

  • @kzakaria91
    @kzakaria91 6 лет назад +2

    creed?

  • @octubre_lilaka
    @octubre_lilaka 3 года назад

    Imagine implementing a element with this where it takes the return value of a react.createElement tree and renders it to itself instead of using react-dom's render function to render into the body

  • @samuelgrahame3617
    @samuelgrahame3617 6 лет назад

    Virtual scrolling is how every other grids on any other platform works.

  • @radulaski
    @radulaski 3 года назад

    So what is the status of in 2021?

    • @BenjaminAster
      @BenjaminAster 2 года назад +1

      It has been cancelled and doesn't exist... :(

  • @corynorell3686
    @corynorell3686 6 лет назад

    Can someone briefly explain how he implemented the 'jank indicator' that makes the screen flash red, or point me towards documentation? Seems really useful.

    • @daspkicks
      @daspkicks 6 лет назад

      Here you go: developer.chrome.com/devtools/docs/rendering-settings

  • @slothymcgee6388
    @slothymcgee6388 6 лет назад

    that contour line looks sweet inverted is it all one path?

  • @augmentos
    @augmentos 4 года назад

    Confused. At 11:50 he shows a great example, but then says never do it this way

  • @SebastiaanDeckers
    @SebastiaanDeckers 6 лет назад

    Proposed standards should be namespaced by draft, version, vendor, etc. Is this actually released under "std:virtual-scroller" or is that just a demo of what it could eventually look like?

  • @justfly1984
    @justfly1984 6 лет назад

    That looks like extra http request to get this functionality, and you need to import virtual scroller before the , which is not good at all, and html-components... Although Invisible DOM looks nice.

  • @阴小海
    @阴小海 Год назад

    What happend ?

  • @cyb
    @cyb 6 лет назад

    If i implement this today can I just use a display none or visibility hidden outside the viewport?

    • @filemot25
      @filemot25 6 лет назад

      display: none might help with the rendering. But I would expect the amount of DOM nodes affect the performance regardless of visibility.

    • @TesterAnimal1
      @TesterAnimal1 3 года назад

      You can’t use use display:none on what’s scrolled off the top. Unless the “row” elements are absolutely positioned.
      Otherwise the still visible rows will move up. It’s not that easy a problem to solve.

  • @yandodov
    @yandodov 6 лет назад +1

    I think many people misunderstand how this would work. I don't think it would avoid laying out elements off the viewport. It would simply hide them in the manner of `visibility: hidden` where they are still part of the page, they are still part of the block formatting context, it's just that they can't be seen. So I'm guessing that invisible DOM would so something similar, but take it one step further. And `` would simply be the tool that makes DOM nodes invisible based on their location.

  • @Donaldo
    @Donaldo 6 лет назад

    Nothing new here. Old database-oriented gui toolkits did this in this 90s. Jquery and others implemented it. My problem is that the web doesn't make this *kind* of problem approachable. Replace "scroller" with something else and you have the same basic limitations of a traditional retained mode GUI.
    Now we get a lot of benefits out of retained mode (easy ctrl+f, accessibility technologies, web crawlers, declarative markup, and others) but we still aren't seeing anything really new that would simplify this class of problems.
    Most web devs don't even know what retained mode or immediate mode are.
    People were quick to ask, "what about control f?" But control f with invisible DOM doesn't scale either: you ultimately run out of some resource in your front-end. A new paradigm might be able to solve these problems instead of requiring us to solve individual instances of these problems over and over again.

  • @naythaniel
    @naythaniel 6 лет назад

    Mind blown

  •  6 лет назад +3

    Hello World!

  • @B1FREQUENCY
    @B1FREQUENCY 6 лет назад

    Establishing CyberSpace and How Enterprise inc. & U.S. Government Agencies intends To MONETIZE. Great Video and I love all the content your providing.

    • @B1FREQUENCY
      @B1FREQUENCY 6 лет назад

      What does the Flash & Red Screen affect the Retinas and therefore is there a current case study of blanking and Retina Fatigue & Psychologically?

  • @robertkaminski1781
    @robertkaminski1781 4 года назад

    content-visiblity: "auto" and virtual scroll is not necessary