I know you all thought development had died. I thought development had died!
That's a bit dramatic. It hadn't died. But I did discover some big problems with NextJS. I'm sure most of the NextJS developers would consider it a 'skill issue'. It probably was. But DearDiary.Net isn't the average web application. There's pieces of it that like to talk to other pieces and need to get updated when things change.
For example, when you comment on an entry, the entry is posted to the database - and the components which display reader comments don't know (in NextJS) that the database has been updated. So, I had to stitch bits together so that some parts knew when others were updated. For comments that's not too difficult. But the User Menu, well that proved impossible in the end. Many of you may have noticed that it didn't properly update after login. Even if you refreshed. And there were lots of other little bits that were annoying.
As I'd mentioned in other earlier entries I had posted, the dark mode and entry themes had been bent almost out of recognition. Again, possibly a skills issue - I had learned NextJS whilst writing DearDiary.
Much of the problems arose from essentially having components which updated their own data. They did that in 'client mode' as it were. It meant potential for database to be out of sync with the front end, and it made a lot of the stuff quite janky. Themes was the worse, the default theme in orange, would load first, then a second or so later the diary theme colour would load. And then, on occasions, it would switch from light to dark a split-second later.
With RemixJS almost everything is done on the server. I won't do too much detail but here's what Remix gives us instead.
- The server is the one source of truth.
- Any data sent back to the server is done through mechanisms that the web has been using since the dawn. For those that are interested, it uses HTML Forms behind the scenes. The original DD back in 1999 used HTML forms. Remix adds some coolness to it, but the underlying technology is tried and tested for decades.
- All data is fetched before the page loads. This stops the need for 'spinning discs' and 'Loading...' screens. There's a few occasions where might see them but on average, you won't.
- Because it's all fetched before the page loads, the theming is server driven. No more flicker! (Dark mode might give a brief flicker the first time you visit the site. Once you've visited, it'll remember your settings).
- The authorisation code (login) works with Remix and updates the session accordingly. NextAuth was buggy and was one of those situations where things would change but other components wouldn't notice.
- The calendar has had a major update. The data it needs is now pre-loaded by the server and isn't fetched when you hover. Meaning the hover over tooltip shouldn't fail and should come up almost instantly. Similarly, clicking the entry date in the calendar should respond quicker.
This version has also had some tweaks to improve the new user experience. If you're a new user your diary screen will have a set of tabs which give you some additional information, such as setting your username, security questions, creating your first diary and some inspiration. This screen will grow more over time.
Logged in users now have a 'dashboard' as the main homepage. At the moment this dashboard looks much like the original DD homepage, but it will be developed over time to be more of a dashboard.
A new homepage gives people a much better insight into what DearDiary.Net is about and why they should choose us. Please share it with your socials! Spread the word.
Missy Moo has been working and creating some fantastic content around different types of journal, an FAQ, how to get inspired and such like. I shall be adding those pages over the next few days.
All this is designed to attract new people and help us build the community. If anyone has any other ideas please let me know!
The pencil has gone and the header is set to the theme colour of the diary. This is in preparation for allowing users to set their own themes - the pencil was a pre-generated image and so wouldn't match user defined colours.
The new light/dark mode system can now follow the system theme. That is, if your computer itself is set to light then DD will be light. If your computer is set to dark... You get the idea. You can manually set it for just DD using the little icon in the bottom right. Light/dark mode is still a computer based setting, not a user setting.
If you're already logged in and want to see the brand new home page, click the Copyright notice in the bottom left. That'll take you to the standard homepage instead of your dashboard.
Issues screen is back. And the contact us form works.
More content will arrive over the next few weeks, including some YouTube videos that might end up being showcased in your dashboards in the future 😃
So, you are now using DD Remix. NextDD is now LastDD. DD Remix is the future.
Any issues, please let me know!
Steve.