Board Icons General
Jan 15, 2023 14:56:19 GMT -8
Post by R.O.B. on Jan 15, 2023 14:56:19 GMT -8
TL;DR: We have recently changed the way board icons are implemented. This thread is to serve as a place to report issues and/or provide feedback with them, as well as to explain the methods we have been using for their implementation.
Some of you may have noticed some odd behavior with the board icons over the past few weeks. If you've been paying attention to the shoutbox, you may already have at least some idea as to why this has been happening. But for those of you who haven't, I am making this thread to both explain what's been going on with them and to serve as a place for users to provide feedback (mainly so I don't have to keep spamming the shoutbox).
Let's start at the beginning. ProBoards actually does not have support for individual board icons built-in. There does exist a 3rd party plugin that allows us to achieve this, and this is the solution we have been using for the last several years. For the most part, it has worked pretty well for us. However, a problem with it arose when we introduced the 98, 95, and SysCol themes in 2018. The plugin did not allow us to change the icons on a per-theme basis. The themes are made up primarily of CSS, which unfortunately does not allow us to change an image's source. So despite this being a pretty heavily requested feature, I couldn't really figure out a way around this. As such, I just accepted it as a limitation that we would have to live with.
Fast forward to around Christmas day of 2022, and the icons just randomly stopped working. This was strange, since we hadn't made any changes on the backend that would have broken them. As it turned out, ProBoards had changed the URLs for images they were hosting. And while their software had automatically replaced any instances of the old URLs on the backend, it did not do this for the 3rd party plugin we had been using. This meant that I had to manually change them in the plugin settings. Somewhat annoying but certainly not the end of the world by any means.
To keep everyone updated while the issue was being fixed, I explained what was going on in the shoutbox, and mentioned offhand that this implementation was the main reason why we don't have theme-specific board icons. This was when travis explained that there was indeed a way to change an image though CSS (sort of). As it turns out, you can override an image's appearance via the content property. Not exactly the same as changing the source, but it seemed to work well enough. travis was even kind enough to provide me with a few icons for the different themes, so I definitely wanted to give this a shot. And so, I got to work on replacing the plugin with this new CSS method.
For the most part, this implementation worked... okay. However, it didn't take long for users to start reporting issues with it, and it didn't help that these issues weren't very consistent. Some reported that all of the icons were not working for them, while others said that it was only one or two icons that were not working. While there were initially some errors with the URLs that we did fix, this did not seem to resolve the problem for everyone. Unfortunately, it just seemed that browser support for using the content property like this was shoddy at best.
Because of all these issues, I decided that relying on the content property alone was not reliable enough to be used, and even considered just giving up and going back to using the old plugin. However, I got the idea to use JavaScript to change the actual image source of the icons via their content property. This would allow me to make use of the CSS work I had already done, and would also let us keep using theme-specific icons. So I started experimenting with just that, and it has seemed to work pretty well so far. However, it has only just been implemented, so I can't say it has been thoroughly tested as of me writing this post.
This is where we're at now with the icons. They do indeed seem to work better, however I still want to know if anyone is having any issues with them. So if you have any bug reports, suggestions, or feedback, please feel free to post them in this thread.
Also, sorry this post ended up being pretty long, but I did want to make sure that I explained everything so that people could understand what's been going on.
Some of you may have noticed some odd behavior with the board icons over the past few weeks. If you've been paying attention to the shoutbox, you may already have at least some idea as to why this has been happening. But for those of you who haven't, I am making this thread to both explain what's been going on with them and to serve as a place for users to provide feedback (mainly so I don't have to keep spamming the shoutbox).
Let's start at the beginning. ProBoards actually does not have support for individual board icons built-in. There does exist a 3rd party plugin that allows us to achieve this, and this is the solution we have been using for the last several years. For the most part, it has worked pretty well for us. However, a problem with it arose when we introduced the 98, 95, and SysCol themes in 2018. The plugin did not allow us to change the icons on a per-theme basis. The themes are made up primarily of CSS, which unfortunately does not allow us to change an image's source. So despite this being a pretty heavily requested feature, I couldn't really figure out a way around this. As such, I just accepted it as a limitation that we would have to live with.
Fast forward to around Christmas day of 2022, and the icons just randomly stopped working. This was strange, since we hadn't made any changes on the backend that would have broken them. As it turned out, ProBoards had changed the URLs for images they were hosting. And while their software had automatically replaced any instances of the old URLs on the backend, it did not do this for the 3rd party plugin we had been using. This meant that I had to manually change them in the plugin settings. Somewhat annoying but certainly not the end of the world by any means.
To keep everyone updated while the issue was being fixed, I explained what was going on in the shoutbox, and mentioned offhand that this implementation was the main reason why we don't have theme-specific board icons. This was when travis explained that there was indeed a way to change an image though CSS (sort of). As it turns out, you can override an image's appearance via the content property. Not exactly the same as changing the source, but it seemed to work well enough. travis was even kind enough to provide me with a few icons for the different themes, so I definitely wanted to give this a shot. And so, I got to work on replacing the plugin with this new CSS method.
For the most part, this implementation worked... okay. However, it didn't take long for users to start reporting issues with it, and it didn't help that these issues weren't very consistent. Some reported that all of the icons were not working for them, while others said that it was only one or two icons that were not working. While there were initially some errors with the URLs that we did fix, this did not seem to resolve the problem for everyone. Unfortunately, it just seemed that browser support for using the content property like this was shoddy at best.
Because of all these issues, I decided that relying on the content property alone was not reliable enough to be used, and even considered just giving up and going back to using the old plugin. However, I got the idea to use JavaScript to change the actual image source of the icons via their content property. This would allow me to make use of the CSS work I had already done, and would also let us keep using theme-specific icons. So I started experimenting with just that, and it has seemed to work pretty well so far. However, it has only just been implemented, so I can't say it has been thoroughly tested as of me writing this post.
This is where we're at now with the icons. They do indeed seem to work better, however I still want to know if anyone is having any issues with them. So if you have any bug reports, suggestions, or feedback, please feel free to post them in this thread.
Also, sorry this post ended up being pretty long, but I did want to make sure that I explained everything so that people could understand what's been going on.