Opened 8 years ago
Closed 8 years ago
#13184 closed defect (wontfix)
Not work in FullBlog
Reported by: | Alexey | Owned by: | Peter Suter |
---|---|---|---|
Priority: | normal | Component: | FoldMacroProcessorMacro |
Severity: | normal | Keywords: | FullBlogPlugin |
Cc: | Trac Release: | 1.2 |
Description (last modified by )
Macros not work if using in blog article in FullBlogPlugin
Attachments (1)
Change History (12)
comment:1 Changed 8 years ago by
Description: | modified (diff) |
---|---|
Keywords: | FullBlogPlugin added |
Summary: | Not compatible with TRAC 1.2 → Not work in FullBlog |
comment:2 Changed 8 years ago by
Description: | modified (diff) |
---|
comment:3 Changed 8 years ago by
Changed 8 years ago by
Attachment: | t13184.diff added |
---|
comment:4 Changed 8 years ago by
See trac:#11550. Two things need to happen:
- Add
folding.js
to the page - Execute
$(".foldable").enableFolding(true, true);
This is a little challenging because we cannot execute $(".foldable").enableFolding(true, true);
more than once.
Proposed fix: t13184.diff.
comment:6 Changed 8 years ago by
Ah, nice catch, thanks. So in Trac 1.3.2+ it would work? Or FullBlogPlugin should call enableFolding
? The patch seems rather complex (34 lines of code) for this simple plugin (10 lines of code).
comment:7 follow-ups: 8 9 Changed 8 years ago by
It will not work in Trac 1.3.2+. trac:#11550 adds report.css
to the page, but does not call enableFolding
on every page.
I don't think FullBlogPlugin should call enableFolding
. Calling enableFolding
without knowing how/why it is used is problematic because it shouldn't be executed more than once on page load, and different features utilizing folding may want different arguments to the function. If you want the macro to work in any wiki textarea it will need to take responsibility for loading reports.css
for Trac < 1.3.2 and it will need to call enableFolding
.
comment:8 Changed 8 years ago by
Replying to Ryan J Ollos:
Calling
enableFolding
without knowing how/why it is used is problematic because it shouldn't be executed more than once on page load, and different features utilizing folding may want different arguments to the function.
We should even avoid using the foldable
class, so that if the processor is used in a context that executes enableFolding
on items with the foldable
class it won't affect the fold state of the processor. The only reason for continuing to use the foldable
class is to get the styling, so the processor would also need to add the stylesheet snippet.
comment:9 follow-up: 10 Changed 8 years ago by
Replying to Ryan J Ollos:
trac:#11550 adds
report.css
to the pagetake responsibility for loading
reports.css
report.css
? I'm lost.
IMO it would be very helpful if Trac always provided the foldable
class behavior automatically (and collapsed
to start collapsed initially).
comment:10 Changed 8 years ago by
Replying to Peter Suter:
report.css
? I'm lost.
Typo. folding.js
.
IMO it would be very helpful if Trac always provided the
foldable
class behavior automatically (andcollapsed
to start collapsed initially).
So I guess this is a wontfix. Whether you commit the patch or not makes no difference to me, I just wanted to help out the original reporter.
comment:11 Changed 8 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
Thanks for investigating!
Can you give more information? What is not working? What are you trying to do? Is there an error?
I don't know anything about FullBlogPlugin.