Skip to content

Commit 5e98c8b

Browse files
committed
v4 website tweaks
1 parent d6bb02c commit 5e98c8b

File tree

14 files changed

+71
-277
lines changed

14 files changed

+71
-277
lines changed

app/Models/Article.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public function isCompatibleWithLatestVersion(): ?bool
7474
return null;
7575
}
7676

77-
return in_array(3, $this->versions);
77+
return in_array(4, $this->versions);
7878
}
7979

8080
public function getAuthor(): Author

app/Models/Plugin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ public function getCategories(): Collection
174174

175175
public function isCompatibleWithLatestVersion(): bool
176176
{
177-
return in_array(3, $this->versions);
177+
return in_array(4, $this->versions);
178178
}
179179

180180
public function getAuthor(): Author

app/Support/Markdown.php

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class Markdown implements Htmlable, Stringable
1717
{
1818
protected Environment $environment;
1919

20-
public function __construct(protected string $content)
20+
public function __construct(protected string $content, bool $hasTableOfContents = true)
2121
{
2222
$this->environment = new Environment([
2323
'allow_unsafe_links' => false,
@@ -28,27 +28,30 @@ public function __construct(protected string $content)
2828
'symbol' => '#',
2929
'title' => 'Permalink',
3030
],
31-
'table_of_contents' => [
31+
...$hasTableOfContents ? ['table_of_contents' => [
3232
'html_class' => 'table-of-contents',
3333
'position' => 'top',
3434
'style' => 'bullet',
3535
'min_heading_level' => 2,
3636
'max_heading_level' => 6,
3737
'normalize' => 'relative',
3838
'placeholder' => null,
39-
],
39+
]] : [],
4040
]);
4141

4242
$this->environment->addExtension(new CommonMarkCoreExtension);
4343
$this->environment->addExtension(new TableExtension);
4444
$this->environment->addExtension(new HeadingPermalinkExtension);
4545
$this->environment->addExtension(new TorchlightExtension);
46-
$this->environment->addExtension(new TableOfContentsExtension);
46+
47+
if ($hasTableOfContents) {
48+
$this->environment->addExtension(new TableOfContentsExtension);
49+
}
4750
}
4851

49-
public static function parse(string $text): static
52+
public static function parse(string $text, bool $hasTableOfContents = true): static
5053
{
51-
$static = app(static::class, ['content' => $text]);
54+
$static = app(static::class, ['content' => $text, 'hasTableOfContents' => $hasTableOfContents]);
5255

5356
$static->convert();
5457
$static->removeH1Tags();

build/doctum/doctum.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
$versions = GitVersionCollection::create($dir)
1717
->add('1.x', 'Filament 1.x')
1818
->add('2.x', 'Filament 2.x')
19-
->add('3.x', 'Filament 3.x');
19+
->add('3.x', 'Filament 3.x')
20+
->add('4.x', 'Filament 4.x');
2021

2122
return new Doctum($iterator, [
2223
'title' => 'Filament API',
@@ -26,4 +27,4 @@
2627
'default_opened_level' => 2,
2728
'remote_repository' => new GitHubRemoteRepository('filamentphp/filament', dirname($dir)),
2829
'base_url' => 'https://filamentphp.com/api/%version%/',
29-
]);
30+
]);

content/articles/leandrocfe-filament-v4-beta-feature-overview.md renamed to content/articles/leandrocfe-filament-v4-has-been-released.md

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,20 @@
11
---
2-
title: Filament v4 Beta - Feature Overview
3-
slug: leandrocfe-filament-v4-beta-feature-overview
2+
title: Filament v4 Has Been Released - Feature Overview
3+
slug: leandrocfe-filament-v4-has-been-released
44
author_slug: leandrocfe
5-
publish_date: 2025-06-09
5+
publish_date: 2025-08-12
66
categories: [general]
77
type_slug: article
8-
versions: [3,4]
8+
versions: [4]
99
---
1010

11-
![Filament v4 Beta - Feature Overview](/images/content/articles/leandrocfe-filament-v4-beta-feature-overview/v4-beta-feature-overview.webp)
11+
![Filament v4 Has Been Released - Feature Overview](/images/content/articles/leandrocfe-filament-v4-has-been-released/v4-has-been-released.webp)
1212

1313
## Introduction
1414

15-
The **Filament v4 Beta** is here with a range of powerful, helpful updates. It's faster, easier to use, and gives you more control when building applications. In this article, we highlight what's new and how these changes can improve your workflow!
15+
**Filament v4** is here with a range of powerful, helpful updates. It's faster, easier to use, and gives you more control when building applications. In this article, we highlight what's new and how these changes can improve your workflow!
1616

17-
To upgrade your app to Filament v4 beta, please read the [upgrade guide](https://filamentphp.com/docs/4.x/upgrade-guide). To install Filament v4 into a new app, please visit the [installation guide](https://filamentphp.com/docs/4.x/introduction/installation).
18-
19-
> You are currently viewing the features for Filament `4.x`, which is currently in `beta` and is not `stable`. Breaking changes may be introduced to releases during the beta period. Please report any issues you encounter on [GitHub](https://github.com/filamentphp/filament/issues/new).
20-
21-
> Looking for the current stable version? Visit the [3.x documentation](https://filamentphp.com/docs/3.x).
17+
To upgrade your app to Filament v4, please read the [upgrade guide](https://filamentphp.com/docs/4.x/upgrade-guide). To install Filament v4 into a new app, please visit the [installation guide](https://filamentphp.com/docs/4.x/introduction/installation).
2218

2319
## Highlights
2420

@@ -490,10 +486,9 @@ This gives you full control over the user experience when something goes wrong.
490486

491487
## Conclusion
492488

493-
Filament v4 Beta brings a wide range of improvements designed to make your development experience faster, more consistent, and easier to maintain. Since it's still in `beta`, now is the perfect time to explore the new features and share feedback.
494-
If you need a `stable` version, refer to the [3.x documentation](https://filamentphp.com/docs/3.x).
489+
Filament v4 brings a wide range of improvements designed to make your development experience faster, more consistent, and easier to maintain.
495490

496-
To upgrade your app to Filament v4 beta, please read the [upgrade guide](https://filamentphp.com/docs/4.x/upgrade-guide). To install Filament v4 into a new app, please visit the [installation guide](https://filamentphp.com/docs/4.x/introduction/installation).
491+
To upgrade your app to Filament v4, please read the [upgrade guide](https://filamentphp.com/docs/4.x/upgrade-guide). To install Filament v4 into a new app, please visit the [installation guide](https://filamentphp.com/docs/4.x/introduction/installation).
497492

498493
Special thanks to [Dan Harrin](https://github.com/danharrin) for his incredible work on Filament v4!
499494

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/images/content/articles/leandrocfe-filament-v4-beta-feature-overview/v4-beta-feature-overview.webp renamed to public/images/content/articles/leandrocfe-filament-v4-has-been-released/v4-has-been-released.webp

File renamed without changes.

resources/views/articles/view-article.blade.php

Lines changed: 1 addition & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -83,65 +83,6 @@ class="flex flex-col items-start gap-20 pt-7 transition duration-300 will-change
8383
</div>
8484
</div>
8585

86-
@if ($article->isCompatibleWithLatestVersion() !== null)
87-
{{-- Features and Health Checks --}}
88-
<div
89-
class="grid grid-cols-[repeat(auto-fill,minmax(315px,1fr))] gap-x-16 gap-y-10 pt-7"
90-
>
91-
{{-- Latest Version Compatibility --}}
92-
<div class="flex items-center gap-3">
93-
@if ($article->isCompatibleWithLatestVersion())
94-
<div
95-
class="grid h-9 w-9 place-items-center rounded-full bg-lime-200/50 text-lime-600"
96-
>
97-
<svg
98-
xmlns="http://www.w3.org/2000/svg"
99-
width="22"
100-
height="22"
101-
viewBox="0 0 24 24"
102-
>
103-
<path
104-
fill="currentColor"
105-
d="M9 16.17L5.53 12.7a.996.996 0 1 0-1.41 1.41l4.18 4.18c.39.39 1.02.39 1.41 0L20.29 7.71a.996.996 0 1 0-1.41-1.41L9 16.17z"
106-
/>
107-
</svg>
108-
</div>
109-
@else
110-
<div
111-
class="grid h-9 w-9 place-items-center rounded-full bg-rose-200/50 text-rose-600"
112-
>
113-
<svg
114-
xmlns="http://www.w3.org/2000/svg"
115-
width="22"
116-
height="22"
117-
viewBox="0 0 24 24"
118-
>
119-
<path
120-
fill="none"
121-
stroke="currentColor"
122-
stroke-linecap="round"
123-
stroke-linejoin="round"
124-
stroke-width="2"
125-
d="M12 6v8m.05 4v.1h-.1V18h.1Z"
126-
/>
127-
</svg>
128-
</div>
129-
@endif
130-
131-
<div>
132-
<div class="font-medium">
133-
{{ $article->isCompatibleWithLatestVersion() ? 'Compatible with the latest version' : 'Not compatible with the latest version' }}
134-
</div>
135-
136-
<div class="text-xs text-dolphin/80">
137-
Supported versions:
138-
{{ implode(' - ', array_map(fn (int $version): string => $version . '.x', $article->versions)) }}
139-
</div>
140-
</div>
141-
</div>
142-
</div>
143-
@endif
144-
14586
{{-- Categories --}}
14687
<div class="flex flex-wrap items-center gap-3.5 pt-6">
14788
@foreach ($article->getCategories() as $category)
@@ -160,7 +101,7 @@ class="select-none rounded-full bg-stone-200/50 px-5 py-2.5 text-sm"
160101
<div
161102
class="prose selection:bg-stone-500/30 prose-a:break-words prose-blockquote:not-italic prose-code:break-words prose-code:rounded prose-code:bg-merino prose-code:px-1.5 prose-code:py-0.5 prose-code:font-normal prose-code:before:hidden prose-code:after:hidden [&_p]:before:hidden [&_p]:after:hidden"
162103
>
163-
{!! \App\Support\Markdown::parse($article->content) !!}
104+
{!! \App\Support\Markdown::parse($article->content, hasTableOfContents: false) !!}
164105
</div>
165106
</div>
166107
</div>

resources/views/components/articles/list.blade.php

Lines changed: 2 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class="mx-auto w-full max-w-8xl px-5 sm:px-10"
1212
})
1313
1414
// Reset the page number on category, type or version change
15-
$watch('[selectedCategories.size, selectedType, selectedVersion]', () => {
15+
$watch('[selectedCategories.size, selectedType]', () => {
1616
currentPage = 1
1717
})
1818
@@ -55,7 +55,6 @@ class="mx-auto w-full max-w-8xl px-5 sm:px-10"
5555
search: $queryString('').usePush().as('search'),
5656
selectedCategories: new Set(),
5757
selectedType: $queryString('all').usePush().as('type'),
58-
selectedVersion: $queryString('3').usePush().as('version'),
5958
6059
articles: @js($articles),
6160
categories: @js($categories),
@@ -87,13 +86,6 @@ class="mx-auto w-full max-w-8xl px-5 sm:px-10"
8786
)
8887
}
8988
90-
// Show articles that are in the selected version, or no version at all
91-
filterResult = filterResult.filter(
92-
(article) =>
93-
article.versions?.includes(+this.selectedVersion) ||
94-
! article.versions?.length,
95-
)
96-
9789
// If the selectedType is 'all', show all records, else show only the records that match the selected type
9890
filterResult = filterResult.filter(
9991
(record) =>
@@ -197,52 +189,7 @@ class="absolute left-[.35rem] top-[.35rem] -z-10 h-[2.1rem] rounded-full transit
197189
></div>
198190
</div>
199191

200-
<div
201-
class="flex w-full flex-1 flex-wrap items-center gap-3 min-[900px]:w-auto min-[900px]:flex-nowrap min-[900px]:justify-end"
202-
>
203-
{{-- Version Switch --}}
204-
<div
205-
class="relative z-10 inline-flex select-none items-center gap-2.5 rounded-full bg-white p-[.55rem] font-medium shadow-lg shadow-black/[0.01]"
206-
>
207-
<div
208-
x-on:click="selectedVersion = '1'"
209-
class="relative z-20 w-14 text-center transition duration-300"
210-
:class="{
211-
'cursor-pointer opacity-50 hover:opacity-100': selectedVersion !== '1',
212-
'text-salmon': selectedVersion === '1',
213-
}"
214-
>
215-
v1.x
216-
</div>
217-
<div
218-
class="relative z-20 w-14 text-center transition duration-300"
219-
x-on:click="selectedVersion = '2'"
220-
:class="{
221-
'cursor-pointer opacity-50 hover:opacity-100': selectedVersion !== '2',
222-
'text-salmon': selectedVersion === '2',
223-
}"
224-
>
225-
v2.x
226-
</div>
227-
<div
228-
class="relative z-20 w-14 text-center transition duration-300"
229-
x-on:click="selectedVersion = '3'"
230-
:class="{
231-
'cursor-pointer opacity-50 hover:opacity-100': selectedVersion !== '3',
232-
'text-salmon': selectedVersion === '3',
233-
}"
234-
>
235-
v3.x
236-
</div>
237-
<div
238-
class="absolute left-[.31rem] top-[.31rem] -z-10 h-8 w-16 rounded-full bg-fair-pink transition duration-300 ease-out will-change-transform"
239-
:class="{
240-
'translate-x-[4.1rem]': selectedVersion === '2',
241-
'translate-x-[8.2rem]': selectedVersion === '3',
242-
}"
243-
></div>
244-
</div>
245-
</div>
192+
<div class="flex w-full flex-1 flex-wrap items-center gap-3 min-[900px]:w-auto min-[900px]:flex-nowrap min-[900px]:justify-end"></div>
246193

247194
<div
248195
class="flex w-full flex-wrap items-center gap-3 min-[900px]:w-auto min-[900px]:flex-nowrap min-[900px]:justify-end"

resources/views/components/home/hero.blade.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -295,11 +295,11 @@ class="hidden scale-75 min-[450px]:block min-[500px]:scale-100"
295295
x-ref="description"
296296
class="text-xl font-medium leading-normal opacity-90 lg:text-2xl"
297297
>
298-
A collection of beautiful full-stack
298+
An open source UI framework,
299299
<br />
300-
components. The perfect starting
300+
built with Livewire to help you
301301
<br />
302-
point for your next app.
302+
ship admin panels & apps fast
303303
</div>
304304

305305
{{-- Star --}}

0 commit comments

Comments
 (0)