Please be patient guys. FoF members are in different timezones and have jobs outside of FriendsOfFlarum too.
The bigger the PR, the more time and effort it requires to review.
Please be patient guys. FoF members are in different timezones and have jobs outside of FriendsOfFlarum too.
The bigger the PR, the more time and effort it requires to review.
Hello, how is it going? Really dont want to be impatient but its all i need to release my forum.
If it's not merged in the next 24h I'll do a personal test and merge it.
Kyrne Thank you a lot!
Kyrne there is additional feedback that needs to be looked at/into before the merger, see Ianm's comment.
[deleted] we were asking for your patience because there is a lot going on with this PR along with what @clarkwinkelmann stated. If we merely rushed this PR merger without the initial dig into the issues we saw, it would have been much more work to undo/fix those new bugs than to actually sit down and discuss the changes that are being presented. I ask that in the future that everyone remains patient in these times as we all understand that people have communities to create/run but this process cannot be rushed. In the meantime, if you are simply waiting for the feature additions and a few bug fixes to launch your forum, you can clone the repo in a private directory where the root of your Flarum install resides, add that directory as a composer repository to your composer.json, pull in the PR changes, and install the extension from this local source.
Ralkage Do the 2 new commits from DavWheat cover this ?
FriendsOfFlarum/nightmode33
The extension works fine for desktop but for mobile it always displays night mode for guests. I'm on a Google Pixel 3 and when I visit my url it shows the website in night mode.
Would anyone know the fix for this?
louieakil Your Pixel is probably in dark mode causing it to auto choose dark for guest. You can set it if your logged in to be light mode.
tankerkiller125 Wow you were right, I never knew this. Thanks again.
EDIT:
Well this still seems like a bug in my opinion. If you visit a website like reddit, it does not default to dark mode based on the browser setting.
I am not happy with that bug I hope this pull request is done soon
It delays so much..
Kylo Fun fact: I am not a fan of reddit. Not sure what you are trying to tell me, there is a reason that this extension has a switch
How its going?
datitisev Great thank you
The PR for per-device theme selection has been merged. However, I'd also like to improve the extension's dark theme system before releasing it.
Currently, fof/nightmode has its own CSS that is mostly copied from flarum/core but with some changes - this CSS overrides the existing light theme when night theme is selected. The problem with this system is that it requires us to maintain a working dark theme & there are always issues and clashes with other extensions & styles. It also adds onto an existing large stylesheet file and makes it so either light or dark theme code is unused (as both are included).
The new system (FriendsOfFlarum/nightmode36) completely gets rid of our separate stylesheet. It overrides Flarum files (safely, not the actual files but acts as if they are) and creates two CSS files - forum-ID.css
and forum-dark-ID.css
(should work with other solutions, e.g. giffgaff who use forum.css?v=ID
). The dark CSS file uses Flarum's own dark theme.
The problem with this new system is that it doesn't work very well with automatic detection & per-device settings. As the CSS file that is decided to be shown is through backend, that only has access to the global user theme (not per-device, cannot detect dark theme in browser either).
My current "fix" for this is to not include either CSS file & hide the forum until the extension's JS decides which theme to load & requests that file. Another solution would be to include both files and remove one once the page has loaded - this would increase load times though, and would look weird as well.
Update 07/19: I have chosen to include both CSS files when automatic mode is chosen. The browser chooses which to render through the <link> media query (it'll still load both files, seems to be the behavior in all browsers). Per-device settings will now be set to cookies so that the web server can access them.
!!! If you want to go back to the released version after testing this out, you WILL need to revert a DB backup.
!!! It is recommended that you install this version on a TEST forum and not a live one.
Either way, I'd like some people to test this new system out (includes per-device theme settings thanks to @davwheat) before it is released.
To test this PR, please make a backup of your database, then run
composer require fof/nightmode=dev-ds/use-less-variable
php flarum migrate
If you find any bugs, please check if it has been reported in other gamification versions by looking through the existing issues @ https://github.com/FriendsOfFlarum/nightmode/issues before reporting it.
datitisev Happy to test this. I'm just spinning up a copy of my live environment to do so.