Toby's Comments
-
- Lounge
- The Waterhole stack
-
Toby Waterhole Founder
May 27, 2024 Good question @riegel02!
default.js
is bundled at runtime from a few separate JS files undervendor/waterhole/core/resources/dist
- you might have more luck making changes in those files, but then they will still be overwritten whenever you update Waterhole, so this wouldn't be the recommended way to do it.I don't think what ChatGPT has suggested will work, because the browser's request to cdn.jsdelivr.net will bypass your server completely.
In theory, the way to do this would be to add a custom script to monitor for
<emoji-picker>
elements and switch their data source to your own:- Create a new file at
resources/js/emojiPicker.js
:
function updateEmojiPickerDataSource() { document.querySelectorAll('emoji-picker').forEach((el) => { // https://github.com/nolanlawson/emoji-picker-element?tab=readme-ov-file#javascript-api el.dataSource = "DATA_SOURCE_URL"; }); } // Update emoji-picker elements already on the page updateEmojiPickerDataSource(); // Observer for new emoji-picker elements added to the page const observer = new MutationObserver(updateEmojiPickerDataSource); observer.observe(document.documentElement, { childList: true, subtree: true, });
- Add it to your forum using the
Script
extender inapp/Providers/WaterholeServiceProvider.php
:
Extend\Script::add(resource_path('js/emojiPicker.js'));
However, unfortunately this is not actually working - I am still seeing requests to the cdn.jsdelivr.net domain when navigating between pages. I've run out of time to debug right now, but will keep thinking about how this can be achieved!
- Create a new file at
-
Toby Waterhole Founder
May 23, 2024 In reply to riegel02riegel02May 23, 2024 Quick question. Do you run Redis? Just wonder if setting it up is worth for small communities.We do, but I don't think there would be any noticeable performance difference in a small community.
-
- Ideas
- WordPress Login
Toby Waterhole FounderMay 21, 2024 See the Authentication docs. Should be pretty easy to build a WordPress plugin to be an SSO provider for Waterhole. Maybe one day there will be an official one but not on the roadmap just yet.
-
Toby Waterhole Founder
May 16, 2024 In reply to Emmanuel IngelaereEmmanuel IngelaereMay 10, 2024 Thanks for the fast reply an committing the fix! Looking forward to further contributing where possible.Just released v0.4.9 with @Emmanuel Ingelaere 's fix for this.
-
Toby Waterhole Founder
May 12, 2024 Thanks @Corrie Sloot, I've sent you an email.
-
Answer Toby Waterhole FounderMay 9, 2024 In reply to Emmanuel IngelaereEmmanuel IngelaereMay 9, 2024 All problems solved! After commenting out Model::shouldBeStrict(); in my project, the lazyloading error dissapeared. The control panel problem was actually an accidental space in the dutch translati...Hi @Emmanuel Ingelaere, thanks for posting and working through this issue transparently, and sorry for any inconvenience it's caused in your production environment.
While the bulk of
Model::shouldBeStrict()
issues were solved in v0.4.6, upon a little further digging, it looks like you uncovered a bug where a lazy loading error could still occur with some particular configurations of reactions - specifically, multiple reaction sets containing only a single reaction type. I've committed a fix for this which will be included in the next release.Thanks for your PR to fix the Dutch translation - a great first contribution!
-
- Support
- Open Source or Source Available?
Answer Toby Waterhole FounderMay 2, 2024 Thanks for the constructive discussion @Hellas and @Stormlight. I agree that the ambiguity is probably unhelpful, so I've changed all mentions of "open source" to the more precise "source available" on the website and docs.
-
- Development
- Laravel Integration
Toby Waterhole FounderApr 30, 2024 In reply to StormlightStormlightApr 16, 2024 Also, regarding conditional rendering, the use of a closure doesn't seem to work with the Extend remove method as it only accepts a string param. Is this method going to be updated in the future to al...Is there any way we can add traits to the Waterhole\Models\User class in a similar way as adding relationships via the resolveRelationUsing method?
Unfortunately I don't think it's currently possible to add traits to the Waterhole User model. Again, I'll look into making the User model configurable so you can subclass it, but for now your options are to implement the desired relations manually using
resolveRelationUsing
, or use your own separate User model/table and then set up the Laravel authentication integration.Also, regarding conditional rendering, the use of a closure doesn't seem to work with the Extend remove method as it only accepts a string param. Is this method going to be updated in the future to allow for mixed content instead of only strings?
Haven't tested, but try this:
$button = TextEditor::get('mention')['content']; TextEditor::replace('mention', fn(string $id) => $condition ? $button($id) : null);
-
Toby Waterhole Founder
Apr 28, 2024 This is obviously quite a small community, but runs on a $14/mo DigitalOcean droplet with 1 premium vCPU and 2GB of memory. It would likely run well on a cheaper droplet, but I want things to feel very fast
I'd also be interested to hear how Waterhole scales up in terms of server resources!
-
- Ideas
- GIF search
Toby Waterhole FounderApr 28, 2024 Thanks for the idea @David! This is something slightly too opinionated to include in the core product, but can definitely imagine a third-party extension providing this functionality.
-
- Ideas
- Support for Laravel 11?
Toby Waterhole FounderApr 28, 2024 In reply to StormlightStormlightApr 22, 2024 I think I figured out the issue, waterhole/core requires a beta version of turbo-laravel: waterhole/core v0.4.8 requires hotwired-laravel/turbo-laravel ^2.0.0-beta5 -> found hotwired-laravel/turbo-l...Great catch @Stormlight. I've updated the starter skeleton and tagged a new version.
-
- Blog
- Waterhole 0.4
Toby Waterhole FounderApr 28, 2024 In reply to RenéRenéApr 28, 2024 Hey @Toby! Any update on the next update? It's been a while. I like it as it is, but would certainly like to see more frequent development cycles. Cheers!Hi @René, thanks for checking in! Absolutely, I'm disappointed that I haven't been able to get the next release out the door yet. I think a combination of life being busy and the changes slated being relatively large/overwhelming has made it hard to find the chunks of time needed. I appreciate the nudge and am going to make a more concerted effort over the next month - stay tuned.
-
- Development
- Storage Options (s3 etc)
Answer Toby Waterhole FounderApr 28, 2024 Yes, you're right - this should be configurable. Not necessarily using
FILESYSTEM_DISK
(as usually you want the app's default storage disk to be non-public), but by adding a new config option in Waterhole's config files. I've created an issue for tracking.In the meantime, if you're not using the
public
disk for anything else, you could update it to use thes3
driver and settings inconfig/filesystems.php
. -
Toby Waterhole Founder
Apr 28, 2024 Hi @Emmanuel Ingelaere, if you revoke the "view" permission from guests for all of your forum's channels, pages, and links, then Waterhole will redirect visitors to the login screen instead of showing them the forum. It's probably desirable for there to be an easier way to do this - will keep in mind for a future improvement.
Hi @Michael, thanks very much for your kind words.
In my other job I work with both React and Vue, and coming back to Waterhole is always breath of fresh air. I find the Laravel + Hotwire stack much simpler to work with and reason about. There's no client-side state management to worry about, no rendering performance issues, and working directly with the models/database is refreshing.
I'm a huge fan of Laravel's Blade components in keeping the view layer nice and tidy. And I really like the Hotwire paradigm, because at the end of the day, it feels like I'm building a really basic web 1.0 app, just with a bit of progressive enhancement. I would highly recommend it!