Slider de carregamento horizontal

:police_car_light: Esta funcionalidade agora faz parte do núcleo do Discourse. Use a configuração ‘indicador de carregamento da página’ para ativá-la. Mais detalhes abaixo.

Este componente de tema remove o spinner de carregamento padrão do Discourse e o substitui por uma barra de carregamento no topo da tela. Essa é uma abordagem comum em outros sites (por exemplo, GitHub). A vantagem é que há menos “piscamento” de conteúdo durante a troca de páginas. A desvantagem potencial é que o Discourse passa a parecer menos um aplicativo e mais uma página da web.

normal com componente de tema
ezgif-6-370e14693a43 ezgif-6-f4ed194f762c

Problemas Conhecidos:

  • O menu suspenso “Mais recentes / Topos / Não lidos…” fica travado em dispositivos móveis :white_check_mark:

  • Incompatibilidades com o discourse-encrypt (por exemplo, títulos de tópicos ficando travados ao alternar entre tópicos)

92 curtidas

This is so much more visually appealing to me. The loading spinner is nice but quite jarring.

25 curtidas

Can we give it a try for a day or two on Meta @david ?

16 curtidas

Sure, let’s see what it feels like. Enabled here on Meta :+1: (And temporarily pinned/renamed this topic so people know it’s happening)

25 curtidas

While I like it, it does feel quite slower. Maybe it’s because I have ~250ms latency from Meta.

14 curtidas

Yeah I am torn on it. I like that it stops the full-page flickering, but it does make the UI feel a little less responsive :thinking:

15 curtidas

Conversely I feel it makes the page feel faster with a low latency connection. Though the UI responsiveness is different.

13 curtidas

I preferred the spinner, though to be honest I hadn’t really been aware of it. I like the way it is there for a split second then the page appears suddenly. This seems fast. With the bar, it makes me more aware of waiting. I found myself still looking at it when otherwise I could have started reading the page.

It might be some improvement if it “ended” at an earlier stage of page loading.

Or if you want to move away from the old spinner what about a new spinner that is like a circular version of the bar - reaching 360 degrees just before it disappears?

10 curtidas

This was exposing a few different rendering bugs (e.g. navigating directly from one topic to another would cause issues displaying the OP). Removed from Meta for now, but you can still try it out using the theme creator link in the OP

14 curtidas

Oh yes, this is 100% better, feel free to make it so!

17 curtidas

The topic rendering bug should now be ironed out, so I’ve re-enabled this here on Meta. Let’s see how we get on with it.

17 curtidas

Looking awesome. :+1:t2: Keep up the good work.

9 curtidas

The bar is way better.

6 curtidas

I like it very much, even if customized spinners won’t show up most of the time.
One issue though. The loading bar isn’t used when you reload the topic or topic list you’re on.
If you’re on meta home, click on the logo, and you’ll see the spinner instead of the bar.

8 curtidas

I like it much better than the spinner. Great work!

How to set/change the color of the loading bar though?

6 curtidas

Currently it’s set based on the ‘quaternary’ color in the color scheme. It would be easy to customize individually via CSS if you wanted to.

Good catch, thanks. I’ll see if I can override that situation as well :+1:

12 curtidas

Is the goal to eventually move this into core Discourse and not require a theme component?

7 curtidas