#7116 closed enhancement (wontfix)
Move asset template parts away from bp-legacy
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Templates | Keywords: | has-patch 2nd-opinion close |
Cc: |
Description
As evidenced in #7115, I think we shouldn't introduce new template functionality directly into a template pack, but rather we should have default template parts and allow template packs to override these template parts if necessary.
Attached patch is an example that moves activity embed template parts from /bp-templates/bp-legacy/buddypress/assets/embeds/
to /bp-templates/assets/embeds/
.
If we like this approach, we can do the same for emails and attachments.
Attachments (1)
Change History (17)
#2
@
9 years ago
I think it's a bit late to introduce such a change. I suggest to think about it for 2.7.
For sure! I wanted to post this ticket before I forgot about it.
And also to try to make them update their templates if needed.
I think bp-nouveau shows the inelegance of our theme compatibility API especially when we introduce new core functionality such as emails and embeds. We should at least have some defaults enabled in core instead of forcing things through whatever the default template pack is at the moment.
Also, currently, bp-nouveau would need to add a dedicated template part for emails as well.
#6
@
9 years ago
Unconvinced. This is to support people overriding the entire template pack who are missing new templates we introduce? I think we should expect that level of customisation to be done by people who are keeping an eye on development of new BuddyPress release, or at least, for them to catch that when they're testing it on a dev/test environment.
#7
@
9 years ago
- Keywords 2nd-opinion close added
Proposing to close this, based on my views above and lack of comment from anyone else.
#8
@
8 years ago
This is to support people overriding the entire template pack who are missing new templates we introduce?
Yes, but only for core features like email, attachments and embeds.
BuddyPress is lucky to currently only have one template pack (and soon, two!), but imagine a scenario where there are multiple template packs in the wild and we introduce some new features and the template pack authors are no longer supporting it or are late in adding support. This wouldn't be great.
Imagine if WordPress didn't add template compatibility for embeds and left embed implementation to the theme author or only added support for their default twenty* themes. This is our current mindset.
#9
@
8 years ago
That argument could apply to any front-end feature we add, including (for example) an entire new Component. We'd then end up with Components templates in some other folder. I'm not sure the comparison with WordPress is perfect (different scale; different intended target audience), but I understand what you're saying.
I imagine we will have some variable in the future that says what the "default" template pack is (for new installs). For these "features" that we add that have template parts, could we make it so that if the file wasn't found in the template stack, to fall-back to the "default" template pack directory?
#11
@
8 years ago
@DJPaul @r-a-y Paul I have to agree with r-a-y's opening remarks as this is how I instinctively set about building or re-building the styles as partials for Nuoveau, initially as I wasn't sure how we would approach things in the final notion of the project. Adding a folder with the partialls and configuring my template pack to build my scss primary file looking for those as includes from the /bp-template/ folder seemed to make sense in any template pack having access to those default styles to call in - naturally this was also easily changeable later and not a final or decisive approach hence sticking with it while initially building.
This ticket was mentioned in Slack in #buddypress by hnla. View the logs.
8 years ago
This ticket was mentioned in Slack in #buddypress by r-a-y. View the logs.
8 years ago
This ticket was mentioned in Slack in #buddypress by r-a-y. View the logs.
8 years ago
#15
@
8 years ago
- Milestone Under Consideration deleted
- Resolution set to wontfix
- Status changed from new to closed
This never went anywhere, I'm going to close a ticket, since Nouveau everyone seems happy enough with duplicating the few template parts affected etc.
I think it's a bit late to introduce such a change. I suggest to think about it for 2.7.
My point on #7115 was more to create a post on bpdevel to warn theme designers/end users that there might be a problem with the feature if the Standalone theme is using some funky stuff with the Theme compat API for the activity embed feature.
And also to try to make them update their templates if needed.