Open nilshoerrmann opened 11 years ago
Wouldn't this mean that the folder must be created during installation? I like simple extensions :-) Well, we might, of course, simply add it to the documentation...
This is how my typical workspace looks like:
There are two hard things in programming: Invalidating the cache and naming things.
Yep, at the moment I have no idea about the best "convention". Do you think that backend
nails it?
I like simple extensions
This could be a simple check if a file exists in a defined folder in the workspace. It's an option, nothing that should be created automatically.
Do you think that backend nails it?
Backend, admin, symphony - something along that ...
Sure? If I have assets, datasources, events etc.?
Maybe it would be the simplest thing to stick to the extension's name (like email-newsletters
does, and email-templates
alike). So admin-css
would probably fit.
Another thought: I am not using this anymore. Instead I created an extension that loads CSS as well as JavaScript. The combination is much more useful. Maybe I should retire this extension and release the new one as Open Source? (I will update my biggest site to Symphony 2.3, and when I do so some extensions will be "modernized".)
I am still on holidays, so be prepared for ridiculous speed in either case.
Maybe I should retire this extension and release the new one as Open Source?
Sounds nice.
So I put this on the list.
@nilshoerrmann, it looks like there is already an extension which loads JavaScript and CSS. So I am really hesitant to release the same thing.
What do you think?
So I am really hesitant to release the same thing.
I just looked at the extension you are linking to and yours is much cleaner.
Still, there is some sort of general agreement to not release several extensions doing the same thing, right?
I am on my way to update all my private extensions for Symphony 2.3, so I will contact you in a few days (when I have a working version). Then we can decide what to do.
OK, I am willing to create an open source extension from what I have. I suggest to name it Backend Assets. The assets' location will be hardcoded in the extension, but no files will be created on installation or update. Instead the README will state where the files should be:
/assets-backend/css/backend_assets.admin.css
/assets-backend/js/backend_assets.admin.js
(Having no files there wouldn't do any harm to the rendering of backend pages. You might simply notice errors in the Browser's debugging console.)
Using the assets-backend
folder would fit nicely into a popular (i.e. my popular) workspace folder naming scheme:
What do you think?
Just a remark: If you want to include additional JavaScript (e.g. Chosen) into your backend, you will have to hack the extension anyway to include these additional files—unless you copy everything to the default files, which may not be the cleanest solution.
I like the name of the extension and the folder.
But what about not predefining the file names and looping over the folder instead, appending all files ending either on .css
or .js
.
That wouldn't work as intended for jQuery plugins. Download packages often contain a foo.min.js
file and a foo.js
file, and there might even be a Prototype or standalone version of the script in some cases. You may put the whole package in your folder, but you wouldn't want to load all files.
So, no: We shouldn't make assumptions. :-)
I though of it more like a convention, not an assumption.
OK, let's guess the number of mistakes people will make with this convention and without it.
I don't have the time right now to make things complicated. The main advantage is having your additional assets in the worksapce folder. The extension will allow this anyway. Regarding complex setups with jQuery plugins etc., I really assume that you can hack the extension to include any needed files. Your daily workflow will still be easy.
Phone?
Heut ist schlecht, morgen ginge.
OK.
Would it be possible to load the custom styles from the workspace folder (e. g.
/workspace/backend/override.css
)? This way, I wouldn't have to change the extension itself.