XF 2.0 "if" statements and options in .less

We've given it another try.

I assume you have debug mode enabled (rather than development mode). Development mode enables debug mode implicitly but there's a few other differences. One of them being that the CSS cache is enabled in debug mode but not in development mode.

As a result, if I turn development mode off but I enable debug mode, and I try the test again, indeed I can reproduce the issue. So, this does seem to be a bug :) Which is a relief, I'm sure (for you at least! ;)).
 
We've given it another try.

I assume you have debug mode enabled (rather than development mode). Development mode enables debug mode implicitly but there's a few other differences. One of them being that the CSS cache is enabled in debug mode but not in development mode.

As a result, if I turn development mode off but I enable debug mode, and I try the test again, indeed I can reproduce the issue. So, this does seem to be a bug :) Which is a relief, I'm sure (for you at least! ;)).
Thank you Chris. Yes, currently I have debug mode only. You recommend to have development mode for add-ons or after this bug fix would it be enough to have only debug mode or maybe both? Understand now. Development mode is the way to go, I guess.
 
It should work either way, so the issue will be fixed. Development mode is useful for things like the development output system and modifying templates on the file system.
 
@Chris D just to be sure I can continue to work, if I have this in config file now:

$config['debug'] = true; $config['development']['enabled'] = true;

The master style works fine now when changing value. If I export add-on to test on other clean test forum after changing things in master style, is it enough to do this in CLI:

1. php cmd.php xf-addon:bump-version BassMan/Test --version-id 1010070 --version-string 1.1.0

2. php cmd.php xf-addon:build-release BassMan/Test

Or do I need to sync or anything else? I'm not so familiar with the new system yet.
 
Only sort of side note I would add is the "xf-addon:bump-version" command would usually be performed before you start working on your next version. So if you start working on version 1.1.0 then you bump the version first, then you make the changes, then you build the release.
 
Only sort of side note I would add is the "xf-addon:bump-version" command would usually be performed before you start working on your next version. So if you start working on version 1.1.0 then you bump the version first, then you make the changes, then you build the release.

Yeah, but that doesn't really gel with some development processes... I generally just tinker when I get a chance and when I've made enough changes that work I decide to release it as a new version ;)

Granted, I guess I should just bump the version after I upload the zip to the server, but still...

Liam
 
Thank you, very useful information, but agree with @Liam W here.

Question: if I manually edit file addon.json, do I need to sync it or anything else? Will I lose any edits after sync? I don't remember, but when I first start playing with this I've lost some templates, because I click on sync link.
 
So if you start working on version 1.1.0 then you bump the version first, then you make the changes, then you build the release.
Also, what if I already make changes in master style and now I bump the version and build a release? Can anything goes wrong because of it?
 
Yeah, but that doesn't really gel with some development processes... I generally just tinker when I get a chance and when I've made enough changes that work I decide to release it as a new version ;)

Granted, I guess I should just bump the version after I upload the zip to the server, but still...

Liam
Not sure I understand the "just tinkering" argument. At the end of the day if you've already released version "1000470", you're not going to release version "1000470" again so it makes sense to bump the version to "1000570" before making any other changes. As you say, just bump the version after the release and then it's done.

Of course there's the point that you might bump the version to version "1000570" then you end up later deciding that you will release version "1010070" instead and you'll bump the version again. That's ok, though, because it's not logging an incorrect version. Aside from the fact that outdated templates are (partly) calculated based on version, the other thing is if you've got a version control process, someone reports a bug to you, you don't want the confusion of saying "huh that was already fixed in 1.0.4" when really it was fixed in 1.0.5.

Just best practice, that's all.
 
Question: if I manually edit file addon.json, do I need to sync it or anything else? Will I lose any edits after sync? I don't remember, but when I first start playing with this I've lost some templates, because I click on sync link.
xf-addon:sync-json? That command should be fine. It might be "Rebuilding" the add-on that you did before that was problematic. If this was quite a while ago, there are quite a few things in place now which should avoid the problem.

Also, what if I already make changes in master style and now I bump the version and build a release? Can anything goes wrong because of it?
It should be fine.

That makes sense. So it's not a problem bumping it again and again.
Bump away!
 
Thank you for clarification, Chris.

Just one more: now I was trying to bump the version from my Alpha release to Beta1:

$ php cmd.php xf-addon:bump-version BassMan/test --version-id 1000031 --version-string 1.0.0 Beta 1

But I get this:
Too many arguments, expected arguments "command" "id".
 
I think you'd need to do:
Code:
php cmd.php xf-addon:bump-version BassMan/test --version-id 1000031 --version-string "1.0.0 Beta 1"
But, instead, try this:
Code:
php cmd.php xf-addon:bump-version BassMan/test --version-id 1000031
I think you'll find it writes the version string automatically :)
 
Top Bottom