# Density Toggle Component

**URL:** https://meta.discourse.org/t/density-toggle-component/350967
**Category:** Theme component
**Created:** [February 6, 2025, 11:13pm UTC](https://meta.discourse.org/t/density-toggle-component/350967 "2025-02-06T23:13:39Z")
**Posts on this page:** 14
**Page:** 1

<div class="post-metadata">

### Author: ![jordan.vidrine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jordan.vidrine/32/515563_2.png) [@jordan.vidrine](https://meta.discourse.org/u/jordan.vidrine)
#### Post date: [February 6, 2025, 11:13pm UTC](https://meta.discourse.org/t/density-toggle-component/350967/1 "2025-02-06T23:13:39Z")

</div>

| | | |
| --- | --- | --- |
| ℹ | **Summary** | Change your viewing density |
| 🛠 | **Repository** | [GitHub - discourse/density-toggle: This theme component allows users to set the density of their view of a Discourse forum. It includes default, cozy, and compact. · GitHub](https://github.com/discourse/density-toggle) |
| ❓ | **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) |

Install this theme component

This theme component allows users to set the density of their view of a Discourse forum. It includes default, cozy, and compact.

---

<div class="post-metadata">

### Author: ![Arkshine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arkshine/32/298682_2.png) [@Arkshine](https://meta.discourse.org/u/Arkshine)
#### Post date: [February 7, 2025, 4:23am UTC](https://meta.discourse.org/t/density-toggle-component/350967/2 "2025-02-07T04:23:14Z")

</div>

Awesome work, as usual, Jordan!

I noticed on iPadOS 18.1.1 that the menu doesn’t appear when clicking on the button in the sidebar. I do see the button focused, but nothing pops up. If I switch to desktop mode, it works.

EDIT: Actually, as long you are in mobile view.

 ![image](https://global.discourse-cdn.com/meta/original/4X/6/6/8/668066abd8e4f42049fef9f80fd473f905316d8b.png)

It seems to be z-index issue:

 ![The image displays a developer tool's interface with HTML elements, including a CSS block containing a class named "data-placeholder" with an attribute of "top," highlighted within a structure of other elements. (Captioned by AI)](https://global.discourse-cdn.com/meta/original/4X/6/b/c/6bc95252ad8f6c47b9c2abb232865e7f01f253cb.png)  
 ![The image shows a screenshot of a web developer's interface with a partially collapsed code editor displaying expanded CSS styles, including properties for max width and stacking context changes. (Captioned by AI)](https://global.discourse-cdn.com/meta/original/4X/2/d/e/2de487f7b9e0c5826d26a15b9a6bb88a28daebb8.png)

Another minor UX issue: The current density value is not selected by default the first time you visit the preferences. (On a side note, the labels don’t seem localized.)  
Edit: I think it’s more related to the value that has not yet been saved to the browser storage.

 ![image](https://global.discourse-cdn.com/meta/original/4X/7/5/a/75ae2019a165789792d4732f286023687f0162af.png)

I can see in the code that it’s ready to change the font, but I don’t see any interface for it. I assume this will be implemented later?

---

<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 7, 2025, 12:20pm UTC](https://meta.discourse.org/t/density-toggle-component/350967/3 "2025-02-07T12:20:32Z")

</div>

A few remarks when using **compact** :

Avatar’s flair keeps the regular size, which looks weird, and they overlap posts’ content.

 ![image](https://global.discourse-cdn.com/meta/original/4X/c/0/f/c0f8a0bb13ce4b27b765c3dce42654d5303fd519.png)

**Suggested** and **Related** buttons at the end of a topic overlap the topics list below.

 ![The image shows a notification screen indicating there are 112 unread topics and 41 new topics in a forum or messaging platform, along with a "Reply" button and a list of topics including a "Share Link Shortener" message. (Captioned by AI)](https://global.discourse-cdn.com/meta/original/4X/6/c/4/6c456a1bb3be2df9384d63a19ce850f1251610cf.png)

User preferences have a font size setting.  
I don’t think the compact view should alter the global font size at all. They should remain separate settings.

The topic map container doesn’t use 100% of the width. It should normally reach the right side.

 ![The image depicts an error message in a forum post about a plugin issue with "div-topic-map--bottom," where clicking on a topic fails to update the profile status. (Captioned by AI)](https://global.discourse-cdn.com/meta/original/4X/5/f/a/5fa9a2184d67a8a1bdbc1c7a3cb91a6628085806.png)

Same with the footer buttons.

 ![The image shows a forum post explaining a discrepancy in user online status on Who's Online, mentioning a setting of 5 minutes and an error with sidekiq not running, along with comments and interaction options. (Captioned by AI)](https://global.discourse-cdn.com/meta/original/4X/5/d/e/5def928a0b8eedf4d2665e5be21565814f8e0db1.png)

In the regular layout, `.topic-meta-data`, which contains the date, has a right padding that aligns the date with reply buttons:

 ![image](https://global.discourse-cdn.com/meta/original/4X/3/d/3/3d39ccf67f98fb6a7d238d6cbb054a409f551666.png)

This is not the case with the compact layout:

 ![image](https://global.discourse-cdn.com/meta/original/4X/1/2/1/121da5ae3af93377e635f56ca901e7ad970a6fea.png)

The absence of the horizontal line that separates posts in the regular layout makes the post list right side look weird. The dates and reply buttons are too close to each other. Each button and the date below _look like_ they’re parts of the same post, but they actually belong to different posts.

 ![A screenshot shows a Discord chat discussion, with users asking for assistance in customizing a plugin to display visitor statistics in the last 5 or 10 minutes using specific code options. (Captioned by AI)](https://global.discourse-cdn.com/meta/original/4X/6/8/4/6847e61eed17cd54c766580a48bfd9417f1676d7.png)

---

<div class="post-metadata">

### Author: ![jordan.vidrine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jordan.vidrine/32/515563_2.png) [@jordan.vidrine](https://meta.discourse.org/u/jordan.vidrine)
#### Post date: [February 7, 2025, 2:25pm UTC](https://meta.discourse.org/t/density-toggle-component/350967/4 "2025-02-07T14:25:37Z")

</div>

> [@Arkshine](#):
>
> I can see in the code that it’s ready to change the font, but I don’t see any interface for it. I assume this will be implemented later?

Yes, it’s all written and works properly, but I didnt want to introduce it just yet.

thanks for your other reports. I will look into them 😄

---

<div class="post-metadata">

### Author: ![tvavrda](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tvavrda/32/480674_2.png) [@tvavrda](https://meta.discourse.org/u/tvavrda)
#### Post date: [February 11, 2025, 8:19pm UTC](https://meta.discourse.org/t/density-toggle-component/350967/5 "2025-02-11T20:19:10Z")

</div>

The Install this theme component button here is not configured properly as it results in this:

 ![The image is a screenshot of an installation confirmation dialog box for the "Discourse Density Toggle" from a GitHub repository, asking the user if they are sure they want to install it. (Captioned by AI)](https://global.discourse-cdn.com/meta/original/4X/2/c/1/2c1b90c2a6c4183b76008045e9e762e0441cecd9.png)

… and it fails with this message

`An error occurred: Error cloning git repository, access is denied or repository is not found`.

It expects only the URL (without the markdown part)

---

<div class="post-metadata">

### Author: ![jordan.vidrine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jordan.vidrine/32/515563_2.png) [@jordan.vidrine](https://meta.discourse.org/u/jordan.vidrine)
#### Post date: [February 12, 2025, 5:12pm UTC](https://meta.discourse.org/t/density-toggle-component/350967/6 "2025-02-12T17:12:26Z")

</div>

Thanks for reporting, this is fixed.

---

<div class="post-metadata">

### Author: ![tvavrda](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tvavrda/32/480674_2.png) [@tvavrda](https://meta.discourse.org/u/tvavrda)
#### Post date: [February 13, 2025, 3:51pm UTC](https://meta.discourse.org/t/density-toggle-component/350967/7 "2025-02-13T15:51:51Z")

</div>

Hi again. Just tried the `compact` view together with `Enhanced` (AI summaries) view selected. The result is not likable. I guess the combination doesn’t make much sense but it’s possible to select it.

 ![The screenshot shows the Discord website showing example pages related to discussing various technical issues and job openings in the platform's development. (Captioned by AI)](https://global.discourse-cdn.com/meta/original/4X/5/5/9/559cff707262023cb95af44f47c19d11d3444554.png)

---

<div class="post-metadata">

### Author: ![tvavrda](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tvavrda/32/480674_2.png) [@tvavrda](https://meta.discourse.org/u/tvavrda)
#### Post date: [February 13, 2025, 5:36pm UTC](https://meta.discourse.org/t/density-toggle-component/350967/8 "2025-02-13T17:36:57Z")

</div>

A small observation. In `compact` mode if there is a flair, it goes over the post’s text.

 ![The image shows a social media post by Tobias Eien, reading "Looks like @Laptechinfo solve" on a dark background. (Captioned by AI)](https://global.discourse-cdn.com/meta/original/4X/9/6/e/96e4ca541c5ed13179de6e2f8c9e6426e5a083ef.png)

---

<div class="post-metadata">

### Author: ![jordan.vidrine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jordan.vidrine/32/515563_2.png) [@jordan.vidrine](https://meta.discourse.org/u/jordan.vidrine)
#### Post date: [February 13, 2025, 8:05pm UTC](https://meta.discourse.org/t/density-toggle-component/350967/9 "2025-02-13T20:05:47Z")

</div>

Thanks for the reports Thomas, I will take a look.

---

<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 13, 2025, 8:54pm UTC](https://meta.discourse.org/t/density-toggle-component/350967/10 "2025-02-13T20:54:24Z")

</div>

It’s the first thing I mentioned in my reply 😄

I’d be interested in hearing opinions about whether a compact view should alter the font size when a dedicated setting is already available.

It’s not a big deal obviousy as I won’t jump from a density setting to another twice a day… Being curious more than anything here.

I had a quick look at a few software that offers various density modes. I compact mode,

- Discord and Google Gmail/Calendar don’t change the font size.  
I believe Slack doesn’t too (I didn’t try, just looked at screenshots)

- Microsoft Outlook reduces the font size from 14px to 12px.

---

<div class="post-metadata">

### Author: ![jordan.vidrine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jordan.vidrine/32/515563_2.png) [@jordan.vidrine](https://meta.discourse.org/u/jordan.vidrine)
#### Post date: [February 13, 2025, 9:43pm UTC](https://meta.discourse.org/t/density-toggle-component/350967/11 "2025-02-13T21:43:16Z")

</div>

It’s a good question Canapin.

While creating the component I tried a couple different scenarios and decreasing the font size always felt like the best option.

---

<div class="post-metadata">

### Author: ![twofoursixeight](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/twofoursixeight/32/574822_2.png) [@twofoursixeight](https://meta.discourse.org/u/twofoursixeight)
#### Post date: [August 9, 2025, 5:30am UTC](https://meta.discourse.org/t/density-toggle-component/350967/12 "2025-08-09T05:30:29Z")

</div>

![IMG_0835](https://global.discourse-cdn.com/meta/original/4X/1/d/7/1d750dae0ed86fd66e3c2c145e54323683c07154.jpeg)  
Cozy

I’m not sure this is something to mention here but the gap between topics looks a little inconsistent  
with the newline in the cozy density mode compared to the normal  
density and the compact density.

> **Other density settings in the discourse stockpile**
>
> ![IMG_0834](https://global.discourse-cdn.com/meta/original/4X/2/3/e/23ecd11515e598cd1e6654a77f563f0057417055.jpeg)  
> default  
> ![IMG_0836](https://global.discourse-cdn.com/meta/original/4X/2/6/c/26cc208bc1e0c06199447df492a31514681cf398.jpeg)  
> compact

---

<div class="post-metadata">

### Author: ![patrickemin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/patrickemin/32/520162_2.png) [@patrickemin](https://meta.discourse.org/u/patrickemin)
#### Post date: [August 19, 2025, 7:31pm UTC](https://meta.discourse.org/t/density-toggle-component/350967/13 "2025-08-19T19:31:58Z")

</div>

Hi, I activated that TC for my FOUNDATION theme, I can see that TC settings on my PC (lower left side menu) but when using my mobile with that theme, that TC setting is not visible, any idea ? Thanks.

update: just found it in my preferences… (but not visible in the lower left side menu?)

---

<div class="post-metadata">

### Author: ![jordan.vidrine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jordan.vidrine/32/515563_2.png) [@jordan.vidrine](https://meta.discourse.org/u/jordan.vidrine)
#### Post date: [August 29, 2025, 6:42pm UTC](https://meta.discourse.org/t/density-toggle-component/350967/14 "2025-08-29T18:42:11Z")

</div>

Its hidden on mobile as to minimize its use on mobile. The settings will exist in user preferences there however if you really want the access.
