For some reason enabling / disabling comment defaults on the node-type form got changed to a select instead of radios, but on the node form the options are still displayed correctly as radios. The content type settings form needs to be changed back (see comment_settings_select.png)

Additionally, hidden needs to be removed completely. When you create a new node, hidden is not an option (hidden only appears once a comment has been added) so there is absolutely no reason hidden should be an option for a setting the DEFAULT on that form. (see where_is_hidden.png)

Comments

jenlampton’s picture

Status: Active » Needs review
StatusFileSize
new1.26 KB

Patch also includes the help text as used on the node edit form.

Status: Needs review » Needs work

The last submitted patch, fix_comments.patch, failed testing.

jenlampton’s picture

Status: Needs work » Needs review
Issue tags: +D7UX usability
StatusFileSize
new1.29 KB

Whoops, patch not created from Drupal root. trying again.

joachim’s picture

Status: Needs review » Needs work

+1 to these changes in principle, however a couple of things:

- the node type form comments tab is a lot noisier now. In particular, 'Threading' is a bit muddled in beneath the radios with descriptions.
- The tab summary needs some change too, as now it shows ", Threading , 50 comments per page" with a leading comma.

jenlampton’s picture

Status: Needs work » Needs review
StatusFileSize
new2.99 KB

Okay, I fixed the vertical tabs js and cleaned up the form by moving the "threaded" checkbox down with the others for "Allow comment title" and "Show reply form on the same page as comments". I also moved the redundant description text ("Threaded" means "Show comment replies in a threaded list"?) and used that for the checkbox's label.

While in here, I unfortunately stumbled across the "Anonymous commenting" section, which also needs to be radios and not a select. :/ but, one thing at a time. #991078: Anonymous contact information settings per node type needs to be radios, not select

joachim’s picture

Status: Needs review » Needs work

Looking good.

Just one thing:

* Open , Show comment replies in a threaded list , 50 comments per page(active tab)

Space before the comma.

The Publishing options suffer from this glitch too, but this particular spare space is added by your patch.

Also, I've just noticed it used to say:

* Open, Threading , 50 comments per page(active tab)

So stray spaces in the current code too -- so we could leave those to another issue. However, I think perhaps just 'Threading' is clearer in the summary, or something shorter than the full checkbox text at any rate. I like your change to the actual checkbox label though!

joachim’s picture

Ok I've filed #991522: Vertical tabs summaries have stray spaces for the stray spaces.

jenlampton’s picture

Status: Needs work » Needs review
StatusFileSize
new3.08 KB

I've changed the text that vertical tabs uses for the summary to use just the word "Threading" instead of the whole label (good suggestion :) but I think the space comes from somewhere else? It looks like it's just pulling the text from inside the label tag in the markup, and the value of the new radios form element does not add a space. Maybe it's coming from a theme function or something. I'll hunt it down in the other issue.

nancydru’s picture

How about adding '#attributes' => array('class' => array('container-inline'))

I hate seeing two or three small options stacked - horizontal is better.

Bojhan’s picture

Issue tags: -D7UX usability +Usability

Screenshot?

dixon_’s picture

Version: 7.x-dev » 8.x-dev
dixon_’s picture

Title: Enable / Disable comment settings per node type needs to be radios, not select » Make comment settings form more usable
StatusFileSize
new53.08 KB
new41.65 KB
new0 bytes

I don't think we need to split up the issue, let's make this issue a general "comment form settings cleanup" issue. No? #991078: Anonymous contact information settings per node type needs to be radios, not select Is marked as duplicate.

Attached is a patch and two screenshots on my first take. It includes most of what is mentioned above, with some minor changes.

dixon_’s picture

StatusFileSize
new3.73 KB

Oops, not very usable patch ;)

nancydru’s picture

Thanks, dixon_. Could you look at #9 above, please?

dixon_’s picture

@NancyDru Making radios and other form controls inline with each other is not a pattern used throughout core. I agree it could be useful, but that needs to be decided as a design pattern to use, and apply it consistently throughout core.

Run it through @Bojhan and the UX team first.

Everett Zufelt’s picture

In a D7 - D8 upgrade, what happens to content types where comment was set to hidden on the node type? Is there any unexpected behavior change?

dixon_’s picture

The patch in #13 doesn't change any of that behavior.

Everett Zufelt’s picture

@dixon_

After a D7-D8 upgrade there will potentially be a value for some node types that is no longer available on the settings page. What happens in FAPI when we try to set #default_value to a value that is not in #options?

jenlampton’s picture

@Everett Zufelt

This settings form lets people choose the default values for the node form, and as it turns out, on the node form itself there is no 'hidden' option available in Drupal 7 either. (That option doesn't appear until a node actually has comments on it.)

If people upgrade with settings from D7 it will behave exactly like it did in D6 (which is confusing - but not "broken"). However, if/when they go back to this form, it won't be as confusing for them anymore :)

Adding a needs backport tag, in the hopes of making D7 less confusing too.

jenlampton’s picture

new patch after core directory move.
Includes inline radio options for NancyDru. :)

cosmicdreams’s picture

Status: Needs review » Reviewed & tested by the community

Manually tested this patch. All three states worked fine.

1. Initially only had two states available, Open and Closed (very sensible)
2. After I created a comment for a node and edited the node, I saw three states: Open, Closed, and Hidden.

This changes make a whole lot of common sense. It's finally crystal clear what these settings mean.

I recommend RTBC

joachim’s picture

I don't think that introducing a new UI pattern in just one single place is a very good thing -- do we have inline radio options anywhere else?

catch’s picture

Status: Reviewed & tested by the community » Needs review
+      '#description' => t('If <em>Open</em>, only users with the <a href="/admin/people/permissions#module-comment">Post comments permission</a> can posts comments.'),

What happens if I have permission to administer node types, but not permission to assign permissions? Won't this link to a 403?

jenlampton’s picture

Issue tags: +Novice

yeah :(

joachim’s picture

Status: Needs review » Needs work

Just had a quick look through the code and as far as I can see, container-inline is only used for the search form and for the various forms that list actions (node admin, comment admin, etc).

If we want to introduce it for radio sets, it needs an issue of its own to do it consistently rather than piecemeal.

cweagans’s picture

Issue tags: +Needs backport to D7
pposca’s picture

Status: Needs work » Needs review
Issue tags: -Usability, -Novice, -Needs backport to D7

#1: fix_comments.patch queued for re-testing.

Status: Needs review » Needs work

The last submitted patch, 20: clean_up_comment_settings_per_node_type-989452-20.patch, failed testing.

andypost’s picture

Issue summary: View changes
Issue tags: +Needs reroll, +Needs issue summary update
StatusFileSize
new52.96 KB

Currently comments are configured via field settings (to see anonymous settings you need to enable permission)

Also not sure about backport to 7 because this changes form structure

jenlampton’s picture

Issue tags: +Usability, +Needs D7 backport

tagging

rishikant05’s picture

Assigned: Unassigned » rishikant05
rishikant05’s picture

Assigned: rishikant05 » Unassigned
andypost’s picture

Version: 8.0.x-dev » 7.x-dev

This is no more issue for 8.x

edit see #30

avpaderno’s picture

Issue tags: -Needs D7 backport +Needs backport to D7

Status: Needs work » Closed (outdated)

Automatically closed because Drupal 7 security and bugfix support has ended as of 5 January 2025. If the issue verifiably applies to later versions, please reopen with details and update the version.