/misc is a collection of CSS and JS fils, images and files for Color.module, which looks messy and doesn't make any sense. I suggest we move the CSS files to /css, the JS files to /js, the images to /images and Color's files to /modules/color. This way, every folder does what its name implies.

Comments

dbrendel’s picture

Assigned: Unassigned » dbrendel

New structure will be:

/js (for javascript)
/css (for css)
/images (for images)
/jsmodules (for farbtastic and vertical-tabs and any other all-in-one javascript-css-images that might come)

xano’s picture

Images and CSS are mostly theme-dependent, so it would be cool if we could split those up as best we can and keep all JS in /js, otherwise that folder wouldn't make any sense if there's another JS folder where the code could be in as well.

dbrendel’s picture

Xano,

I introduced /jsmodules because: "farbtastic, vertical-tabs, ui, progress" all consist of js, css, images. Each one forms a separate unit with images and css not belonging to a theme. Imho we shouldn't split these "javascript modules" and spread their files across different (/js, /css, /images) directories. It is possible to relocate /jsmodules to /js/modules, but I doubt whether this really clarifies things. Let me know what you think :-)

xano’s picture

IMO 'js modules' are JS with extra data like images or CSS. Just like Drupal modules can have their own CSS, JS and images these packages can have those too, but still their main focus is JS. /images and /css would only be for general things, like icons and functional CSS (CSS used to make JS work for verticla tabs, fieldsets, autocompletes, etc.).

casey’s picture

When something like this needs to be done, I think we should move all misc files to the module they fit best; most of them to system and color module.

xano’s picture

Either system or separate folders in the Drupal root. I am not sure about that. Perhaps some more developers (and themers, because they use the images as well) could take a look at this and discuss what is most logical and practical.

dbrendel’s picture

What I make up from your comments is that:

- "/css, /js, /images" should be introduced.

The remaining point is /jsmodules:

- "farbtastic" might go into /jsmodules or /modules/color/farbtastic
- "vertical-tabs, ui, progress" might go into /jsmodules or /modules/system/[vertical-tabs|ui|progress] resp.

Relocating up /jsmodules (into color, system) is quite possible, and arbitrary anyway. Drawback are the long pathnames you then get...

Imo we should really avoid an unnecessary long discussion and make a decision.

I suggest the implementation from #1 because I think that it makes most sense (obvious, therefore I firstly suggested it). Locations are logical and pathnames are (relatively) short.

If you have sound reason to implement a different setup... please give argument and agree on a definite solution.

The technical changes aren't too difficult anyway, so that's not the point.

Awaiting your worthy comments :-)

xano’s picture

After some thinking I realised that it might be a good idea to put everything in System.module (/modules/system/css, /modules/system/images, etc.). I would very much like this to happen for /includes as well and there has been talk about doing that by among others as well.

dbrendel’s picture

So everything will be put into the system module, ie. "/css, /images, /js, /includes" and "farbtastic, vertical-tabs, ui, progress". Valid point :-)

"and there has been talk about doing that by among others as well" ?? Don't know what you mean. Is it important here?

xano’s picture

It is related. There has been talk about movind /includes to System.module, so all files belong to a module and those includes can be loaded through the API. This serves as 'jurisprudence' for moving JS, CSS and image files to System.module as well.

Farbtastic, etc. are JS packages, so I suggest we put them in /modules/system/js together with their own images and CSS.

casey’s picture

Version: 7.x-dev » 8.x-dev
swentel’s picture

Status: Active » Closed (fixed)

There has been a major reshuffling of files already (like assets folder etc), I think we're done here.