Opened 7 years ago
Last modified 6 years ago
#7672 reopened enhancement
Moved shared template pack assets into new folder
Reported by: | DJPaul | Owned by: | djpaul |
---|---|---|---|
Milestone: | Awaiting Contributions | Priority: | normal |
Severity: | normal | Version: | |
Component: | Templates | Keywords: | has-patch |
Cc: |
Description (last modified by )
In Nouveau and Legacy, there exist subfolders [pack]/buddypress/assets/
, containing templates for emails, "attachments" (avatar upload templates/cover images), and oEmbeds. I need to triple check, but I believe these template are identical between Nouveau and Legacy, and duplicating them doesn't seem to have any benefit.
I propose these are moved into a new bp-templates/shared/
folder. We can register the new location in the register_theme_packages()
method with bp_register_template_stack()
in such a way that this change is transparent and 100% compatible with all existing themes and any custom template packs.
Attachments (1)
Change History (16)
#3
@
7 years ago
@DJPaul This is similar iirc to the proposal @r-a-y raised a while back that I supported in principle ( I'll try and find that ticket).
If we do this & I think we should we do need to be sure ( as you said )
- That the files are identical, true shared assets and not ones that can be justifiably edited per TP
- That if they could be edited/customized we are able to overload them to a theme loaction.
#4
@
7 years ago
Yep this is the proposal suggested by r-a-y:
https://buddypress.trac.wordpress.org/ticket/7116
I'm in favour & also maybe of moving the scss partials to that same level so that they are more generic for TP use moving forward.
#5
@
7 years ago
- Milestone changed from Under Consideration to 3.0
Ah, great find! It's definitely an idea who's time has come, then. :)
I'll compare the templates when I look at this next, and put in the change.
#6
@
7 years ago
_attachments/avatars/*
and _attachments/cover-images/*
have diverged. The differences are HTML5 (or not), so I'll use the Nouveau version as the "base", and the version of the file in Legacy will override it, so no impact there.
#7
@
7 years ago
- Owner set to djpaul
- Resolution set to fixed
- Status changed from new to closed
In 11835:
This ticket was mentioned in Slack in #buddypress by r-a-y. View the logs.
7 years ago
#9
@
7 years ago
_attachments/avatars/* and _attachments/cover-images/* have diverged. The differences are HTML5 (or not), so I'll use the Nouveau version as the "base", and the version of the file in Legacy will override it, so no impact there.
Makes sense.
#11
@
7 years ago
A handful of contributors had an impromptu discussion on Slack last Friday, primarily about the shared templates folder. The results of that discussion means we are revisiting the work done so far:
- Instead of creating a new
shared
folder, we will usebp-legacy
as the template fallback folder.- This means we need to have
bp-legacy
in the template stack, even if Nouveau is selected by the user.
- This means we need to have
Part of the plan with this ticket, though not communicated well by me (sorry, was that we would then look at introducing new template partials for xprofile field types -- see #5799. This remains the case.
Something we also discussed, that I think is likely for a future release, is to enable per-component template packs. That proposal needs to be written up and discussed in the normal channels.
I've attached a patch demonstrating this. The patch itself isn't clear to read as it has a lot of folder renaming included in it, but just look at the green bits, not the red bits.