WordPress.org

Make WordPress Core

Opened 3 years ago

Last modified 9 months ago

#37516 new defect (bug)

Site title and tagline: allow ability to hide each independently

Reported by: karmatosed Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version:
Component: Customize Keywords: has-ui-feedback has-ux-feedback has-patch
Focuses: Cc:
PR Number:

Description

By adding the ability for users to turn on or off the site title and tagline individually we would allow more flexibility. Currently it's both or none, this does not allow the flexility that users want over their site. There are valid cases where people do not want either.

Attachments (10)

title-tagline-1.jpg (85.8 KB) - added by melchoyce 3 years ago.
title-tagline-2.jpg (166.9 KB) - added by melchoyce 3 years ago.
poc-37516.diff (5.3 KB) - added by tellyworth 2 years ago.
poc-37516.2.diff (5.5 KB) - added by tellyworth 2 years ago.
(fixes partial refresh issue in prior diff)
theme-feature-37516.diff (4.6 KB) - added by tellyworth 2 years ago.
Adds a new custom-title-tagline theme feature that allows themes to explicitly support this going forward. No retrofit or change for themes that don't support that feature.
theme-example-37516.diff (3.2 KB) - added by tellyworth 2 years ago.
An example of how a theme might support the new custom-title-tagline feature.
combined-37516.diff (5.9 KB) - added by tellyworth 2 years ago.
Updated to combine both patches, remove debug, and fix for coding standards.
theme-mod-37516.diff (6.5 KB) - added by tellyworth 2 years ago.
Reimplement previous patch using theme mods instead of options
patch as tested with 2017 .jpg (25.7 KB) - added by boemedia 9 months ago.
Patch as tested with 2017 Theme
settings-general-display-site-title-display-tagline.jpg (139.7 KB) - added by paaljoachim 9 months ago.
Added check boxes to Settings -> General screen.

Download all attachments as: .zip

Change History (46)

#1 @zoonini
3 years ago

This would be an excellent enhancement. As a Happiness Engineer working with both WordPress.com and self-hosted users, I often see users work around this by removing the site title or tagline from their sites entirely, which isn't ideal since doing that has other repercussions. Other times, they need to install a custom CSS plugin and figure out the right code just to hide one of the two elements.

Allowing an easy way to show/hide the Site Title & Tagline separately would be benefit many users.

Last edited 3 years ago by zoonini (previous) (diff)

#2 @SergeyBiryukov
3 years ago

  • Component changed from General to Customize

#3 @celloexpressions
3 years ago

Being able to hide them separately would also potentially allow some validation to be added to prevent empty title and/or taglines. However, I'm not sure whether adding another checkbox would be the best UI for this. Perhaps there should be a visibility checkbox/icon next to the input fields for each option that allow them to be hidden (when the theme supports it)? It would also be nice if this could continue to use one theme support argument for both, but there may be significant compatibility issues for themes handling this option, especially with postMessage previewing in the customizer.

#4 @melchoyce
3 years ago

My favorite thing is when I go to make a ticket and @karmatosed has already made it. :)

I tried out both checkboxes and having a hide/show for each. Checkboxes are definitely more straightforward and intuitive, but the show/hide version isn't terrible.

Regardless, I love this idea — the introduction of logos means I often want a logo in place of a site title, but I still want a tagline.

#5 @karmatosed
3 years ago

The show/hide are interesting but I also feel that the checkboxes are more straightforward and clear. I almost want to consider it to be 'Hide site title' with display being default though.

#6 @karmatosed
3 years ago

Can we see about getting this into a version in the Customizer focus @melchoyce?

#7 follow-up: @melchoyce
3 years ago

I'd be interested in seeing how the checkbox version works out. I agree we should reverse the options to "Hide Site Title/Tagline."

#8 in reply to: ↑ 7 @melchoyce
3 years ago

Replying to melchoyce:

I'd be interested in seeing how the checkbox version works out. I agree we should reverse the options to "Hide Site Title/Tagline."

I've chatted with @zoonini and reverse my opinion here. Since the rest of the on/off checkboxes in the Customizer and the Admin equate checked with on, and unchecked with off, we shouldn't change that.

That said, let's go with title-tagline-1.jpg as it is.

#9 follow-up: @westonruter
3 years ago

@melchoyce should we lessen the margin between the text input and the checkbox? To me it would help visually link the two together better.

It'll be interesting implementing this with an eye toward backwards-compatibility for sites. We may need to introduce new theme support features to opt-in for the title and tagline being separately toggle-able. It will take some research and development to see what the technical options are.

#10 in reply to: ↑ 9 @melchoyce
3 years ago

Replying to westonruter:

@melchoyce should we lessen the margin between the text input and the checkbox? To me it would help visually link the two together better.

That'd be great. There's currently 20px of space between inputs and checkbox fields. In my above mockup I tightened that to 15px, which I think is a better increment. Something like:

.customize-control-text + .customize-control-checkbox {
    margin-top: -5px;
}

(Or less hacky...)

It'll be interesting implementing this with an eye toward backwards-compatibility for sites. We may need to introduce new theme support features to opt-in for the title and tagline being separately toggle-able. It will take some research and development to see what the technical options are.

Could we instead make assumptions based on someone's current setting? If you're currently showing your title/tagline, keep both checkboxes checked. If you're hiding, keep both unchecked.

#11 @melchoyce
3 years ago

After we do this, let's also look at improving the experience for themes that don't support taglines.

I'm thinking that if your theme doesn't support taglines, we should disable the "Display Tagline" checkbox, and add a note underneath explaining why the checkbox is disabled.

@tellyworth
2 years ago

@tellyworth
2 years ago

(fixes partial refresh issue in prior diff)

#12 @tellyworth
2 years ago

  • Keywords has-patch added

attachment:poc-37516.2.diff​ implements this as a proof-of-concept.

The WP_Customize_Manager changes are fine, I think, though might need improvement for certain cases.

For the POC I've handled this as an option that filters blogname and blogdescription to turn the title and tagline on and off. That probably has other unintended effects and isn't good enough for release. For this to move forward a more robust solution is needed - perhaps it should be a theme mod instead. I'm posting the patch as-is to encourage discussion by folks who have a better idea as to how that should work.

Partial refresh works with Twenty Seventeen.

#13 @melchoyce
2 years ago

Looks good to me!

This ticket was mentioned in Slack in #design by melchoyce. View the logs.


2 years ago

#15 @karmatosed
2 years ago

This is so great to finally get done! Huge thanks to everyone.

#16 @obenland
2 years ago

header-text-title and header-text-tagline should probably be features themes can add support for, along the lines of header-text (meaning as a sub-feature of custom-header. Customizer controls can then be shown based on theme support and we won't break back compat with header-text. With theme support in place we can then leave the showing/hiding of title & tagline to themes, and retrofit default themes with JS callbacks to handle it.

#17 @melchoyce
2 years ago

  • Milestone changed from Awaiting Review to 4.9

@tellyworth Any updates needed based on @obenland's feedback? Would love to get this merged before Beta 1 next Wednesday.

This ticket was mentioned in Slack in #design by karmatosed. View the logs.


2 years ago

This ticket was mentioned in Slack in #core by melchoyce. View the logs.


2 years ago

@tellyworth
2 years ago

Adds a new custom-title-tagline theme feature that allows themes to explicitly support this going forward. No retrofit or change for themes that don't support that feature.

@tellyworth
2 years ago

An example of how a theme might support the new custom-title-tagline feature.

This ticket was mentioned in Slack in #core by melchoyce. View the logs.


2 years ago

#21 @westonruter
2 years ago

@tellyworth would you please combine the patches into a single diff, remove temporary/debug code, and also run them against PHPCS to apply the necessary WordPress-Coding-Standards?

This ticket was mentioned in Slack in #core by melchoyce. View the logs.


2 years ago

@tellyworth
2 years ago

Updated to combine both patches, remove debug, and fix for coding standards.

#23 @tellyworth
2 years ago

@westonruter patch refreshed and updated as suggested.

I'm not convinced that the Twenty Seventeen change belongs in this release - I'll remove that if needed.

#24 @westonruter
2 years ago

@tellyworth I don't think we should include a feature if none of the core themes utilize it. Why do you think the Twenty Seventeen change isn't warranted?

Looking at this, it seems perhaps a theme mod should be used instead of option, but it's a tough call. Is this a setting that should persist with users when they switch themes? We don't do this for Custom Logo, though in the case of the logo a reason for this is that themes define different sizes. There wouldn't be, in theory, a difference from theme to theme for the title/tagline toggles.

#25 @melchoyce
2 years ago

@davidakennedy Can we get your input here?

This ticket was mentioned in Slack in #core by westonruter. View the logs.


2 years ago

#27 @westonruter
2 years ago

  • Milestone changed from 4.9 to Future Release

Punting since we're too far into beta.

@tellyworth
2 years ago

Reimplement previous patch using theme mods instead of options

#28 follow-up: @davidakennedy
2 years ago

I like this idea lot. I see this as a common request from users.

From @westonruter

Looking at this, it seems perhaps a theme mod should be used instead of option, but it's a tough call. Is this a setting that should persist with users when they switch themes? We don't do this for Custom Logo, though in the case of the logo a reason for this is that themes define different sizes. There wouldn't be, in theory, a difference from theme to theme for the title/tagline toggles.

Yeah, this is a tough call. I'd to see us go global option whenever it makes sense because that's easier on users after a theme switch. But this feels like it could be something that themers will do different from theme to theme, based on design. Some existing themes may hide the site description for example to fit better with the design. So theme mod feels better to me.

The implementation feels pretty good to me.

I don't think we'd need to implement it in all default themes, maybe just the current ones packaged with new installs: Seventeen, Sixteen and Fifteen.

cc: @melchoyce

#29 in reply to: ↑ 28 @melchoyce
2 years ago

Replying to davidakennedy:

... So theme mod feels better to me.

The implementation feels pretty good to me.

I don't think we'd need to implement it in all default themes, maybe just the current ones packaged with new installs: Seventeen, Sixteen and Fifteen.

This all sounds good to me 👍

#30 @bloggingthemes
2 years ago

I was just about to submit this idea but see it already was done. I did not read every single post comment but did glance through. But to get straight to the point, I design themes and this evening I was like WTF, I discovered you cannot disable the site title or tagline individually. I didn't realize this until now.

I was testing a new theme I am making where it allows a logo to be used, but wanted to give the user the option to disable the site title but keep the tagline...turns out nope! There are many instances where a user will want a logo with site title and tagline, or logo with the title only, or logo with the tagline only.

Long story short, I really hope this is going to be added to the next release of WordPress.

Cheers,
AJ

#31 @Orbit Storm
21 months ago

Just wanted to add support for this change.

Currently, I'm using a theme with a custom logo which requires me to hide the site title to avoid redundancy. By hiding the site title, the name of the blog is removed from the browser tab and instead, the tab only displays my somewhat-lengthy site tagline (which looks silly).

Short of upgrading to a paid plan to use custom CSS, I'm out of options.

This ticket was mentioned in Slack in #design by karmatosed. View the logs.


9 months ago

#33 in reply to: ↑ 32 @boemedia
9 months ago

  • Keywords has-ui-feedback has-ux-feedback added; ui-feedback ux-feedback removed

The design team would love to see this feature appear in 5.1!

Today, I tested the latest patch. The splitting of the checkboxes seems to work in 2017, but in 2016 and 2015, there's only one checkbox for both title and tagline. In 2019, I don't see the option to check/uncheck.

Unless I got the intention wrong, this patch needs some extra work.

See screenshot for how it looks with 2017. Not sure if I prefer the checkboxes both underneath the tagline, or one under the title and one under the tagline.

The vertical white space in between could be a little smaller if you ask me. Do we have other places with multiple checkboxes to compare?

@boemedia
9 months ago

Patch as tested with 2017 Theme

#34 @melchoyce
9 months ago

"Display Site Title" should definitely get moved up so it's directly beneath the site title field.

#35 @paaljoachim
9 months ago

Yeah. I would say go with title-tagline-1.jpg the first wireframe posted to this trac ticket.
It gives a clear checkbox option below each.

We also need the same option in the Settings -> General screen.

@paaljoachim
9 months ago

Added check boxes to Settings -> General screen.

#36 @joyously
9 months ago

This should definitely be a site option, not a theme_mod. The proof is Paal's comment about it needing to be on the General Settings page.

For example, the user should not have to turn the tagline off every time he switches themes.

Note: See TracTickets for help on using tickets.