﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
12383	Custom config file loading order	Sheldmandu		"Hi guys, may I suggest changing the loading order of custom config files (using the customConfig parameter) to what would make more sense and follow the concept of inheritance from generic to more specific.

At present the config defined in any config js file is overridden by config defined in any config js file imported using the customConfig parameter.  All of this is then overridden with in-page config.

It would be much more logical and practical to slightly modify the config loading order so that config defined in any config js file referenced from the current config is loaded first and then overridden by the config in the current context.

This would allow chaining config files with more specific config overriding more generic config defined in imported files.

For example consider the following scenario:
'''In-Page Config'''
customConfig: 'product_description_editor_config.js'
...

'''product_description_editor_config.js'''
customConfig: 'generic_description_editor_config.js'
...

'''generic_description_editor_config.js'''
customConfig: 'common_editor_config.js'
...

'''product_summary_editor_config.js'''
customConfig: 'generic_summary_editor_config.js'
...

'''generic_summary_editor_config.js'''
customConfig: 'common_editor_config.js'
...

common_editor_config.js
customConfig: ''
...

As it stands the configuration defined in common_editor_config.js would override any config defined in generic_description_editor_config.js which would in turn override config defined in product_description_editor_config.js.

All of this would then be overridden with what's defined in in-page config.

This limits a developers ability to chain and override configuration in much the same way as they would in CSS or object inheritance.  This basically means you can only define configuration in common_editor_config.js that's not going to override any other config in the the config js files that reference it, which significantly limits the use of being able to chain config files.

May I suggest that the loading order is reversed so that config defined in files referenced using customConfig parameter is loaded first and then overridden by config in the file that has the customConfig parameter.

I understand that this may be a breaking change for some people who upgrade, but given the current limited use of overriding, I think the impact will be minimal."	New Feature	confirmed	Normal		General				
