# "Reader Mode" theme component feedback

**URL:** https://meta.discourse.org/t/reader-mode-theme-component-feedback/304314
**Category:** Feature
**Tags:** feedback, completed, reader-mode
**Created:** [April 17, 2024, 1:55pm UTC](https://meta.discourse.org/t/reader-mode-theme-component-feedback/304314 "2024-04-17T13:55:07Z")
**Posts on this page:** 20
**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: [April 17, 2024, 1:55pm UTC](https://meta.discourse.org/t/reader-mode-theme-component-feedback/304314/1 "2024-04-17T13:55:07Z")

</div>

I recently installed a theme component here on Meta that introduces a “reader mode” when viewing a topic.

The button to toggle this feature is located at the top of the topic timeline controls:

 ![image](https://global.discourse-cdn.com/meta/original/4X/5/a/c/5ac635dfcb557627d367b8238b9521c489ed778a.jpeg)

Clicking it will put the topic into “reading mode”, covering most of the UI with a slightly opaque cover in order to minimize distraction.

Some other things that happen are a filter applied to all avatars and images, turning them into a greyscale image.

Here is a screen recording of it in use.

* * *

The component is available on the following themes installed here on meta:

- Air Theme
- Default
- Default (Full Width)
- Fully
- Meta Branded
- Redditish
- Sam’s Simple Theme

This is still a WIP and would appreciate any bug reports or feedback be posted here 😄

---

<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: [April 17, 2024, 2:09pm UTC](https://meta.discourse.org/t/reader-mode-theme-component-feedback/304314/2 "2024-04-17T14:09:03Z")

</div>

Very cool!

One thing I noticed is that some of the styling changes cause the layout to ‘jump’ when I click the button. I guess some elements are being `display: none;`'d? Or some font sizes are changing?

Would it be feasible to make the button purely ‘grey out’ (or `visibility: hidden;`) unnecessary elements, without causing any layout shift?

---

<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: [April 17, 2024, 2:10pm UTC](https://meta.discourse.org/t/reader-mode-theme-component-feedback/304314/3 "2024-04-17T14:10:39Z")

</div>

> [@david](#):
>
> One thing I noticed is that some of the styling changes cause the layout to ‘jump’ when I click the button. I guess some elements are being `display: none;`'d? Or some font sizes are changing?
> 
> Would it be feasible to make the button purely ‘grey out’ unnecessary elements, without causing any layout shift?

Yes, this was a pain I encountered.

Ideally, the sidebar would animate closed, as it does when you click the sidebar toggle normally.

Since my component closes the sidebar, but doesnt animate it, it turns out to be a jolt.

I could either:

- animate the sidebar closed
  - im unsure how to do this, as I _think_ its done via JS + Css?

- dont close sidebar

---

<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: [April 17, 2024, 2:14pm UTC](https://meta.discourse.org/t/reader-mode-theme-component-feedback/304314/4 "2024-04-17T14:14:02Z")

</div>

How about `visibility: hidden;`? Or `opacity: 0;`? So it’s still there & included in the layout, but invisible? I guess we’d need something to prevent clicks/focus on it as well? Or maybe we make it visible again on hover/focus? 🧐

> [@jordan.vidrine](#):
>
> animate the sidebar closed
> 
> - im unsure how to do this, as I _think_ its done via JS + Css?

One relatively safe way would be to mimic the user interaction:

```js
if(document.body.classList.contains("has-sidebar-page")){ // Sidebar is visible
  document.querySelector(".btn-sidebar-toggle").click()
}

```

---

<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: [April 17, 2024, 2:16pm UTC](https://meta.discourse.org/t/reader-mode-theme-component-feedback/304314/5 "2024-04-17T14:16:00Z")

</div>

> [@david](#):
>
> How about `visibility: hidden;`? Or `opacity: 0;`? So it’s still there & included in the layout, but invisible?

Are you speaking of sidebar?

If so, I am actually toggling it closed with my component, so it’s using the same core way like this:

```js
  @action
  toggleReaderMode() {
    if (this.sidebarIsOpen && !this.isActive) {
      getOwner(this).lookup("controller:application").set("showSidebar", false);
      this.readerModeActive = !this.readerModeActive;
    } else {
      getOwner(this).lookup("controller:application").set("showSidebar", true);
      this.readerModeActive = false;
    }
  }

```

There is nothing on the page that I am actually removing other than toggling this sidebar closed.

---

<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: [April 17, 2024, 2:18pm UTC](https://meta.discourse.org/t/reader-mode-theme-component-feedback/304314/6 "2024-04-17T14:18:10Z")

</div>

> [@jordan.vidrine](#):
>
> I am actually toggling it closed

Right, but that causes a layout shift. So I’m thinking we could leave it open, but make it invisible?

---

<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: [April 17, 2024, 2:22pm UTC](https://meta.discourse.org/t/reader-mode-theme-component-feedback/304314/7 "2024-04-17T14:22:20Z")

</div>

> [@david](#):
>
> Right, but that causes a layout shift. So I’m thinking we could leave it open, but make it invisible?

Ok yes, sorry for the confusion. I am understanding you now. Since the reader mode isnt known to be a toggle for sidebar, it could be confusing that it’s toggled, causing the shift when you didnt want that to happen.

I guess I assumed if the sidebar toggle causes a shift, then the reader mode doing the same thing wouldnt matter.

I can try _not_ toggling the sidebar and posting a video here to show you.

---

<div class="post-metadata">

### Author: ![Moin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moin/32/554653_2.png) [@Moin](https://meta.discourse.org/u/Moin)
#### Post date: [April 17, 2024, 2:44pm UTC](https://meta.discourse.org/t/reader-mode-theme-component-feedback/304314/8 "2024-04-17T14:44:15Z")

</div>

When the sidebar is closed before you use the reader mode button, the sidebar opens, and afterwards, the button does not do anything.

---

<div class="post-metadata">

### Author: ![Jagster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagster/32/192154_2.png) [@Jagster](https://meta.discourse.org/u/Jagster)
#### Post date: [April 17, 2024, 2:53pm UTC](https://meta.discourse.org/t/reader-mode-theme-component-feedback/304314/9 "2024-04-17T14:53:11Z")

</div>

I was wondering what the heck that new icon was. Now I know. Thanks.

But.

DiscourseHub, iPad and theme default: all it does is expanding the sidebar.

Edit.

Ok, I have to first open the sidebar. After that the magic happends. Except… I don’t use the sidebar here 😏

---

<div class="post-metadata">

### Author: ![bryce](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bryce/32/377822_2.png) [@bryce](https://meta.discourse.org/u/bryce)
#### Post date: [April 17, 2024, 3:12pm UTC](https://meta.discourse.org/t/reader-mode-theme-component-feedback/304314/10 "2024-04-17T15:12:31Z")

</div>

Looks great!

Not sure how difficult it would be, but I was thinking it would be nice if the user could hit ESC to exit reader mode. Since the button is considered part of the timeline, if you scroll to the very bottom of the topic, the button can go off screen.

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

---

<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: [April 17, 2024, 3:43pm UTC](https://meta.discourse.org/t/reader-mode-theme-component-feedback/304314/11 "2024-04-17T15:43:28Z")

</div>

It’s a very cool feature. Excellent job, Jordan! 👍

As David said, I’m wondering if it’s possible not to shift the content.  
Also, is there a particular reason for reducing the original width? I might not be aware of some limitations, though.

What I mean is _somewhat_ like this:

![chrome_oW7GzSDCWw](https://global.discourse-cdn.com/meta/original/4X/d/2/c/d2c225ab852969c0af2e0518dd17e3bd9faf9534.gif)

---

<div class="post-metadata">

### Author: ![piffy](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/piffy/32/254198_2.png) [@piffy](https://meta.discourse.org/u/piffy)
#### Post date: [April 17, 2024, 4:02pm UTC](https://meta.discourse.org/t/reader-mode-theme-component-feedback/304314/12 "2024-04-17T16:02:33Z")

</div>

Functionality, all this appears to do is hide the timeline and notification bar, since the sidebar is already collapsible. I don’t really see the experience being changed or improved sufficiently to have another button in every topic.

It would make more sense if it changed the reading experience in some meaningful way like making it full width in Reader Mode. As it is now, I would probably never use this feature so ironically all it’s doing for me is adding more visual noise to the timeline.

---

<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: [April 17, 2024, 5:36pm UTC](https://meta.discourse.org/t/reader-mode-theme-component-feedback/304314/13 "2024-04-17T17:36:57Z")

</div>

> [@piffy](#):
>
> It would make more sense if it changed the reading experience in some meaningful way like making it full width in Reader Mode. As it is now, I would probably never use this feature so ironically all it’s doing for me is adding more visual noise to the timeline.

I have some longer term goals to add in options for font, text size, width of content, etc. But for now, this is just a small experiment and a WIP.

---

<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: [April 17, 2024, 5:40pm UTC](https://meta.discourse.org/t/reader-mode-theme-component-feedback/304314/14 "2024-04-17T17:40:48Z")

</div>

The latest changes to limit movement & have a better transition have been merged into this component. Thanks for the feedback so far 😄

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [April 17, 2024, 6:49pm UTC](https://meta.discourse.org/t/reader-mode-theme-component-feedback/304314/15 "2024-04-17T18:49:47Z")

</div>

I like this a lot!

> [@jordan.vidrine](#):
>
> This is still a WIP and would appreciate any bug reports or feedback be posted here 😄

Hiding the topic-map creates a big gap between the OP and the first reply. I wonder what a greyscaled topic map would look like.

 ![image](https://global.discourse-cdn.com/meta/original/4X/9/7/f/97fc7b0ce32903923d42ccbf25d56b328fdb2396.png)

I can reply to the OP, or reply directly to posts in Reader Mode. Maybe it should also be possible to reply from the bottom of the topic?

 ![image](https://global.discourse-cdn.com/meta/original/4X/d/a/5/da587c15d028500e95b1647862e60a41b2db8963.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: [April 17, 2024, 7:04pm UTC](https://meta.discourse.org/t/reader-mode-theme-component-feedback/304314/16 "2024-04-17T19:04:40Z")

</div>

> [@simon](#):
>
> Hiding the topic-map creates a big gap between the OP and the first reply. I wonder what a greyscaled topic map would look like.
> 
> ![image](https://global.discourse-cdn.com/meta/original/4X/9/7/f/97fc7b0ce32903923d42ccbf25d56b328fdb2396.png)

Yeah, maybe I can make it a bit transparent as well. I tried hiding it with a smooth transition, but because of the way we render items in our list, sometimes this _isnt_ visible, and trying to hide it becomes a pain.

It’s the same with all of the small post notices & time gaps. The only way I could think is to use an element observer API, but even then, the movement is slightly unpredictable and I was noticing jitteriness randomly happening.

> [@simon](#):
>
> I can reply to the OP, or reply directly to posts in Reader Mode. Maybe it should also be possible to reply from the bottom of the topic?

This makes sense to me 👍

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [April 17, 2024, 11:14pm UTC](https://meta.discourse.org/t/reader-mode-theme-component-feedback/304314/17 "2024-04-17T23:14:46Z")

</div>

Keyboard shortcut (CTRL-something) to toggle would be awesome here (and we can teach about it when you hover on the button)

Not a fan of black and whiting the images, I feel like I am losing info.

I am pro though removing a lot of chrome like “like counts”, reply button, maybe even avatars.

---

<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: [April 18, 2024, 11:33am UTC](https://meta.discourse.org/t/reader-mode-theme-component-feedback/304314/18 "2024-04-18T11:33:53Z")

</div>

Nice improvement, Jordan! It’s a much better experience not to see any movement shift now and some animation to smooth the transition. 👍

I agree with Sam’s suggestions; if we hide non-essential information, having the color back would make a good compromise. That could be an option, though. 🤔

---

<div class="post-metadata">

### Author: ![denvergeeks](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/denvergeeks/32/327671_2.png) [@denvergeeks](https://meta.discourse.org/u/denvergeeks)
#### Post date: [April 20, 2024, 6:25am UTC](https://meta.discourse.org/t/reader-mode-theme-component-feedback/304314/19 "2024-04-20T06:25:04Z")

</div>

> [@jordan.vidrine](#):
>
> I have some longer term goals to add in options for font, text size, width of content, etc.

Yes, yes yes!!!

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [April 22, 2024, 9:25pm UTC](https://meta.discourse.org/t/reader-mode-theme-component-feedback/304314/20 "2024-04-22T21:25:00Z")

</div>

Once you’re in reader mode, you have to click to get to another page, and then, if you want reader mode, you have to click again to turn it back on. Maybe make the other nav links a tiny bit less hidden and let them work and leave it on when we get to the next topic.

Another idea, turn it off automatically when you get to the end of the topic.

Or, automatically navigate to the next topic in the last topic-list you visited!

[Next page](https://meta.discourse.org/t/reader-mode-theme-component-feedback/304314.md?page=2)
