Skip to:
Content

BuddyPress.org

Opened 5 years ago

Closed 5 years ago

Last modified 4 years ago

#8156 closed enhancement (fixed)

Move the Local Avatar and Cover Image features into the Members component.

Reported by: imath's profile imath Owned by: imath's profile imath
Milestone: 6.0.0 Priority: high
Severity: normal Version: 1.0
Component: Members Keywords: has-patch commit needs-dev-note
Cc:

Description

The team have been discussing a lot about the fact local avatars and cover images for users should be Members features instead of xProfile features.

The consensus is: it makes more sense to include these features into the Members component.

I've been looking at it lately and unlike what I was thinking there's are no template changes needed to make this happen. So that's good news!

The most important part of the attached patch is about how to manage the navigation items. I'm suggesting to keep how the navigation is built when the xProfile is active so that users feel nothing has changed.

When the xProfile is not active, the navigation items for the 2 features will be attached to the wp-profile fallback profile we already use.

There are a lot of changes under the hood! But I've tried to deprecate the less functions I could to limit possible risks with plugins hooking to xProfile actions or filters about avatars or cover images.

I'd really like if we could commit the changes asap so that we can inform about them early during the 6.0.0 development cycle.

Thanks in advance for your time reviewing the patch.

Attachments (5)

8156.patch (62.7 KB) - added by imath 5 years ago.
8156.2.patch (64.2 KB) - added by imath 5 years ago.
8156.3.patch (69.2 KB) - added by imath 5 years ago.
8156.4.patch (1.3 KB) - added by imath 5 years ago.
bp_is_active( 'xprofile', 'cover_image' ) deprecation notice.
8156.5.patch (882 bytes) - added by imath 5 years ago.
Missing functions to deprecate

Download all attachments as: .zip

Change History (24)

@imath
5 years ago

@imath
5 years ago

#1 @imath
5 years ago

Now that [12488] has been committed, 8156.2.patch has been updated to make sure I'm not forgetting to move back the Member Avatar REST Controller inside the BP Members Component.

This ticket was mentioned in Slack in #buddypress by imath. View the logs.


5 years ago

This ticket was mentioned in Slack in #buddypress by imath. View the logs.


5 years ago

This ticket was mentioned in Slack in #buddypress by imath. View the logs.


5 years ago

#5 @imath
5 years ago

  • Keywords needs-refresh added

@imath
5 years ago

#6 @imath
5 years ago

  • Keywords commit needs-dev-note added; dev-feedback needs-refresh removed

.3.patch is a refreshed version of .2.patch which also include deprecated filters for the dynamic ones I've missed in .2.patch. I believe the patch is ready to be committed. I will try to process in consistent steps instead of a unique commit.

I've tested everything once more :

  • Legacy xProfile inactive
  • Legacy xProfile active
  • Nouveau xProfile inactive
  • Nouveau xProfile active.

Green lights for all these tests.

#7 @imath
5 years ago

In 12553:

Move Avatars & Cover from xProfile to Members component : step 1

Move Avatar and Cover settings into the Members settings section.

See #8156

#8 @imath
5 years ago

In 12554:

Move Avatars & Cover from xProfile to Members component : step 2

Move User Avatar's management from the xProfile User Admin to the Members User Admin class.

See #8156

#9 @imath
5 years ago

In 12555:

Move Avatars & Cover from xProfile to Members component : step 3

Move the Avatar upload directory filter from the xProfile functions to the Members functions.
Move the Avatar template functions from xProfile to the Members component.

See #8156

#10 @imath
5 years ago

In 12556:

Move Avatars & Cover from xProfile to Members component : step 4

Add Avatar change and delete handlers to the Members component.

See #8156

#11 @imath
5 years ago

In 12557:

Move Avatars & Cover from xProfile to Members component : step 4 (bis)

Include the files missed in r12556

See #8156

#12 @imath
5 years ago

In 12558:

Move Avatars & Cover from xProfile to Members component : step 5

  • Adapt Cover functions to relate to the Members component.
  • Deprecate functions no more used.
  • Add the handler to change the cover into the Members component.

See #8156

#13 @imath
5 years ago

In 12559:

Move Avatars & Cover from xProfile to Members component : step 6

Move the Avatars & Cover navigation and the Avatars REST Controllers from the xProfile Component to the Members one.

See #8156

#14 @imath
5 years ago

  • Owner set to imath
  • Resolution set to fixed
  • Status changed from new to closed

In 12560:

Move Avatars & Cover from xProfile to Members component : step 7

Remove the xProfile handlers about Avatars and Cover now handled from the Members component.

Fixes #8156

#15 @imath
5 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

There's a missing step: we should make sure using bp_is_active( 'xprofile', 'cover_image' ) returns bp_is_active( 'members', 'cover_image' ) and inform this is no more the right way to check if the cover image is active.

@imath
5 years ago

bp_is_active( 'xprofile', 'cover_image' ) deprecation notice.

#16 @imath
5 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 12561:

"Map" the xProfile cover image feature check to the Members one.

  • If a developer uses bp_is_active( 'xprofile', 'cover_image' ) return bp_is_active( 'member', 'cover_image' ) and inform it's no more the right way to check for the cover image feature.
  • deprecated the bp_is_profile_cover_image_active filter.

Fixes #8156

#17 @imath
5 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

Ouch, I just noticed I missed to deprecate 2 functions. It should be the last thing I've missed 🙈.

@imath
5 years ago

Missing functions to deprecate

#18 @imath
5 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 12562:

Deprecate xProfile functions about avatar & cover image change

The two functions are:

  • xprofile_screen_change_cover_image()
  • xprofile_screen_change_avatar()

Fixes #8156

#19 @imath
4 years ago

In 12851:

The new_avatar activity belongs to the Members component

The activity generated when members add/update their profile photo wasn't migrated to the Members component during the 6.0.0 milestone. This commit's goal is to repare this oversight.

See #8156
See #8407
Fixes #8408

Note: See TracTickets for help on using tickets.