Jump to content

Custom Theme in Developer Mode


HeadStand

Recommended Posts

This has been discussed before, but now I have to bring it up again.

I need to write a plugin for one of my private clients. They have a custom theme where the primary nav bar runs down the left side instead of across the top. The plugin needs to make the menus expand and collapse and store the user's preferences in a cookie.

The plugin itself is not the issue. Here is the problem: 

  • Developer Mode only works with the default theme. You cannot tell it to use a different theme.
  • In theory, I can sit here and manually copy templates to my dev directory, but that's incredibly tedious and time-consuming. Not to mention that they will be overwritten when I upgrade to the next version.
  • I can't develop it on the default theme because not all the elements/styles exist.

What I will have to actually do is create the plugin, build it, turn off developer mode, then test it. If there are bugs, I have to turn dev mode back on, fix them, rebuild, turn developer mode off. And again. And again.

This is extremely impractical and frustrating. In v3 it was a very simple thing to load a different theme in dev mode. In v4 it's over-complicated and inflexible.

Is there any chance we can see this improved? Perhaps for 4.2?

Link to comment
Share on other sites

This is actually a lot worse than I thought. Development is quite literally impossible.

Here's the thing - toggling IN_DEV actually doesn't work for plugins. The plugin needs to be installed. But... I can't do that in developer mode. And if I install it when dev mode is off, then I will screw with my dev files. 

This means the only way to develop this is to write the plugin in my dev environment, download it, and then... install it on another installation in order to test. It's taking me twice as long to do this as it normally should because I have to keep downloading and installing and downloading and installing.

@bfarber @Matt is there any chance that someone can look into this? Pretty please?

Link to comment
Share on other sites

Actually, once you "create" the plugin in the ACP, you can turn developer mode off and continue modifying the plugin PHP files and that takes effect without building or toggling developer mode or anything like that. The only caveat is that things like importing templates, language strings and javascript does require you to turn IN_DEV on and then "build" the plugin again and reimport it (just click to update the existing plugin).

Generally speaking, it is expected you will create the plugin in a development environment with IN_DEV enabled, and then once you are finished you will export it and import it into the live site.

Link to comment
Share on other sites

5 hours ago, bfarber said:

Actually, once you "create" the plugin in the ACP, you can turn developer mode off and continue modifying the plugin PHP files and that takes effect without building or toggling developer mode or anything like that. The only caveat is that things like importing templates, language strings and javascript does require you to turn IN_DEV on and then "build" the plugin again and reimport it (just click to update the existing plugin).

Generally speaking, it is expected you will create the plugin in a development environment with IN_DEV enabled, and then once you are finished you will export it and import it into the live site.

That's still the same thing. I still have to download it and reinstall it every time I need to make a change. :( Last night I ended up doing this 24 times (no joke - I have my file name with a "(23)" in it, which means 24 times).

Link to comment
Share on other sites

  • 2 weeks later...
  • 4 weeks later...
On 04/02/2016 at 9:14 PM, bfarber said:

The only caveat is that things like importing templates, language strings and javascript does require you to turn IN_DEV on and then "build" the plugin again and reimport it (just click to update the existing plugin)

Unless it's changed, doesn't reimporting a plugin erase custom names that you've created for hooks? I could be misremembering things though.

Link to comment
Share on other sites

  • 11 months later...

 

On 2/4/2016 at 8:41 PM, HeadStand said:

That's still the same thing. I still have to download it and reinstall it every time I need to make a change. :( Last night I ended up doing this 24 times (no joke - I have my file name with a "(23)" in it, which means 24 times).

Once you import a theme locally into a specific installation you need to work on the html files while in Designers Mode only of course using your ide. Once in that specific local install any changes you make to a template outside of designers mode will not stick. So once you install a theme into a specific installation, you need to use DM to make any edits to your templates, js etc.. Once you close DM the changes will then be saved.

Designers mode only remembers what you put into it on a specific installation.. Designers mode will remember what you do if the changes you make are done while in it. That's why it's best to create your plugin as Brandon suggested in your acp first then export that into your local installation out of designers mode

Once installed and designers mode ran dm will build it, make your changes and DM saves it. 

Link to comment
Share on other sites

1 hour ago, DesignzShop said:

 

Once you import a theme locally into a specific installation you need to work on the html files while in Designers Mode only of course using your ide. Once in that specific local install any changes you make to a template outside of designers mode will not stick. So once you install a theme into a specific installation, you need to use DM to make any edits to your templates, js etc.. Once you close DM the changes will then be saved.

Designers mode only remembers what you put into it on a specific installation.. Designers mode will remember what you do if the changes you make are done while in it. That's why it's best to create your plugin as Brandon suggested in your acp first then export that into your local installation out of designers mode

Once installed and designers mode ran dm will build it, make your changes and DM saves it. 

This doesn't help me. You can't run developer mode and designer mode at the same time. What I need is to be able to develop custom pieces for my clients and to see what it will look like in their theme. Preferably without having to switch modes a hundred times in between (as that would require a build).

Link to comment
Share on other sites

I never said to run both at the same time. Obviously you can't do that. :D 

Develop the plugin as Brandon suggested in your acp and import it into a theme. You don't need dm for that. If the plugin needs extra work then do it in your acp and when you've completed what you needed to do re-install it into your theme. Maybe I'm missing something here..

Link to comment
Share on other sites

22 hours ago, DesignzShop said:

I never said to run both at the same time. Obviously you can't do that. :D 

Develop the plugin as Brandon suggested in your acp and import it into a theme. You don't need dm for that. If the plugin needs extra work then do it in your acp and when you've completed what you needed to do re-install it into your theme. Maybe I'm missing something here..

Because it's ridiculous to be exporting and importing a hundred times a day. It's not just one plugin. We're talking about full custom apps that just don't look the same in the default theme as they do in a custom theme. Why should I have to build and install and build and install and build and install? All I do is custom work. All I do is build custom apps. 90% of the work I do is for private clients, not one-off pieces.

Link to comment
Share on other sites

2 hours ago, HeadStand said:

Because it's ridiculous to be exporting and importing a hundred times a day. It's not just one plugin. We're talking about full custom apps that just don't look the same in the default theme as they do in a custom theme. Why should I have to build and install and build and install and build and install? All I do is custom work. All I do is build custom apps. 90% of the work I do is for private clients, not one-off pieces.

I hear ya, your first post stated plugin however so I was of course not thinking applications. maybe add a suggestion in the product forum or contact @Matt directly and have him look at the workflow sequence and see if he'd consider a change. I know theme developers made suggestions and they listened, more than once. Sometimes it takes some usage to get a good idea if it flows correct and sensibly as you know, in this case it doesn't, so they may take your idea into consideration and do something.

Worth a shot?
Regards

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...