Romain 'Maz' B.
Romain 'Maz' B.
Explore posts from servers
FFilament
Created by Romain 'Maz' B. on 2/10/2025 in #❓┊help
Is there an easy way to center the text inside a StatsOverviewWidget?
Hi there! I'm just looking to improve a dashboard appearance and would like to center the text of some of the StatsOverviewWidget. Does it exists an easy way to add a class to the Stat content or so?
5 replies
FFilament
Created by Romain 'Maz' B. on 2/9/2025 in #❓┊help
RepeatableEntry state modification aren't possible?
Hi. I am building something kind of complex: I need to modify the state of a RepeatableEntry to. The example is built for a visit tracking system. Each session (the record I'm working on) has multiple page views. I would like to display the duration of the page view duration based on the previous entry of the repeatable.
return $infolist
->schema([
// List all page views of the visitor session
RepeatableEntry::make('pageViews')
->schema([
// The page view path
TextEntry::make('Path')
->columnSpanFull(),

// The duration of the visit for this page
TextEntry::make('Duration')
])

// Is this somehow possible?
->state(
fn(Session $record) => $record->pageViews
->map(fn(PageView $pageView, int $key) => [
'path' => $pageView->path,
'duration' => isset($record->pageViews[$key+1]) ? $pageView->created_at->diff($record->pageViews[$key+1]->created_at) : null
])
)
]);
return $infolist
->schema([
// List all page views of the visitor session
RepeatableEntry::make('pageViews')
->schema([
// The page view path
TextEntry::make('Path')
->columnSpanFull(),

// The duration of the visit for this page
TextEntry::make('Duration')
])

// Is this somehow possible?
->state(
fn(Session $record) => $record->pageViews
->map(fn(PageView $pageView, int $key) => [
'path' => $pageView->path,
'duration' => isset($record->pageViews[$key+1]) ? $pageView->created_at->diff($record->pageViews[$key+1]->created_at) : null
])
)
]);
It kind of works in the sense that my state callback is evaluated and the page displays the correct number of entries but the data isn't filled inside each entry
2 replies
FFilament
Created by Romain 'Maz' B. on 2/8/2025 in #❓┊help
What are these horizontal lines behind my Pie Chart?
No description
3 replies
FFilament
Created by Romain 'Maz' B. on 2/2/2025 in #❓┊help
Use Filament to build a package dawhboard
Hi! I am building a package with a dashboard which is almost only lists with columns and data filtering. I started to build the dashboard as a Vue SPA but I want to make it extendable from the application where the package will be installed. I used Laravel Nova so I know how it could be complex to do this. So I am wondering if Filament could be a good alternative as it's already configurable. My question is: is it somehow possible to use Filament as a dependency of my package to build the dashboard and make it extendable from the Laravel application ? Is there any example of this Filament usage out there? I don't want to scaffold any stuff inside the final application which could be simpler of course but I want to keep the control over the data controllers of the package.
5 replies
NNuxt
Created by Romain 'Maz' B. on 7/5/2024 in #❓・help
Migration v2 to v3 increased the build time by 10+
Hi, I was working on a Nuxt2 application. For some reason, the project was forked and migrated to Nuxt3 few months ago. Both project (Nuxt2 & Nuxt3) continued to receive updates. As of today, the Nuxt2 application + a Laravel build is done in less than 2-3 minutes while the Nuxt3 application only (I separated the Laravel app build in the CI/CD) takes an average time of 15-25 minutes and sometimes even more 45! The applications aren't build on equivalent hardware configuration: 8Gb ram, 4vCPU. I trying to improve the performance of the Nuxt3 build during the CI/CD, copying the old node_modules folder from the previous build to not redownload already installed package, using pi0/nuxt-build-cache package and so on... Is that normal that a Nuxt3 build takes way more time to run than Nuxt2? Here are some results information of the builds:
up to date, audited 1398 packages in 26s
[log] Nuxt 3.12.2 with Nitro 2.9.6
[info] vite v5.3.1 building for production...
[info] transforming...
[info] ✓ 2129 modules transformed.
[info] rendering chunks...
[info] computing gzip size...
[info] ✓ built in 2m 42s
[success] Client built in 162181ms
[info] Building server...
[info] vite v5.3.1 building SSR bundle for production...
[info] transforming...
[info] ✓ 1066 modules transformed.
[info] rendering chunks...
[info] ✓ built in 2m 20s
[success] Server built in 140325ms
[info] [nitro] Initializing prerenderer
[info] [nitro] Prerendering 2 routes
[info] [nitro] Prerendered 1 routes in 366.645 seconds
[start] [nuxt-build-cache] Collecting nuxt build cache
[success] [nuxt-build-cache] Nuxt build cache collected in `2612ms`
up to date, audited 1398 packages in 26s
[log] Nuxt 3.12.2 with Nitro 2.9.6
[info] vite v5.3.1 building for production...
[info] transforming...
[info] ✓ 2129 modules transformed.
[info] rendering chunks...
[info] computing gzip size...
[info] ✓ built in 2m 42s
[success] Client built in 162181ms
[info] Building server...
[info] vite v5.3.1 building SSR bundle for production...
[info] transforming...
[info] ✓ 1066 modules transformed.
[info] rendering chunks...
[info] ✓ built in 2m 20s
[success] Server built in 140325ms
[info] [nitro] Initializing prerenderer
[info] [nitro] Prerendering 2 routes
[info] [nitro] Prerendered 1 routes in 366.645 seconds
[start] [nuxt-build-cache] Collecting nuxt build cache
[success] [nuxt-build-cache] Nuxt build cache collected in `2612ms`
Some of these numbers are really weird like it take 6 minutes to prerender one route?!
10 replies
NNuxt
Created by Romain 'Maz' B. on 6/21/2024 in #❓・help
Nuxt content, load images from the assets dir?
Hi! I am reorganizing all my project files and wanted to know if it would be possible to load image files from the assets folder from nuxt content?
title: Looting items
description: 'Items can be looted when defeating mobs. The same item can be looted on various mobs but the chance to loot them can vary depending of the mob.'
image:
src: assets/images/content/looting-system-og-image.png
layout: rules-article
title: Looting items
description: 'Items can be looted when defeating mobs. The same item can be looted on various mobs but the chance to loot them can vary depending of the mob.'
image:
src: assets/images/content/looting-system-og-image.png
layout: rules-article
This doesn't work, I tried with ~/assets, @/assets and so on...
1 replies
NNuxt
Created by Romain 'Maz' B. on 5/30/2024 in #❓・help
useFetch data is correctly filled but data.value is null?!
No description
4 replies
NNuxt
Created by Romain 'Maz' B. on 4/26/2024 in #❓・help
What's the trick to dev/build from nuxt content package fetch from github?
Hi. due to a bug inside the version I was using, I need to be on the really latest update so I modified my package json to use the github repository "@nuxt/content": "github:nuxt/content#main" but since I cannot run dev or build. Here is the log:
Nuxt 3.11.2 with Nitro 2.9.6 17:02:54
ℹ Using default Tailwind CSS file nuxt:tailwindcss 17:02:56

ERROR Error while requiring module @nuxt/content: Error: Cannot find module '/media/SSD/websites/terra-front/@nuxt/content' 17:02:56
Require stack:
- /media/SSD/websites/terra-front/index.js


ERROR Cannot find module '/media/SSD/websites/terra-front/@nuxt/content' 17:02:56
Require stack:
- /media/SSD/websites/terra-front/index.js

Require stack:
- index.js
at Module._resolveFilename (node:internal/modules/cjs/loader:1075:15)
at Function.resolve (node:internal/modules/cjs/helpers:116:19)
at Function._resolve [as resolve] (node_modules/jiti/dist/jiti.js:1:251148)
at resolveModule (node_modules/@nuxt/kit/dist/index.mjs:2210:29)
at requireModule (node_modules/@nuxt/kit/dist/index.mjs:2215:24)
at loadNuxtModuleInstance (node_modules/@nuxt/kit/dist/index.mjs:2451:92)
at async installModule (node_modules/@nuxt/kit/dist/index.mjs:2407:47)
at async initNuxt (node_modules/nuxt/dist/index.mjs:4233:7)
at async loadNuxt (node_modules/nuxt/dist/index.mjs:4331:5)
at async Module.loadNuxt (node_modules/@nuxt/kit/dist/index.mjs:2570:19)



ERROR Cannot find module '/media/SSD/websites/terra-front/@nuxt/content' 17:02:56
Require stack:
- /media/SSD/websites/terra-front/index.js
Nuxt 3.11.2 with Nitro 2.9.6 17:02:54
ℹ Using default Tailwind CSS file nuxt:tailwindcss 17:02:56

ERROR Error while requiring module @nuxt/content: Error: Cannot find module '/media/SSD/websites/terra-front/@nuxt/content' 17:02:56
Require stack:
- /media/SSD/websites/terra-front/index.js


ERROR Cannot find module '/media/SSD/websites/terra-front/@nuxt/content' 17:02:56
Require stack:
- /media/SSD/websites/terra-front/index.js

Require stack:
- index.js
at Module._resolveFilename (node:internal/modules/cjs/loader:1075:15)
at Function.resolve (node:internal/modules/cjs/helpers:116:19)
at Function._resolve [as resolve] (node_modules/jiti/dist/jiti.js:1:251148)
at resolveModule (node_modules/@nuxt/kit/dist/index.mjs:2210:29)
at requireModule (node_modules/@nuxt/kit/dist/index.mjs:2215:24)
at loadNuxtModuleInstance (node_modules/@nuxt/kit/dist/index.mjs:2451:92)
at async installModule (node_modules/@nuxt/kit/dist/index.mjs:2407:47)
at async initNuxt (node_modules/nuxt/dist/index.mjs:4233:7)
at async loadNuxt (node_modules/nuxt/dist/index.mjs:4331:5)
at async Module.loadNuxt (node_modules/@nuxt/kit/dist/index.mjs:2570:19)



ERROR Cannot find module '/media/SSD/websites/terra-front/@nuxt/content' 17:02:56
Require stack:
- /media/SSD/websites/terra-front/index.js
2 replies
NNuxt
Created by Romain 'Maz' B. on 4/25/2024 in #❓・help
V8 running out of memory when building Nuxt
Hi! Running a quite large app on a 8Gb ram VPS, my CI/CD pipelines started to fail earlier this day for no reason. Looking at the free space of the VPS, there is ~3.5Gb free memory when running the pipeline and I modified the node option max-old-space-size to 3000.
top - 09:19:24 up 2:15, 1 user, load average: 0.10, 0.17, 0.34
Tasks: 174 total, 1 running, 173 sleeping, 0 stopped, 0 zombie
%Cpu(s): 3.1 us, 0.6 sy, 0.0 ni, 95.8 id, 0.0 wa, 0.0 hi, 0.1 si, 0.5 st
MiB Mem : 7940.7 total, 2707.5 free, 3535.3 used, 2079.9 buff/cache
MiB Swap: 0.0 total, 0.0 free, 0.0 used. 4405.5 avail Mem
top - 09:19:24 up 2:15, 1 user, load average: 0.10, 0.17, 0.34
Tasks: 174 total, 1 running, 173 sleeping, 0 stopped, 0 zombie
%Cpu(s): 3.1 us, 0.6 sy, 0.0 ni, 95.8 id, 0.0 wa, 0.0 hi, 0.1 si, 0.5 st
MiB Mem : 7940.7 total, 2707.5 free, 3535.3 used, 2079.9 buff/cache
MiB Swap: 0.0 total, 0.0 free, 0.0 used. 4405.5 avail Mem
I have absolutely no idea why this is happening so suddenly, does anyone have any clue that I may explore?
1 replies
NNuxt
Created by Romain 'Maz' B. on 11/7/2023 in #❓・help
Dynamic component import
Hi there! Can anyone tell me why this code works:
<game-notepad-buildings-generic :building="buildingOnSelectedTile" />
<game-notepad-buildings-generic :building="buildingOnSelectedTile" />
But not this one:
<component is="game-notepad-buildings-generic"
:building="buildingOnSelectedTile"
/>
<component is="game-notepad-buildings-generic"
:building="buildingOnSelectedTile"
/>
According to the documentation, I should use resolveComponent but this code snippet doesn't work either:
<component :is="resolveComponent('game-notepad-buildings-generic')"
:building="buildingOnSelectedTile"
/>
<component :is="resolveComponent('game-notepad-buildings-generic')"
:building="buildingOnSelectedTile"
/>
And same is true for a camelCase formatted component name.
24 replies