WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 6 years ago

#31721 closed defect (bug) (invalid)

"Add new" button bug

Reported by: daniluk4000 Owned by: bilacoder
Milestone: Priority: lowest
Severity: minor Version:
Component: General Keywords: has-patch
Focuses: ui Cc:

Description

I noticed a bug when using the new Theme Switcher in the Customizer. For large texts, such as the Russians, the button moves to the next line and looks disgusting.

Attachments (7)

bug.png (14.3 KB) - added by daniluk4000 7 years ago.
Bug
bugfix.png (77.1 KB) - added by daniluk4000 7 years ago.
Bug Fix Concept
31721.diff (2.1 KB) - added by bilalcoder 6 years ago.
patch which makes enough space for 'Add New' button
31721.png (25.6 KB) - added by ocean90 6 years ago.
Безымянный1.png (10.3 KB) - added by daniluk4000 6 years ago.
31721.2.diff (373 bytes) - added by SergeyBiryukov 6 years ago.
31721.2.after.png (19.3 KB) - added by SergeyBiryukov 6 years ago.

Download all attachments as: .zip

Change History (30)

@daniluk4000
7 years ago

Bug

@daniluk4000
7 years ago

Bug Fix Concept

#1 @celloexpressions
7 years ago

  • Keywords needs-patch good-first-bug added
  • Milestone changed from Awaiting Review to 4.2
  • Severity changed from normal to minor

white-space: nowrap; should fix it. Related: #31289 changed the button style and position, but probably doesn't fix this.

@bilalcoder
6 years ago

patch which makes enough space for 'Add New' button

#2 @DrewAPicture
6 years ago

  • Keywords has-patch added; needs-patch removed
  • Owner set to bilacoder
  • Status changed from new to assigned

Hi @bilacoder, thanks for the patch!

In 31721.diff, we should probably more-closely target the elements for that specific Customizer control, as things like .wrap h2 are used in many other places in the admin, not just the Customizer. The same goes for floating #customize-controls a, as that affects links in basically any Customizer control.

Targeting .customize-themes-panel as the top-level element might be a better starting place.

#3 @celloexpressions
6 years ago

Actually, this definitely needs to wait for #31289 or be combined in there. The selector is definitely changing, and with .button this may not even be an issue, haven't tried it.

@ocean90
6 years ago

#4 @ocean90
6 years ago

Btw: This can be an issue with all add-new buttons, see 31721.png

#5 @daniluk4000
6 years ago

Confirmed
http://cs624524.vk.me/v624524386/283d2/iGQo5DtKHbI.jpg

#6 @daniluk4000
6 years ago

And what about this concept?

#7 @daniluk4000
6 years ago

  • Component changed from Customize to General
  • Keywords needs-patch added; has-patch removed
  • Summary changed from Theme switcher: "add new" button bug to "Add new" button bug

#8 follow-up: @samuelsidler
6 years ago

  • Priority changed from normal to lowest

If this is really an issue (or potential issue) with all add-new buttons, I don't think it blocks 4.2.

Can we get UI feedback here on what should be done?

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


6 years ago

#10 in reply to: ↑ 8 ; follow-up: @SergeyBiryukov
6 years ago

  • Keywords has-patch added; needs-patch removed

Replying to samuelsidler:

If this is really an issue (or potential issue) with all add-new buttons, I don't think it blocks 4.2.

It became much more prominent with the new theme switcher in Customizer, which squeezes the heading into a narrow column. We don't do that in the rest of the admin.

.wrap .add-new-h2 { white-space: nowrap } appears to resolve this: 31721.2.after.png.

#11 in reply to: ↑ 10 ; follow-up: @DrewAPicture
6 years ago

Replying to SergeyBiryukov:

.wrap .add-new-h2 { white-space: nowrap } appears to resolve this: 31721.2.after.png.

As I mentioned above, going general on the selector might have other negative effects elsewhere in the admin. See any other issues in changing that to nowrap?

#12 @DrewAPicture
6 years ago

  • Keywords ui-feedback added

#13 in reply to: ↑ 11 ; follow-up: @SergeyBiryukov
6 years ago

Replying to DrewAPicture:

As I mentioned above, going general on the selector might have other negative effects elsewhere in the admin.

But the point is to fix this for all the "Add New" headings, per comment:4.

See any other issues in changing that to nowrap?

Nope.

#14 in reply to: ↑ 13 ; follow-up: @MechaCoder
6 years ago

Replying to SergeyBiryukov:

Replying to DrewAPicture:

As I mentioned above, going general on the selector might have other negative effects elsewhere in the admin.

But the point is to fix this for all the "Add New" headings, per comment:4.

See any other issues in changing that to nowrap?

Nope.

Sorry; when i tested it the nowrap not all the link can be seen pm very large string values the a tag rendered beyond screen edge

#15 in reply to: ↑ 14 @SergeyBiryukov
6 years ago

Replying to MechaCoder:

Sorry; when i tested it the nowrap not all the link can be seen pm very large string values the a tag rendered beyond screen edge

Could you share a screenshot?

This ticket was mentioned in Slack in #core-customize by helen. View the logs.


6 years ago

#17 @helen
6 years ago

  • Milestone changed from 4.2 to Future Release

Punting this from 4.2 as it's a long-existing thing on admin screens, for the theme switcher in the customizer both @ocean90 and I would rather just remove it completely: #31837.

#18 follow-up: @MechaCoder
6 years ago

sorry for the late response but still trying to work things out :-(

https://docs.google.com/presentation/d/1813ndQCs8H3kKxcu7cJCEOc1HUeHpjfOMhvzDESv5C4/edit?usp=sharing

@helen - also on the page and post listing page, it a button i uses often to copy client built content?

also my noticing may have pushed the sting to far, but i was thinking of poeple with blackberrys and very small phones. i hope i haven't offended anyone _, also if some could tell me where the code is being rendered the function's file than i think i have a fix which will make it elegant, still new to core

#19 in reply to: ↑ 18 @SergeyBiryukov
6 years ago

Replying to MechaCoder:

https://docs.google.com/presentation/d/1813ndQCs8H3kKxcu7cJCEOc1HUeHpjfOMhvzDESv5C4/edit?usp=sharing

No apologies necessary, thanks for the screenshot.

I don't think "Add New" would be that long in any translation :) But yeah, a more elegant solution would be nice.

To find the code, I'd suggest searching for 'Add New' in core files, there's a separate string for each screen.

#20 @MechaCoder
6 years ago

@SergeyBiryukov no my way is not working sorry i will continue working on it but i think your fix is the most elegant for a moment sorry for holding up the ticket

#21 @iseulde
6 years ago

  • Version trunk deleted

#22 @afercia
6 years ago

  • Keywords close added; good-first-bug ui-feedback removed
  • Milestone Future Release deleted

As far as I see this button was in trunk at some point and then removed in [31968]. Any reason to keep this ticket open?

#23 @ocean90
6 years ago

  • Keywords close removed
  • Resolution set to invalid
  • Status changed from assigned to closed
Note: See TracTickets for help on using tickets.