Jump to content

RockFrontend πŸ”₯πŸš€ The Powerful Toolbox for ProcessWire Frontend Development


Recommended Posts

Posted

@bernhardΒ does the postCSS feature still work as intended?Β 

After updating RockFrontend and installing RockDevTools all my rfGrow settings are written directly to the generated styles.css like this:

font-size: rfGrow(18pxrem, 20pxrem);

Β 

Posted
1 minute ago, protro said:

How do we fix the breaking changes?

At the moment I'd recommend simply not to upgrade and use the new RockFrontend + RockDevTools just for new projects.

Posted

And if we have already upgraded ?
Is it enough to manually add v 4.10 back into the /modules folder ?

Posted
On 2/3/2025 at 11:48 AM, Stefanowitsch said:

@bernhardΒ does the postCSS feature still work as intended?Β 

After updating RockFrontend and installing RockDevTools all my rfGrow settings are written directly to the generated styles.css like this:

font-size: rfGrow(18pxrem, 20pxrem);

@Stefanowitsch I'm proud to announce that this is now also successfully ported to rockdevtools 😎

Note that the syntax changed to grow() and shrink() as it is not any more a RockFrontend feature and AI told me it's safe to use these wordings as they are not used in css/less/sass

https://www.baumrock.com/en/processwire/modules/rockdevtools/docs/rockcss/

  • Thanks 1
  • 3 weeks later...
Posted

Hi @bernhard,

I get this error on old projects in Firefox (see screenshot).

Now it also appears also in a new project with RockDevTools - do you have an idea how to solve it?

Thank you, Christian.

Β 

Screenshot 2025-02-25 181158.png

Posted
4 hours ago, cbc-design said:

I get this error on old projects in Firefox (see screenshot).

Does that mean you do not get this error in other browsers? So it's FireFox only?

Posted

Sorry, I had forgotten: the error appears in all browsers with which I can test. There is no error on the first call, but the liveload still doesn't work. The error then appears when the page is reloaded (attached is the screenshot from Edge).

Screenshot 2025-02-27 143938.png

Posted

Thanks for the great ecosystem of tools you have build

Today i tried to setup a new clean site using the ``site-rockfrontend`` profile. Right out of the box less compiling, and live reloading doesn't work.

I have read the documentation, and watched your Youtube video's, but all didn't help. Finally I came here, and read that the livereload has moved toΒ RockDevTools. So the setting in the site config should be ``$config->rockdevtools = true;`` and not ``$config->livereload = 1;``

I think to documentation, and the site-profile are behind at the moment.

  • Thanks 1
Posted
1 hour ago, spoetnik said:

Thanks for the great ecosystem of tools you have build

Thx πŸ™‚Β Glad if it is helpful!

1 hour ago, spoetnik said:

Today i tried to setup a new clean site using the ``site-rockfrontend`` profile. Right out of the box less compiling, and live reloading doesn't work.

I have read the documentation, and watched your Youtube video's, but all didn't help. Finally I came here, and read that the livereload has moved toΒ RockDevTools. So the setting in the site config should be ``$config->rockdevtools = true;`` and not ``$config->livereload = 1;``

I think to documentation, and the site-profile are behind at the moment.

Yeah that's possible. Unfortunately I had to change the way how I manage assets in my frontend. Thx for the report! I'll try to fix those issues asap.

Posted
On 2/25/2025 at 6:14 PM, cbc-design said:

Now it also appears also in a new project with RockDevTools - do you have an idea how to solve it?

Thank you, Christian.

Well... the pragmatic, most efficient and probably best solution would be to use DDEV. Other than that it might be that LiveReload breaks in subfolder installations. I have to check that. But still I can't recommend DDEV enough for PW development.

  • Like 1
Posted

Hey @spoetnikΒ I just pushed an update to the rockfrontend site profile. Can you confirm things are now working and showing infos as expected?

Posted
1 hour ago, spoetnik said:

but it still doesn't work out of the box.......

It worked for me. It would be nice to provide more information for me. What did you do, what did you expect, what was the actual behaviour? Or if you know what needs to be changed to make it work out of the box please provide that information.

  • 2 weeks later...
Posted

@bernhardΒ I have some trouble getting the new RockFrontEnd Toolbar to work properly.

Per default, when outputting the toolbar at the beginning of the body like this:

<body class="<?= $page->template->name; ?>">
	<?= $rockfrontend->toolbar() ?>
    ...
    ...

The toolbar gets rendered but is overlapped by my <header> which has position 'fixed'. This is because the toolbar has no position declarations at all:

image.png.8cfbb5036daa07624d8666bcfc67c129.png

So I understand that you need to tweak the toolbar markup to apply style classes to make it work for the specific project.

Like mentioned in the documentation I added this code to my _init.php:

// Customize RockFrontend Toolbar
$toolbar = '';
if ($user->isLoggedin()) {
    $toolbar = rockfrontend()->toolbar();
    $dom = $toolbar->dom();
    $dom->addClass('sticky foo bar');
    $toolbar = $dom->outerHtml();
}

I added the "sticky" class because It looks like the toolbar comes with a few default styles:

image.thumb.png.9d63b33c7043ccfb353419073cc172bc.png

Then I render the output of the toolbar in my _main.php:

<?php
// _main.php
echo $toolbar;

What is strange: The "sticky" classname gets removed after rendering:

image.png.750411a44cf16f11e7a9e1e071f0fc52.png

Another problem: The _main.php is appended. So the toolbar markup will be rendered at the very bottom of the DOM. Even if the "sticky" class will be applied it has no effect as the toolbar element still will reside at the very bottom of the page.

IMHO the toolbar should be positioned 'fixed' at top 0 with the highest z-index and at the top of the DOM per default.

Β 

Posted

Hey @StefanowitschΒ thx for the quick meeting. I updated the docs in the hope that others won't have the same problem of understanding how the toolbar works. Let me know if the docs are still missing anything.

  • Like 1
  • 3 weeks later...
Posted

Hi @bernhard, I tried to use RockDevTools to compile SCSS files.Β 

The documentation does not mention it but by looking into the Assets Class I find that it should be possible (?)

So after installing the SCSS module I added this to my code:

$devtools->assets()
  ->scss()
  ->add($config->urls->templates . 'styles/scss/*.scss')
  ->save('/site/templates/styles/styles2.css');

Which does not work, i get this error message:

image.jpeg.5429d35bcbbea500a5d20fc10d769b2d.jpeg

So my question is: Does RockDevTools support SCSS file compilation and how is it managed?

Β 

Β 

Posted
3 hours ago, Stefanowitsch said:

@bernhardΒ By the way: Will there be a config option for the RockPageBuilder module to create SCSS files instead of LESS files for new blocks?

I'm not using SCSS so I din't think of that. But it would not be hard to do I guess. Why would that help? Isn't it just creating a new file? Or should it have some prepopulated code?

  • Like 1
Posted
24 minutes ago, bernhard said:

I'm not using SCSS so I din't think of that. But it would not be hard to do I guess. Why would that help? Isn't it just creating a new file? Or should it have some prepopulated code?

@bernhard I am thinking of switching back to SCSS from LESS as it seems more popular and many components (or libraries) come with default SCSS stylesheets instead of LESS.

What is really convenient about the RPB is that it auto-creates the LESS file with a prepopulated CSS class selector that matches the block class:

.rpb-myblock {

}

This is a big time saver IMHO. So when choosing SCSS instead of LESS in the RPB settings this would offer a nice alternative.

  • 2 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
Γ—
Γ—
  • Create New...