[3.0] Theme split (wave 4, part 2) — name the board index's sub templates instead of wrapping them - #9385
Open
albertlast wants to merge 1 commit into
Conversation
The board index was drawn by a template layer whose two halves each called one function: template_boardindex_outer_above() called template_newsfader(), and template_boardindex_outer_below() called template_info_center(). A layer says that something wraps around the middle of the page, which is not what is happening here. The news fader, the board list and the info centre are three things one after another. Theme::loadSubTemplates() already walks a sub_templates array, so the three can be named directly and the layer and its two forwarding functions go. The board list is renamed from template_main() to template_boardindex() to be nameable. Output is unchanged. Signed-off-by: albertlast <mathiaspapealbert@hotmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Part of the split of #7933, wave 4 part 2.
The board index is drawn by a template layer whose two halves each call exactly
one function:
A layer says that something wraps around the middle of the page. Nothing here
does: the news fader, the board list and the info centre are three things one
after another.
Theme::loadSubTemplates()already walks asub_templatesarray,so they can be named directly:
and the layer, along with both forwarding functions, goes.
Testing
The rendered page is byte-for-byte identical, as a guest and as an admin.
index.phpfetched onrelease-3.0and on this branch, normalised for thesession variable, the security tokens, the cache-busting query strings, the
<time>values and the cron timestamp:The admin capture is a real logged-in session — it contains the logout link, the
mark-all-as-read button and the user menus — so both branches of
template_boardindex()are covered.Notes for the reviewer
template_main()becomestemplate_boardindex(). It has to have a name tobe listed. A custom theme that overrides
BoardIndex.template.phpand providesonly
template_main()will stop being called, so this is worth a line in theupgrade notes whenever those get written. Nothing in the repository refers to
the old name — I checked
Sources/,Themes/andSSI.php— andboardindex_outerhas no other references either.now names the three.
the markup of all three (
board_container,board_info, the info centre'sinfo_block/info_block_iconsplit, an avatar in the last-post column) andthose need their
index.cssslice with them, so they follow separately.Issues References (Fixes|Related|Closes)
Related to #7933