Skip to:
Content

BuddyPress.org

#8128 closed enhancement (fixed)

BP Nouveau JS: Maybe move "bp_ajax_request" event to fadeIn complete function.

Reported by: dcavins Owned by: dcavins
Milestone: 5.0.0 Priority: normal
Severity: normal Version: 4.4.0
Component: Templates Keywords: has-patch commit
Cc: dcavins

Description

As is, the very useful bp_ajax_request js event fires before the element it is referring to is fully faded in, which causes problems in some cases (like drawing new elements via js, because the elemtent isn't full size until the fadeIn is completed).

I'm attaching a patch that moves the event to the optional completed method of the fadeIn function.

However, I can imagine that soemtimes you might want to be alerted that the request has finished before the element has completely faded in, so it might be better to add a new event, like `'bp_ajax_request_fade_in_complete' rather than moving the existing event.

I'm not sure. Anyway, thanks for your consideration.

Attachments (1)

8128.1.diff (1.6 KB) - added by dcavins 12 months ago.
Moves bp_ajax_request to fadeIn complete in Nouveau.

Download all attachments as: .zip

Change History (3)

@dcavins
12 months ago

Moves bp_ajax_request to fadeIn complete in Nouveau.

#1 @imath
12 months ago

  • Keywords commit added
  • Milestone changed from Awaiting Review to 5.0.0

Looks good to me! Thanks a lot for this improvement @dcavins 👍

#2 @dcavins
12 months ago

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

In 12447:

Nouveau: Change AJAX template loading event emission timing.

In Nouveau, a useful event, bp_ajax_request, is emitted when a template
is updated wth new content. However, the new content is eased in using
a fadeIn transition. This changeset moves the event to the fadeIn complete
so that any actions tied to bp_ajax_request will be operating on
visible and full-size elements.

Fixes #8128.

Note: See TracTickets for help on using tickets.