# Horizontal loading slider

**URL:** https://meta.discourse.org/t/horizontal-loading-slider/177939
**Category:** Theme component
**Tags:** deprecated
**Created:** [February 1, 2021, 9:57am UTC](https://meta.discourse.org/t/horizontal-loading-slider/177939 "2021-02-01T09:57:32Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [February 1, 2021, 9:57am UTC](https://meta.discourse.org/t/horizontal-loading-slider/177939/1 "2021-02-01T09:57:32Z")

</div>

> 🚨 **This functionality is now part of Discourse core. Use the ‘page loading indicator’ setting to enable it.** More details [below](https://meta.discourse.org/t/horizontal-loading-slider/177939/254).

This theme component removes the core Discourse loading spinner, and replaces it with a loading slider at the top of the screen. This is a common approach on other sites (e.g. GitHub). The advantage is that there is less ‘flickering’ of content during a page change. Potential disadvantage is that it makes Discourse feel less like an app and more like a webpage.

| normal | with theme component |
| --- | --- |
| ![ezgif-6-370e14693a43](https://global.discourse-cdn.com/meta/original/3X/7/b/7b8b5200494d19732663fe2dce2beefc5fc43a33.webp) | ![ezgif-6-f4ed194f762c](https://global.discourse-cdn.com/meta/original/3X/2/d/2d060e4a585c11b36bd976ab382b3196a384ef77.webp) |

**Known Issues:**

- Latest / Top / Unread… dropdown [gets stuck on mobile](https://meta.discourse.org/t/experiment-on-meta-loading-slider/177939/95) ✅

- discourse-encrypt incompatibilities (e.g. topic titles getting stuck when switching between topics)

| | | |
| --- | --- | --- |
| 👓 | **Preview** | [Theme creator](https://theme-creator.discourse.org/theme/david/loading-slider) |
| 🛠 | **Repository** | [https://github.com/davidtaylorhq/discourse-loading-slider](https://github.com/davidtaylorhq/discourse-loading-slider) |
| ❓ | **Install Guide** | [How to install a theme or theme component](https://meta.discourse.org/t/how-do-i-install-a-theme-or-theme-component/63682) |
| 📖 | **New to Discourse Themes?** | [Beginner’s guide to using Discourse Themes](https://meta.discourse.org/t/beginners-guide-to-using-discourse-themes/91966) |

---

<div class="post-metadata">

### Author: ![justin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/justin/32/157614_2.png) [@justin](https://meta.discourse.org/u/justin)
#### Post date: [February 1, 2021, 3:23pm UTC](https://meta.discourse.org/t/horizontal-loading-slider/177939/2 "2021-02-01T15:23:43Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [February 1, 2021, 3:41pm UTC](https://meta.discourse.org/t/horizontal-loading-slider/177939/3 "2021-02-01T15:41:23Z")

</div>

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

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [February 1, 2021, 3:42pm UTC](https://meta.discourse.org/t/horizontal-loading-slider/177939/4 "2021-02-01T15:42:50Z")

</div>

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

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [February 1, 2021, 3:44pm UTC](https://meta.discourse.org/t/horizontal-loading-slider/177939/5 "2021-02-01T15:44:30Z")

</div>



---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [February 1, 2021, 4:03pm UTC](https://meta.discourse.org/t/horizontal-loading-slider/177939/6 "2021-02-01T16:03:08Z")

</div>

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

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [February 1, 2021, 4:06pm UTC](https://meta.discourse.org/t/horizontal-loading-slider/177939/7 "2021-02-01T16:06:38Z")

</div>

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 🤔

---

<div class="post-metadata">

### Author: ![justin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/justin/32/157614_2.png) [@justin](https://meta.discourse.org/u/justin)
#### Post date: [February 1, 2021, 4:33pm UTC](https://meta.discourse.org/t/horizontal-loading-slider/177939/8 "2021-02-01T16:33:49Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Jonathan5](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jonathan5/32/197134_2.png) [@Jonathan5](https://meta.discourse.org/u/Jonathan5)
#### Post date: [February 1, 2021, 4:35pm UTC](https://meta.discourse.org/t/horizontal-loading-slider/177939/9 "2021-02-01T16:35:21Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [February 1, 2021, 4:40pm UTC](https://meta.discourse.org/t/horizontal-loading-slider/177939/10 "2021-02-01T16:40:00Z")

</div>



---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [February 1, 2021, 4:40pm UTC](https://meta.discourse.org/t/horizontal-loading-slider/177939/11 "2021-02-01T16:40:59Z")

</div>

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

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [February 3, 2021, 1:41am UTC](https://meta.discourse.org/t/horizontal-loading-slider/177939/13 "2021-02-03T01:41:00Z")

</div>

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

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [February 3, 2021, 12:58pm UTC](https://meta.discourse.org/t/horizontal-loading-slider/177939/15 "2021-02-03T12:58:57Z")

</div>



---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [February 3, 2021, 12:59pm UTC](https://meta.discourse.org/t/horizontal-loading-slider/177939/16 "2021-02-03T12:59:54Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![fzngagan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fzngagan/32/259349_2.png) [@fzngagan](https://meta.discourse.org/u/fzngagan)
#### Post date: [February 3, 2021, 1:19pm UTC](https://meta.discourse.org/t/horizontal-loading-slider/177939/17 "2021-02-03T13:19:14Z")

</div>

Looking awesome. 👍🏻 Keep up the good work.

---

<div class="post-metadata">

### Author: ![TheDarkWizard](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/thedarkwizard/32/177913_2.png) [@TheDarkWizard](https://meta.discourse.org/u/TheDarkWizard)
#### Post date: [February 3, 2021, 2:03pm UTC](https://meta.discourse.org/t/horizontal-loading-slider/177939/18 "2021-02-03T14:03:35Z")

</div>

The bar is way better.

---

<div class="post-metadata">

### Author: ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)
#### Post date: [February 3, 2021, 2:15pm UTC](https://meta.discourse.org/t/horizontal-loading-slider/177939/19 "2021-02-03T14:15:44Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Terrapop](https://avatars.discourse-cdn.com/v4/letter/t/ecd19e/32.png) [@Terrapop](https://meta.discourse.org/u/Terrapop)
#### Post date: [February 3, 2021, 2:17pm UTC](https://meta.discourse.org/t/horizontal-loading-slider/177939/20 "2021-02-03T14:17:53Z")

</div>

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

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

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [February 3, 2021, 2:20pm UTC](https://meta.discourse.org/t/horizontal-loading-slider/177939/21 "2021-02-03T14:20:40Z")

</div>

> [@Terrapop](#):
>
> How to set/change the color of the loading bar though?

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.

> [@Canapin](#):
>
> If you’re on meta home, click on the logo, and you’ll see the spinner instead of the bar.

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

---

<div class="post-metadata">

### Author: ![TheDarkWizard](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/thedarkwizard/32/177913_2.png) [@TheDarkWizard](https://meta.discourse.org/u/TheDarkWizard)
#### Post date: [February 3, 2021, 2:22pm UTC](https://meta.discourse.org/t/horizontal-loading-slider/177939/22 "2021-02-03T14:22:29Z")

</div>

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

[Next page](https://meta.discourse.org/t/horizontal-loading-slider/177939.md?page=2)
