version: 6.x (that version is not selectable)
I am trying to clean up the context_ui module, remove all module_exists calls, and move the functionality to submodules. I think this way the code is more flexible, new external module features can be added faster and easier. Unnecessary functionality can be disabled.
This is the the initial patch, menu and block functionality is not removed from context_ui.
Added a new submodule, for integration with the "sections" module.
I can't create a patch for new directories, so the new submodule files are in the tar.gz file..
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | context_modules_286336_2.patch | 13.28 KB | pasqualle |
| #1 | context.tar_.gz.txt | 3.76 KB | pasqualle |
| context.tar_.gz.txt | 2.67 KB | pasqualle | |
| context_modules.patch | 9.59 KB | pasqualle |
Comments
Comment #1
pasquallemenu functionality removed from context_ui
added new submodule for integration with css_injector
Comment #2
yhahn commentedThanks for the patch -- I share your concerns about bloating context_ui with optional functionality and unnecessary module_exists calls.
The plan is to get to a stable 1.0 release and then push to get small patches into each of the integrating modules (Views/Panels/Nodequeue/Outline/etc.) since the integration is generally a very small and unobtrusive amount of code.
I will look first at breaking integration against non-core modules (I think support for core modules can stay in context_ui for now) into includes until a release. Once that happens, it would be great to look again at pushing these changes upstream rather than fragmenting the functionality of context_ui into sub-modules.
Would you be interested in submitting patches against sections and css_injector for integration with context_ui?
Comment #3
pasquallereading your last sentence again, I am not sure you asked this
#288564: context: css_injector, sections
but I think if I submit patch against css_injector, then the half of code in css_injector module will be unnecessary, and also there is a missing hook and a setting to fully integrate with context_ui.
missing hook: response to context..
missing setting: where to display, setter or getter..
Comment #4
pasqualleI would suggest to move all external module code out from context_ui, into submodule. Only core-required modules should remain in context_ui. Solve the issues "inhouse" and when it works perfectly, then ask other modules to take the integration code. We could test, add as many external modules as we can..
Issues for better integration:
The integration should work without the context_ui module being enabled.
More options for item selection. checkboxes will not be enough.
Better user interface. If we integrate more than 20 modules, the page will be too long..
Hook for context response.
Comment #5
yhahn commentedThanks Pasqualle -- I think this is a good path to take. I have begun work on these issues. I've committed the changes to the DRUPAL-5 and HEAD branches, see http://drupal.org/cvs?commit=131333
Next steps:
Thanks for your patience -- hopefully I'll have this cleaned up soon so that I can commit your patches.
Comment #6
pasqualleThe commit seems nice, it is a good step forward..
item selection: I think context_ui will need textfield filters in the future, something like views 2 has. But it is not necessary for now. I would like to see some kind of plugin system, where these selectors (filters) can be defined..
context_ui need to be enabled: I mean when you disable the views_ui module, your views still work, but if you disable the context_ui module, your context settings does not work any more, because the functionality is inside the context_ui. This should be redesigned..
Thanks for your work, I think this could be a very useful module for Drupal.
Comment #7
yhahn commentedAh, now I understand what you mean.
The issue here is historical -- the core context module actually provides a much simpler set of tools that can be put to various interesting uses (e.g. context_ui, context_prefix) and we've wanted to keep that module as the core set/get API functions.
Context_ui came about as a way to expose to everyday users what we were actually doing on a lot of projects in code (we would implement "sections" using context set/get, block visibility, theme rules, etc. directly in the code using hook_nodeapi, hook_form_alter, etc., etc.).
For now, I think it should be fine to leave this module's UI and core functionality unified. We've got plenty of other stuff to work on until this really becomes an issue ; )
Comment #8
yhahn commentedhttp://drupal.org/cvs?commit=131366
Contrib module functionality has been split out into a single context_ui_contrib.module as discussed. Eventually, it would be best if this type of integration moved upstream.
Closing this issue.
Comment #9
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.