[buddypress-trac] [BuddyPress Trac] #5896: xprofile field visibility label doesn't change until after saving changes

buddypress-trac noreply at wordpress.org
Tue Sep 23 12:41:30 UTC 2014


#5896: xprofile field visibility label doesn't change until after saving changes
--------------------------+------------------
 Reporter:  jreeve        |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  2.2
Component:  XProfile      |     Version:
 Severity:  normal        |  Resolution:
 Keywords:  needs-patch   |
--------------------------+------------------
Changes (by boonebgorges):

 * keywords:   => needs-patch
 * component:  Core => XProfile
 * milestone:  Awaiting Review => 2.2


Comment:

 Marked #4248 as a duplicate, since this one has code attached to it.

 One UX consideration here is that by changing the text, we may be
 suggesting that the change has actually been saved. We need to make sure
 that we're displaying a browser warning when a user changes a visibility
 setting and then attempts to leave the page without hitting Save. See
 https://buddypress.trac.wordpress.org/ticket/4248#comment:3

 Your patch looks like it'll work, but I would like to make the following
 suggestions:

 - Too much DOM traversing (parents() and siblings()) that makes it
 difficult to modify this markup in the future. If you must traverse, use
 closest() and find().
 - I think it would be a bit more straightforward and flexible if we added
 the visibility level strings to wp_localize_script(), and then fetched
 them from that JS variable to replace the text.
 - No need to enqueue a separate file - put this wherever the existing JS
 for visibility stuff is located (probably in bp-templates/bp-
 legacy/js/buddypress.js)

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5896#comment:3>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list