Skip to:
Content

BuddyPress.org

Opened 5 years ago

Closed 5 years ago

#6722 closed defect (bug) (fixed)

xProfile Admin: Rich textarea display

Reported by: imath Owned by: boonebgorges
Milestone: 2.4 Priority: normal
Severity: normal Version:
Component: Extended Profile Keywords: has-patch
Cc:

Description

When viewing a rich textarea in the xprofile admin screen it takes almost the entire screen..

See:

https://cldup.com/i6U0cPHxU8.PNG

I think we should control the number of rows of the wp_editor in this screen. See attached patch

Attachments (2)

6722.patch (548 bytes) - added by imath 5 years ago.
6722.02.patch (1.2 KB) - added by imath 5 years ago.

Download all attachments as: .zip

Change History (7)

@imath
5 years ago

#1 @imath
5 years ago

  • Milestone changed from Awaiting Review to 2.4

#2 follow-up: @boonebgorges
5 years ago

  • Keywords needs-patch added; has-patch removed

Thanks, imath.

6722.patch will not work. We use the same bp_xprofile_field_type_textarea_editor_args filter to generate the admin_field_html as well as the edit_field_html. Either (a) we need to split up the filter, either with a new filter name or with a $context argument, or (b) we fix this using a filter callback that does an is_admin() check or something like that.

A $context parameter seems the most flexible to me. It'll make it easier for plugins to modify these fields without having to hook in two separate places.

#3 in reply to: ↑ 2 @imath
5 years ago

  • Keywords has-patch added; needs-patch removed

Replying to boonebgorges:

A $context parameter seems the most flexible to me. It'll make it easier for plugins to modify these fields without having to hook in two separate places.

Thanks boonebgorges, I agree what about 02.patch ?

@imath
5 years ago

#4 @boonebgorges
5 years ago

  • Owner set to boonebgorges
  • Status changed from new to assigned

Thanks, imath. I think this is pretty good. We should probably include a 'textarea_rows' value for the other instance of the filter as well, so that filtering functions will have predictable data to work with. (Also, the default of 20 is way too high when you're editing a user's profile in the Dashboard.)

#5 @boonebgorges
5 years ago

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

In 10328:

Specify richtext xprofile field editor height on a per-context basis.

When displaying the edit format preview on Dashboard > Users > Profile Fields,
the default 'textarea_rows' value of 20 was far too high. This changeset
changes it to 1, and specifies a value of 10 for other instances of the editor.

To accommodate these different values, a $context parameter is added to the
bp_xprofile_field_type_textarea_editor_args filter, with possible values
'edit' and 'admin'.

Props imath.
Fixes #6722.

Note: See TracTickets for help on using tickets.