GeezerVison is showing github.com — Article write panel: Pluggable UI callback 'article_ui.extend_col_1' for volatile content missing · Issue #1917 · textpattern/textpattern
Article write panel: Pluggable UI callback 'article_ui.extend_col_1' for volatile content missing #1917DescriptionCurrently, the article_ui.extend_col_1 pluggable UI callback is only called once, when the Article Write Panel is first drawn:
|
echo pluggable_ui('article_ui', 'extend_col_1', '', $rs); |
In subsequent renderings of this panel after intermediate "save" operations, there is a short-cut bail-out branch:
This hampers plugins that want to extend this part of the UI for displaying volatile content.
I suggest extending the current article_ui.extend_col_1 events scope to fire the event when volatile parts of the write panel are redrawn as well. Activitybloatware commented on Apr 8, 2024 Sounds logical. The only drawback I can imagine is plugins (if any) firing js on full page load, they might need to be adapted. Bloke commented on Jul 16, 2024 Has this callback been reinstated yet, @bloatware? If not, are you able to do it please? Bloke commented on Oct 5, 2024 @rwetzlmayr Would it be best here to add extend_col_1 to the $partials array as PARTIAL_VOLATILE, then make a stub callback function that core doesn't explicitly use and just re-raise the (pluggable_ui?) article_ui.extend_col_1 callback inside it? Plugins should then be able to hook into it, right?
The main thing I'm confused about is how we know which selector to use when the area is just a blank canvas for plugins to play in. Do we also need to (re)introduce the container where the recent articles and next/prev nav block used to live, and leave it empty?
PRs welcome :) rwetzlmayr commented on Oct 18, 2024 ContributorAuthor More actions
Do we also need to (re)introduce the container where the recent articles and next/prev nav block used to live, and leave it empty?
This sounds reasonable, although it might annoy markup purists to include an empty element just to provide a blank canvas for plugins to scribble around in.
PRs welcome :)
Thank you for your consideration, but I would prefer not to. Retirement has taken its toll on my knowledge of the inner workings of webdev, so I'm a bit off the grid here. Bloke commented on Oct 18, 2024 Totally cool, thank you. @bloatware can you think of any other way to do this without an empty element? I'm happy for us to reintroduce the container and callback. bloatware commented on Oct 18, 2024 Could it be added conditionally, if any plugin needs it? Currently we check if (has_handler('article_ui', 'extend_col_1')). Not sure whether it would work for volatile content, but a test would suffice. Bloke commented on Oct 18, 2024 If you think it might work, please give it a shot. If it works, it'd be a handy pattern to apply in Txp 5 for optional content and dynamic custom fields :) bloatware commented on Oct 18, 2024 Seems to work, but needs some love bloatware commented on Oct 19, 2024 Will this markup for extend_col_1 area be okay? It is produced by our (modified) wrapGroup() function:
<section id="txp-extended-group">
<div role="group">
<div class="txp-container">
... plugins output ...
</div>
</div>
</section>
Bloke commented on Oct 19, 2024 Seems like reasonable markup to me. I've not tested this patch yet but the code looks good. Thank you. petecooper commented on Nov 4, 2025
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|