Toby's Comments
-
-
- Lounge
- The Waterhole stack
Toby Waterhole FounderJul 10, 2024 In reply to ManojManojJul 10, 2024 I really wanted to know, Why Hotwire? why not use Livewire for this project? I only reason i'm still thinking about buying this package is Hotwire choice, not a deal breaker but i don't want to know...@Manoj Hotwire and Livewire are both great, but they are quite different approaches to building Laravel apps.
Hotwire is an approach to progressive enhancement. You are basically just building a traditional hypermedia Laravel Blade app with forms and links. Hotwire is a light sprinkle of JavaScript on top which enhances those forms and links to use AJAX rather than requiring a full page reload. The app will still work fine if JavaScript is disabled or fails to load.
Livewire, on the other hand, is a more fundamentally different approach. You use Livewire components which have proprietary paradigms for managing state and interactivity between the client and server. If JavaScript is disabled or fails to load, the app won't work.
Hotwire's approach makes a lot of sense to me, which is why I chose it for Waterhole. It's simple, light, resilient, performant, and has a great developer experience.
-
Answer Toby Waterhole FounderJun 24, 2024 In reply to riegel02riegel02Jun 23, 2024 Okay, I was too happy that I found solution and didn't notice that I cannot turn off or replace emojis in the editor. Users can still pick up emojis and they all are coming from CDN instead of being h...@riegel02 To change where emojis are hosted, you can change the
emoji_url
setting inconfig/waterhole/design.php
. Note this is a separate thing from the emoji-picker-element data source discussed in my previous comment. -
- Lounge
- The Waterhole stack
Toby Waterhole FounderJun 3, 2024 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!
-
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.
The sidebar links can be managed in the Structure section of the Control Panel. Docs