Collapse the input format into a fieldset even if there is only a single input format

Amitaibu - September 3, 2008 - 20:39
Project:Drupal
Version:7.x-dev
Component:filter.module
Category:feature request
Priority:normal
Assigned:Amitaibu
Status:won't fix
Description

The need is to clean a bit the clutter in the form.
#125315: Textarea with input format attached might make this patch obsolete.

AttachmentSizeStatusTest resultOperations
input_format_1.patch2.75 KBIdleFailed: Failed to apply patch.View details | Re-test
Snap1.png15.21 KBIgnoredNoneNone

#1

System Message - September 3, 2008 - 20:42

Patch failed to apply. More information can be found at http://testing.drupal.org/node/14038. If you need help with creating patches please look at http://drupal.org/patch/create

#2

Amitaibu - September 3, 2008 - 20:53

Let's see if this will make the Bot happy :)

AttachmentSizeStatusTest resultOperations
input_format_2.patch2.71 KBIdleFailed: 7241 passes, 4 fails, 0 exceptionsView details | Re-test

#3

maartenvg - September 19, 2008 - 08:17
Status:needs review» needs work

I don't think #125315: Textarea with input format attached will make this patch obsolete, but it might break it. This is because that issue has veered off from a usability improvement to a technical way to attach input-formats directly to textareas without any changes to the UI.

This patch still applies, but I do not get the promised behavior. See the attached screen shot.
Finally, the patch uses occasionally \r\n newlines in stead of \n.

AttachmentSizeStatusTest resultOperations
screen_input_format.png13.81 KBIgnoredNoneNone

#4

Amitaibu - September 19, 2008 - 19:24
Status:needs work» needs review

@maartenvg ,
Sorry, I've omitted an important detail - you should visit admin/build/themes/settings and Enable the Always hide the filter tips in a collapsible fieldset

New patch removes incorrect line endings and white space.

AttachmentSizeStatusTest resultOperations
input_format_3.patch2.68 KBIdleFailed: 7199 passes, 4 fails, 0 exceptionsView details | Re-test

#5

maartenvg - September 21, 2008 - 07:42

Ah ok. In that case: it works.

I'm not so sure whether admin/build/themes/settings is such a good place to this, because why do we want this to be theme-dependent. It definitely wasn't the first place I looked. Perhaps admin/settings/filter is a better location, because it influences the filters?

#6

catch - September 21, 2008 - 09:55

I think we could make this standard behaviour - it definitely doesn't require a setting.

#7

Amitaibu - September 21, 2008 - 10:12

[sorry, double post]

#8

Amitaibu - September 21, 2008 - 10:12

Patch adds behavior without any settings.

AttachmentSizeStatusTest resultOperations
input_format_4.patch458 bytesIdleFailed: 7199 passes, 4 fails, 0 exceptionsView details | Re-test

#9

Amitaibu - September 21, 2008 - 10:19

Removed un-necessary else

AttachmentSizeStatusTest resultOperations
input_format_5.patch1.06 KBIdleFailed: 7241 passes, 4 fails, 0 exceptionsView details | Re-test

#10

Damien Tournoud - September 21, 2008 - 10:22
Status:needs review» needs work

This patch doesn't seem incompatible with neither #125315: Textarea with input format attached nor #304330: Text format widget.

Please also remove the if and the comment:

<?php
// Multiple formats available: display radio buttons with tips.
?>

#11

Damien Tournoud - September 21, 2008 - 10:24

Hum. No.

You have to keep the if/else and put the fieldset outside it.

#12

Amitaibu - September 21, 2008 - 10:33
Status:needs work» needs review

Followed Damien's comment #11 and moved fieldset out the if/else.

AttachmentSizeStatusTest resultOperations
input_format_6.patch1.08 KBIdleFailed: 7199 passes, 4 fails, 279 exceptionsView details | Re-test

#13

Amitaibu - November 4, 2008 - 07:28

Reroll to apply cleanly.

AttachmentSizeStatusTest resultOperations
input_format_7.patch1.08 KBIdleFailed: 7204 passes, 0 fails, 279 exceptionsView details | Re-test

#14

Anonymous (not verified) - November 13, 2008 - 11:10
Status:needs review» needs work

The last submitted patch failed testing.

#15

Amitaibu - November 17, 2008 - 12:56
Assigned to:Anonymous» Amitaibu
Status:needs work» needs review

Re-roll after pfir gone wild :)

AttachmentSizeStatusTest resultOperations
303660_HEAD_input_format_8.patch1.08 KBIdleFailed: 5331 passes, 65 fails, 56 exceptionsView details | Re-test

#16

maartenvg - November 17, 2008 - 13:33
Status:needs review» reviewed & tested by the community

Works like a charm now. Seeing that at least 2 people have looked at it, and the fact that the patch is tiny, I've marked this RTBC. Let's see what the core maintainers think about this feature.

Summary of the patch:
The result of this patch is this: http://drupal.org/files/issues/Snap1_57.png (but collapsed by default). This improves usability because the screen is less cluttered by input format information which might be extremely long when using more filters. Especially if there are more than 1 text areas with input formats attached.

#17

System Message - November 17, 2008 - 14:00
Status:reviewed & tested by the community» needs work

The last submitted patch failed testing.

#18

maartenvg - November 17, 2008 - 14:20
Status:needs work» reviewed & tested by the community

Thanks bot, I found a small bug: no need for validation callback if there is only 1 input format, because in that case there are no radio buttons to check.

I ran some tests, and this time they run fine. Let's hope the bot agrees.

AttachmentSizeStatusTest resultOperations
303660_HEAD_input_format.patch1.18 KBIdleUnable to apply patch 303660_HEAD_input_format.patchView details | Re-test

#19

Dries - November 22, 2008 - 14:07

Personally, I'm not convinced this is an improvement. What is the rationale for this? It seems to be missing from this discussion.

#20

Amitaibu - November 22, 2008 - 14:41

The reason behind the patch might not be noticable if the input format appears only once in a form -then it probably doesn't bother very much. However, when we have a form with several fields - a user will see multiple instances of the open input format fieldset. In that case I think having a collapsed fieldset is better then an open one in order to remove the form clutter and the annoyance of the same duplicated explanation about the input format.

#21

maartenvg - November 22, 2008 - 14:44

It's an usability improvement, because it seriously decreases visual clutter in the following situations (or combinations thereof)
- when there are multiple textarea's with input filtering enabled
- when the visible input format has a lot of filters (I've seen sites with 8 or more lines of input filter descriptions)
- when there are more open fieldsets that have a higher attention priority than the input filters. e.g. the node/add/* pages with menu- , path-, workflow fieldsets, etc.

So more or less the same reason to collapse it when there are more than 1 input format to choose from.

#22

webchick - November 22, 2008 - 17:01
Status:reviewed & tested by the community» won't fix

Hm. I'm sorry, but I think I am going to won't fix this in favour of #304330: Text format widget, where members of the usability team are re-working the input format interface entirely.

The overall goal you have here -- make this more consistent so it looks the same for users regardless of how many formats they have access to -- is a very good one. But the approach taken at the other issue is http://img.skitch.com/20081028-d5mkx7g31h382h9xq1p7ktyeb6.png which I believe also satisfies this goal, and is a bit nicer looking visually.

I really encourage you though to chime in over there since it'd be awesome to combine efforts on fixing this nasty part of core once and for all! :)

 
 

Drupal is a registered trademark of Dries Buytaert.