XF 2.3 A first look at XenForo 2.3

Well, here we are with our first Have you seen thread for XenForo 2.3.

It's been a long time coming, and for various reasons that we will go into later, it has changed quite a bit from what we had originally intended it to be, but it's finally ready to start showing you what's new.

tl;dr: there's a video at the end of this post.

Dark mode​

A lot of the new stuff in XenForo 2.3 is related to performance improvements that won't be immediately apparent on first glance, but there is one new feature in particular that is very obvious, and that is the new dark mode.

1694695492940.png


1694612354992.png


1694612120532.png


1694616451007.png


1694617171895.png


1694617408731.png


If the device with which you are browsing a XenForo site is configured to use its own dark mode, XenForo will switch itself to use the dark theme. Alternatively, you can request either the light, dark, or system-controlled theme using the gadget in the footer next to the style chooser. This will switch the mode instantly, without a page reload.

1694612251510.png


This is not XenForo 3.0​

This is not the big design overhaul that was originally targeted for 2.3, which included sweeping changes to the template system and introduced a range of new technologies to provide a significant improvement to many areas of XenForo.

When it became clear that the new design would introduce unresolvable backward-compatibility issues, the decision was made to back out the new design and reserve it for a version of XenForo we will call 3.0. Instead, we decided to ship the new functionality that we have built for 2.3 without the new design, so that existing users can gain access to all the new features without worrying about a major maintenance job to get it integrated.

Some of the new systems that we built to support the 3.0 design have been adapted to work with the 2.3 system, and support for dark mode is one of them.

Style variations​

The dark mode is built on top of a brand new style variations system. This system allows defining alternate sets of certain style properties, namely colors, to be switched dynamically without a page reload.

We currently expose two variations, which we dub 'default' and 'alternate'. In the default style, the default variation corresponds to the light theme and the alternate variation corresponds to the dark theme.

When both variations correspond to different style types (that is, light or dark), we expose them using the prefers-color-scheme media query. This automatically selects a variation based on the device's preferred color scheme when a user has not explicitly chosen a variation to use.

However, you could also set both variations as light or dark. In this case, the gadget in the footer will display the variation names instead, still allowing users to switch to a different color palette at whim.

Many sites running XenForo already run with a third-party dark style, but it's important to note that offering both light and dark styles to your visitors would previously have entailed providing completely separate styles, and while the dark style may have inherited most of its templates and style properties from a light parent, there would still have been a performance penalty tied to supporting both of these styles. With the style variations system in XenForo 2.3, this is no longer the case. Both variations of the style are handled within a single style. Those administrators who maintain multiple styles and have to handle inheritance between them will appreciate how much easier this will make style management.

1694602899783.png


Default and alternate​

Furthermore, while light styles can now be extended to support a dark variation, the same is true of existing dark styles, which can now define a light variation. At present, we refer to the Default and Alternate variations, where Default could be light or dark, and Alternate is (usually) the opposite.

1694602934013.png


Style properties​

From a style designer's perspective, style variations are handled as part of the style properties system. Style properties defined as a color value may be edited to enable variations, in which case they will accept values for each of the variations defined in the style.

1694602777696.png


With variations enabled, the user is free to define completely different versions of the color for each variation.

1694602968075.png


Note that the ability to support variations is limited to color value type style properties and does not extend to CSS-type properties. Of course, that does not mean that CSS-type properties are unable to benefit from the variations system, because the color values they reference may themselves be variants. That is to say, if your header CSS uses @xf-chromeBg, which in turn references @xf-paletteColor5, then it will automatically pick up the variant value of @xf-paletteColor5 when defined.

Future extension​

In a future version of XenForo, depending upon feedback, we may add support for defining additional variations, and extend the range of style properties which support variations beyond color properties. This could allow variations with different padding or typography choices, all within a single style.

UI improvements​

You will notice that we have significantly increased the size of the color preview chip next to these controls, and that the style property editor has become faster to operate, as style property changes are now saved without the need to reload the page.

Additionally, in style properties where palette colors are referenced, variations are automatically inherited when using either the default or alternate fields, and can be manipulated using the standard color editing functions provided by XenForo, such as darken and xf-intensify.

Naturally, the xf-intensify and xf-diminish functions now respect the light or dark mode within which they are operating, pushing colors either darker or lighter depending upon the way in which the current variation is flagged.

HSL color space​

You may have spotted from the images shown so far that we are now making use of HSL color space. While colors in XenForo were largely defined in RGB format, either as RGB decimal or hexadecimal values, this system presents challenges to some users, as adjustment of red, green and blue values is required to achieve even simple changes like making a color darker. HSL (hue, saturation and lightness) brings a more human-friendly color system, where the tone (hue) of the color is defined with a single value, then the intensity (saturation) and brightness (lightness) can also be adjusted with a single value change.

The color picker has been updated to reflect this change.

1694603931568.png


CSS variables​

Furthermore, each component of the HSL colour is now represented as a CSS variable. In XenForo 2.3 this allows the switching between light and dark variations, but its full utility will become apparent with XenForo 3.

A fun thing to try when you get access to 2.3, use your browser's inspector to locate the HSL values for paletteNeutral3, defined as the CSS variables --xf-paletteNeutral3--h, --xf-paletteNeutral3--s, and --xf-paletteNeutral3--l and use your cursor keys to adjust the value up and down. You will see that all instances of that color in use on the page react immediately, regardless of any adjustments made to them in subsequently inherited colors. Here, we have adjusted xf-paletteNeutral3 from hsl(0, 0%, 8%) to hsl(200, 50%, 20%) using the inspector in Chrome, resulting in changes to various backgrounds and borders that are based on adjustments of the original color.

1694608756513.png


Of note here is that the operations being performed on the colors are done on the client side rather than with the server-side LESS processor, so it's much easier to prototype sweeping color adjustments.

Making it your own​

In order to prevent any unexpected behavior when you upgrade to XenForo 2.3, we will not make changes to any of your styles. This includes marking your styles as supporting variations.

To enable variations, edit each of your styles in turn and toggle the 'Enable variations' option. Next, jump into the style properties editor for that style and concentrate on the Color palette and Basic colors groups.

In the default style, we took each of the Palette and Accent colors and reduced their saturation and lightness a little for the dark variation so that they are a little more muted against a dark background. We did not adjust the Neutral colors at all.

Next, in the Basic colors group, we switched around references to the Neutral 3 (dark) and Neutral 1 (light) colors, and in some cases reversed the references to palette colors, so references to Palette 1 now point to Palette 5 etc., making further adjustments with the built-in color functions as necessary.

1694619513607.png


If you follow these guidelines with your own styles, you should be able to quickly build dark variations that are suitable for use on your site.

Video​


Here's a video showing everything in action:

To view this content we will need your consent to set third party cookies.
For more detailed information, see our cookies page.
 
Me. No one does dark mode right except discord. Everyone else the text burns my eyes.
Yeah fair, I meant on big sites, I didn't mean XenForo dark mode. I prefer it on just about all sites i use funny enough except XenForo and I cannot tell why. Maybe Im just so used to the light mode here (still doing dark mode but not quite enjoying Id agree) or maybe it is the font size or something...
 
same. i am fine with dark mode on most content websites like for news. gmail and even google search. but xenforo dark mode just does not work for me. i mean the blue color theme for links does not help and i would eventually change it on my own website. but it just hurts.

sites like twitter are just better on amoled dark mode. threads as well. their dark modes on mobile apps have a glossy look which just feels nice in the end.
 
The default will always be "System" because that's the most sensible default and aligns with what the user already has set in their operating system/device preferences.

There is no good reason to force a user's preferences to be specifically "Light" or specifically "Dark". Whatever the "System" value is will very likely be much more correct than whatever the admin thinks the default should be.

It's also worth noting that Discord did this for April Fools a few years ago. In less than a day they were reverting the change due to people no longer being able to use their product, so site owners ought to keep this in mind before forcing theme changes on users:

To view this content we will need your consent to set third party cookies.
For more detailed information, see our cookies page.
To view this content we will need your consent to set third party cookies.
For more detailed information, see our cookies page.
 
It's worth keeping in mind for literally anything.

I've noticed over many years, forum admins like to exert a certain amount of control over their users. Sometimes this can be for their own good - it can benefit some communities to have things simplified. Often, however, I feel that it's just taking a valid choice or sensible default away from the user. This is egregiously one of those cases. They've already set it how they want in their OS, deviating from that is not a good thing.
 
It's also worth noting that Discord did this for April Fools a few years ago. In less than a day they were reverting the change due to people no longer being able to use their product, so site owners ought to keep this in mind before forcing theme changes on users:

To view this content we will need your consent to set third party cookies.
For more detailed information, see our cookies page.
To view this content we will need your consent to set third party cookies.
For more detailed information, see our cookies page.
Xenforo pranked us with a green style a few years ago.
It was taken down 18 months later because people wanted to discuss this version.
Now people want a dark version, just to go with their existing light version and a system version which changes when you’re having the sun come up to it sunsetting.
Xenforo love to throw in a joke or two.
I noticed that they’re a fan of Macca’s McFlurry so much so that you can see it as a name in one of the screenshots. 😂
 
It's worth keeping in mind for literally anything.

I've noticed over many years, forum admins like to exert a certain amount of control over their users. Sometimes this can be for their own good - it can benefit some communities to have things simplified. Often, however, I feel that it's just taking a valid choice or sensible default away from the user. This is egregiously one of those cases. They've already set it how they want in their OS, deviating from that is not a good thing.
This.
I often ask my crew on what new features do they want via a poll.
We will choose something.
All whilst discussing the other things that seem to be important.
Even the Default style gets mentioned.
We will talk about colours, third party styles and their colours.
We’ve even discussed this about 2.3 when it comes out.
 
I've noticed over many years, forum admins like to exert a certain amount of control over their users. Sometimes this can be for their own good - it can benefit some communities to have things simplified. Often, however, I feel that it's just taking a valid choice or sensible default away from the user. This is egregiously one of those cases. They've already set it how they want in their OS, deviating from that is not a good thing.
It also happens with companies foisting their own preferences onto their customers. Got a great example.

When I was choosing between forum software in 2021, I liked Invision and the many modules it supports, but hated that it didn't have post numbers. That's a real dealbreaker for me. The price was also an issue, but not so bad if I left a few modules out that I didn't strictly need and I already had a full, but dormant, license that I'd bought from someone who'd given up on running a forum years before, so I just needed to pay the renewal price., which was waaay cheaper.

I asked them about why they don't use them and is there any way to bring them back since earlier versions had it. They said it's due to post numbers changing when mods delete posts and elaborated a bit on it. Yes, I know that can happen, but not such a problem for me, I want post numbers and I have my reasons, which I explained. So, could they make it a switchable option in the ACP perhaps, or is there an add-on for this?

No chance. Forget it. Stop asking silly questions.

They stuck to their guns and said that they're not coming back, ever. They were polite about it at least, I'll give them that and there was no animosity on either side, thankfully. Note that they'd even produced an add-on once which restored them, but then pulled it as they just don't like post numbers.

Result: I didn't renew the license and went with XF instead due to it being such a dealbreaker for me. I wonder how many other customers have walked over this issue. Clearly not enough to make them sit up and notice, but it's still a negative effect on their sales.

Why the hell it's so important for them to deny their customers such a basic feature and let them decide whether to switch it on or not mystifies me. It's not even something that needs to be developed from scratch, as it used to have it and is trivial to restore.
 
Last edited:
It's light vs dark wars now!
wonder how many other customers have walked over this issue.
not over that issue I can’t actually remember why. But as a user, e.g. for Affinity support I really dislike that format. Using the forum is like a last resort, even worse than sitting through a YouTube video to find support.
 
Why the hell it's so important for them to deny their customers such a basic feature and let them decide whether to switch it on or not mystifies me. It's not even something that needs to be developed from scratch, as it used to have it and is trivial to restore.
For me, and I mean no offense, but this shows a lack of understanding on how hard it is to build a product that is customizable and served to the many. "Why doesn't company X build some feature Y for ME. It is such a basic feature." Often times there are tons of valid reasons, just hard to explain by a support or sales person, and there is a lot of nuance under the hood.
 
It also happens with companies foisting their own preferences onto their customers. Got a great example.

When I was choosing between forum software in 2021, I liked Invision and the many modules it supports, but hated that it didn't have post numbers. That's a real dealbreaker for me. The price was also an issue, but not so bad if I left a few modules out that I didn't strictly need and I already had a full, but dormant, license that I'd bought from someone who'd given up on running a forum years before, so I just needed to pay the renewal price., which was waaay cheaper.

I asked them about why they don't use them and is there any way to bring them back since earlier versions had it. They said it's due to post numbers changing when mods delete posts and elaborated a bit on it. Yes, I know that can happen, but not such a problem for me, I want post numbers and I have my reasons, which I explained. So, could they make it a switchable option in the ACP perhaps, or is there an add-on for this?

No chance. Forget it. Stop asking silly questions.

They stuck to their guns and said that they're not coming back, ever. They were polite about it at least, I'll give them that and there was no animosity on either side, thankfully. Note that they'd even produced an add-on once which restored them, but then pulled it as they just don't like post numbers.

Result: I didn't renew the license and went with XF instead due to it being such a dealbreaker for me. I wonder how many other customers have walked over this issue. Clearly not enough to make them sit up and notice, but it's still a negative effect on their sales.

Why the hell it's so important for them to deny their customers such a basic feature and let them decide whether to switch it on or not mystifies me. It's not even something that needs to be developed from scratch, as it used to have it and is trivial to restore.
Because everyone posts on your forum. You as a forum admin need to cater for their wishes.
It could be something like on your kitty forum everyone votes for cat of the week.
Except it’s styles or colours that people might like.
Get them to vote on them.
 
Standard product development lifecycle:
  • version 1: "this has potential"
  • version 2: fixes a lot of the fundamental issues with v1 - "yeah, this is really quite good"
  • version 3: major rewrite, adds a bunch of features requested by users - "yeah, this is awesome - best product ever"
  • version 4: removes a bunch of features to simplify and streamline the product - "WTF have you done - I used that feature all the time"
The list of products this exact sequence has happened to is very long.

Adding features is great for bringing in new customers - but it adds a massive legacy of support issues, especially when those features rely on 3rd party libraries or APIs which do change and thus create a lot more work for the developers.

FWIW, I think XenForo skipped v1 in this sequence given that they already knew what they were doing based on the devs prior experience, so I consider XF v2.x to be the equivalent of v3 in the above sequence. They've also stated that XF v3 will largely just be a new theme, so they aren't playing nice with this "traditional" development sequence (that we know of!).

I'm always a little concerned about the constant pressure to add new features, which can be somewhat irresistable to developers trying to keep everyone happy, because of the support legacy it invariably creates - and what it means for future development once the weight of supporting that legacy starts to become unsustainable.
 
I may be mixed up, but I thought that 2.3 was going to remove the Cumulative Layout Shift issues that arise from embedded content loading late in the rendering process (including proxied images, media, etc.) but this page is now doing just that. I fear that it's because of the Twitter media entries above, which would mean that the improved behaviour only handles proxied images? :(

To be clear: I'm in Chrome right now, and this post link (post 349 in thread, post 1679985 in forum) is not bringing me to the right place, even when I hit F5 (or the trick that works in Firefox - just "ctrl-L, enter").
 
I may be mixed up, but I thought that 2.3 was going to remove the Cumulative Layout Shift issues that arise from embedded content loading late in the rendering process (including proxied images, media, etc.) but this page is now doing just that. I fear that it's because of the Twitter media entries above, which would mean that the improved behaviour only handles proxied images? :(

To be clear: I'm in Chrome right now, and this post link (post 349 in thread, post 1679985 in forum) is not bringing me to the right place, even when I hit F5 (or the trick that works in Firefox - just "ctrl-L, enter").
I can say i don't experience this at all in Firefox, but maybe it's a chrome related issue?
 
yeah i do not think twitter/other embed heights are stored in post metadata. probably not going to work because it changes based on screen size. image aspect ratio is going to remain the same on resizing so easier to handle.
 
I prefer dark theme of my Opera mobile browser UI, but light mode of all websites I visit (kinda like when you watch a yt video, area around video is dark). And in this case XF turns on dark mode automatically, which is a bad thing for me. Dark browser panels are just dark browser panels, it does not mean I want dark websites as well. So if there will be an admin setting where we can turn off automatic choice of "system" mode or make light mode the default, that would be great.
 
For me, and I mean no offense, but this shows a lack of understanding on how hard it is to build a product that is customizable and served to the many. "Why doesn't company X build some feature Y for ME. It is such a basic feature." Often times there are tons of valid reasons, just hard to explain by a support or sales person, and there is a lot of nuance under the hood.
No, you're mistaken. As I said, it used to have the feature and there was even an add-on later to bring it back created by one of the Invision founders and programmers. On top of that, if it was really something so tough to maintain, then why does XF still have them after 14 years on the market along with loads of other forum software?

Also, note that I actually spoke, via messaging, to one of the founders and programmers of Invision. He only said that it was removed because the post numbers will shift when posts are deleted and the resulting issues from that, not development or upkeep of the feature.

Given the above, what you're saying can apply to some products, but not to this one.
 
Because everyone posts on your forum. You as a forum admin need to cater for their wishes.
It could be something like on your kitty forum everyone votes for cat of the week.
Except it’s styles or colours that people might like.
Get them to vote on them.
Sorry, how does that relate to the point I've made? It's not clear to me.
 
Top Bottom