Jacob Tobiasz 🦙
jacobtobiasz.bsky.social
Jacob Tobiasz 🦙
@jacobtobiasz.bsky.social
Holistic Software Engineer 🦙 PHP 🦙 Symfony
BONUS: fun fact – I noticed this week @Sylius is also using @coderabbitai :). So feel free to look for example reviews in opened (and closed) pull requests 👉🏼 https://buff.ly/4gLJdLO.
December 20, 2024 at 8:38 AM
So, if you have an open-source project, it's worth giving it a try :). In the worst scenario, you'll just uninstall it; in the best one, you have another great tool in your programmer's toolbox.
December 20, 2024 at 8:38 AM
@coderabbitai is excellent for initial reviews to catch obvious errors, speeding up feedback as other reviewers can resolve false positives. However, remember Rabbit isn't flawless. We can also chat with Rabbit, though I haven't tried it yet.
December 20, 2024 at 8:38 AM
Of course it has its disadvantages.

❌ By default the walkthrough seems overwhelming but can be disabled (or configured).
❌ You still need to have knowledge to validate the suggestion (as in the case of a real code review 🤷🏼‍♂️).
❌ There's no way to provide knowledge as an e.g. MD file.
December 20, 2024 at 8:38 AM
The main reason I'm writing about this tool is they offer a great open-source plan. Pro analyses are free for all public repositories (sic!).

I believe we should talk about companies offering special plans for open-source projects 🫶🏼.
December 20, 2024 at 8:38 AM
So, what can @coderabbitai do?

✅ It can be configured to match your needs (style, what they analyze, skipping PRs with a specific tag/drafts, and more).
✅ Add code suggestions
✅ Provide nitpick comments
✅ Generate a PR summary
✅ Fix our English 😅
...and many more :D
December 20, 2024 at 8:38 AM
So, the tool is called @coderabbitai (this thread is not sponsored – but could be 🤣). In simple words – there's an AI trained to be a code reviewer, which might be helpful in cases like me (but not only!).

If you participate in an open-source project, see why you should give it a shot 👇🏻.
December 20, 2024 at 8:38 AM
5/ #SymfonyUXExplained statistics

🥳 Over 9000 impressions
🥳 Over 500 engagements
🥳 Almost 100 likes
🥳 and more than 15 bookmarks

Thanks for reading, and stay tuned for more content 🫶🏼. Probably we'll return for similar initiatives in the future.
December 16, 2024 at 5:18 PM
4/ If you want to learn more about Symfony UX, you definitely have to check:

🔗 https://buff.ly/3ZWbslC – every package has nice examples to play with
🔗 https://buff.ly/3HbHKyQ - SymfonyCasts LAST Stack Course

Don't forget to join Symfony UX channel on the Symfony Slack!
December 16, 2024 at 5:18 PM
3/ Of course, if you followed me for Symfony UX/Symfony/PHP content, you can expect such content here too. Along with my activity here, I'm also planning to finally reactivate my blog, where more ambitious content might fit better (blog posts are a better place for huge amount of content).
December 16, 2024 at 5:18 PM
2/ There are a lot more packages and topics to be covered, but I don't have real-life examples of them. So I prefer to finish at this point and let you know where you might find more about our lovely Symfony UX.
December 16, 2024 at 5:18 PM
1/ Why do we finish so early?

I've shared what I could for now. There's more content, mostly about the Live Component, but it's not suitable for tweets.

The goal of #SymfonyUXExplained was to bring attention to @SymfonyUX, and I hope I made at least small contribution to it.
December 16, 2024 at 5:18 PM
11/ Links

🔗 Docs https://buff.ly/4gA444N
🔗 Statistics component https://buff.ly/41Cfvos
🔗 Product attributes component https://buff.ly/4gyqUtw
December 15, 2024 at 2:39 PM
10/ Summary

Without a specialization in front-end technologies, you're able to create a form with collections and generate a slug based on a provided name by a simple button click.

For me it was a blessing while creating the Sylius 2.0 Admin Panel. And I believe many of you will appreciate it.
December 15, 2024 at 2:39 PM
9/ Live Components allow you to provide instant feedback while filling a form.

Everything without a single line of custom JavaScript code written by you. Also, forms with collections become a no-brainer 🤯!
December 15, 2024 at 2:39 PM
8/ The next example is managing product attributes. It's really huge and it required a lot of work. We won't dive into details (still, we're in a thread on X), but just see what you're able to do with Symfony UX, PHP code, and 14 lines of custom JavaScript code 🌞.
December 15, 2024 at 2:39 PM
7/ Previously, the custom JavaScript code in Sylius responsible for switching between time spans was about 160 lines long. Now it's 0 🤯!

All logic from a click, through rendering a new chart, until replacing it is 100% handled by already existing JS code (Live Component one) and our custom PHP.
December 15, 2024 at 2:38 PM
6/ Statistics

The main driver to create statistics as a separate component was to allow putting them anywhere, without a need to pass data down.

Component resolves data and creates a chart. Thanks to live actions without reloading a page, we can change the time span and move between periods.
December 15, 2024 at 2:38 PM
5/ Examples time ⏰

As usual, when I need some Symfony UX, we'll look at how @Sylius uses Live components.

For the next few posts we'll see how (and why) Sylius uses Live Component. We'll see mostly simple cases, as these kinds of needs are usually to be solved. 👇🏻
December 15, 2024 at 2:38 PM
4/ Live Component (PHP) configuration is mostly attribute-based, and it is required to mark a class `#[AsLiveComponent]` and methods that can be invoked via the component route as `#[LiveAction]`.

This topic is broad and deep to describe it within a single thread. Docs (last post) are to help.
December 15, 2024 at 2:38 PM
3/ From a back-end perspective, a live component is a service having data and actions.

Calling the `/_component/MyLiveComponent/myActionName` route results in invoking the `myActionName` method in the `MyLiveComponent` class.

Of course, the class and method must be configured (attributes).
December 15, 2024 at 2:38 PM
2/ From the front-end perspective, the live component is an element with a bounded `live` controller (via the `data-controller` attribute).

Thanks to it, we can define that after clicking a button, an HTTP request is sent to a specific route with a live component name and action name.
December 15, 2024 at 2:38 PM
1/ In simple words, I'd say Live Component is a package providing a seamless integration between a custom Live Stimulus controller and Symfony.

There's already an existing `LiveController` (Stimulus) provided by the package that is responsible for listening for events and passing them.
December 15, 2024 at 2:38 PM