I've made some improvements the debug log:
- Hierarchical collapsible debug logs.
- Access permissions - Define which users should be able to see the debug log.
- Region selection - Define where the debug log should be shown.
| Comment | File | Size | Author |
|---|---|---|---|
| #24 | rules-1231026-11.patch | 12.53 KB | sepgil |
| #23 | rules-1231026-10.patch | 12.66 KB | sepgil |
| #20 | rules-1231026-9.patch | 12.68 KB | sepgil |
| #17 | rules-1231026-8.patch | 12.69 KB | sepgil |
| #15 | rules-1231026-7.patch | 12.67 KB | sepgil |
Comments
Comment #1
klausiHm, are we sure that it is ok to generate HTML here? Shouldn't this be done in a theme function?
trailing white space, also elsewhere.
Comment #2
klausiMarked #935754: Control debug info visibility as duplicate.
Comment #3
fagoWatch out - you may not move that part into the if!
There should not be a trailing point.
Do not use and %, % suffices.
Is that conform to the drupal js coding standards?
Also, does the js generally work on all major browsers?
This shouldn't be there. Add a new line at the end of file.
Let's improve that comment to explain why.
The class name is not specific to the debug-log, but the CSS. So let's use a specific selector.
Let's add all necessary JS at the same place in the function.
the color code should be lower-case
@h4:
With nested lists, we might end up with nested h4. Let's better just stay with divs.
We should move all that tags into theme function. Best renderHelper() should produce a render-array containing appropriate #theme keys.
@themes:
I'm not totally sure whether it's fine to have the setting for the default-theme and the admin theme only. What is if a site uses multiple themes? Maybe we have to show the setting for all enabled themes?
Comment #4
sepgil commentedI tried to correct all the issues, please reviewed it again.
Comment #5
klausiYou should never use t() to translate variables.
spelling error, should be "current". should be "If there is no setting for the current theme, use the
default theme setting."
remove that comma
trailing white space
Comment #6
sepgil commented@t() & variables: Fago told me that, there is no other way to this and watchdog does it the same way.
I fixed the other remaining issues.
Comment #7
Encarte commentedsubscribing
Comment #8
klausiyou can directly link to the permission section with "admin/people/permissions#module-rules"
I'm an impatient developer, so I prefer that the debug log expands immediately without delay.
It would be nice to link the debug statements to the configurations, so that I can easily go to the according Rules configuration page.
And the overlay still eats up the debug log when it closes (e.g. after submitting a node form).
Comment #9
sepgil commentedFixed those 2 issues with this new patch.
Comment #10
sepgil commentedComment #11
sepgil commentedI've added a fix to the patch for this issue: #897714: Overlay eats up the Rules debug log
Comment #12
fagoWrong grammar, there should be no comma before this if.
This reverts another patch?
There should be no trailing point.
I think we should do a small helper function (maybe private) for that.
Missing whitespace.
Comment #13
sepgil commentedFixed the last issues, hopefully its now ready to be committed :P
Comment #14
fagoI guess the comment needs to be removed here, as it is in the function now. Also it doesn't try to use the default theme settings, it does so.
>+ * Helper function which returns the current region for the debug log.
Minor, but it's clear that it is a function ;) Just start the comment with "Returns the ...".
The comment is wrong, the function does a lot more.
Double whitespace.
As already noted, all js in that function should be added at the same place.
Comment #15
sepgil commentedFixed it again...
Comment #16
aturetta commented'<span class="rules-debug-open-all rules-debug-collapsible-link">-Open all-<span>';"Open all" should go to translators [eg: t()]
Comment #17
sepgil commentedThx, fix it.
Comment #18
klausiJust some minor nitpicks:
better: "If there is no setting for the current theme use the default theme setting."
if we use bartik as fallback, we should use seven as fallback, too.
Better use double quotes (") here as such escaping may not be handled properly by .pot file generators for text translation http://drupal.org/node/318#quotes
I recommend a faster way:
dirname(__FILE__) . '/rules.debug.js'
Comment #19
fagoIndeed, that might be faster but a bit more inflexible if the code is moved around. Anyway, let's stay with core if we have no good cause to do not so, and core uses drupal_get_path() in such situations.
dirname(__FILE__) is great for, in case of file-includes that have to run when drupal might not be fully bootstrapped....
Comment #20
sepgil commentedFix all nitpicks except for the one with dirname...
Comment #21
sepgil commentedComment #22
klausiWorks for me.
Comment #23
sepgil commentedPre render function was somehow rendering nothing. Fix it.
Comment #24
sepgil commentedFixed border style.
Comment #25
fagothanks, committed!
Comment #26
Encarte commentedImpressive team work. This is Drupal at its best...