Why did you drop partials

I use PG for Laravel projects and I set the PG project folder to Laravels “resources” directory.
I always disable PG’s backups because I use Git versioning.

I create a folder where I have my master design pages
Example:
./Resources/views/pinegrow/front.html
./Resources/views/pinegrow/admin.html

When they are ready I split them into multiple partials
LAYOUTS are where I attach the STYLES and JS.
They only contain the header, and body.
Example
./Resources/views/layouts/front.blade.php
./Resources/views/layouts/admin.blade.php

Another folder will contain partials:
Example:
./Resources/views/partials/front/top-menu.blade.php
./Resources/views/partials/admin/left-menu.blade.php

One folder will contain blade reusable components
Example
./Resources/views/components/forms/input.blade.php
./Resources/views/components/forms/wrapper.blade.php
./Resources/views/components/forms/buttons.blade.php
./Resources/views/components/datatable.blade.php

I can go on, but I think you get the picture.
After the initial design phase, all partials would be opened in a LAYOUT file.
This is the key to be able to use Pinegrow. If I cannot open the partials in a layout file, I have to attach a style sheet to every partial, which I manually have to remember to remove, every time I save it …

(I attach style.css from Laravels css folder and app.css from the public folder and use npm to watch for changes)

At the moment I solved this by having a master template in the “pinegrow” folder that I duplicate when I want to make a new partial, then I define the section I want to use in Laravel as a partial and export it to the correct folder.

If you don’t want to reimplement the “open as partial…” feature, you could add a new css/js feature to be able to define css and js files as “design time only” so they never are attached in the code. That would cover the basic needs.
In some cases where you work with more detailed partials, like a menu bar or input field component, I still miss the “open as partial …” feature.

I actually stopped using PineGrow with Laravel when this feature was dropped but started to use it again because PG plays very nice with Laravel 7 new blade component syntax.
https://laravel.com/docs/7.x/blade#displaying-components

2 Likes