Opened 11 years ago
Closed 8 years ago
#27314 closed enhancement (fixed)
Make sure button-primary has button class
Reported by: | iseulde | Owned by: | chris_d2d |
---|---|---|---|
Milestone: | 4.7 | Priority: | normal |
Severity: | normal | Version: | 3.8 |
Component: | General | Keywords: | has-patch |
Focuses: | ui, administration | Cc: |
Description
This patch:
- Adds the
button
class to all primary buttons. This is necessary to make them responsive. - Removes all
secondary-button
classes and replaces it withbutton
when needed.button-seconary
does the same as button, but it's not responsive. It shouldn't be used. - Replaces classes inside
submit_button()
with a shorthand for some buttons, a shorthand is used most of the time.
Attachments (4)
Change History (21)
#2
@
11 years ago
- Milestone changed from Awaiting Review to Future Release
- Type changed from defect (bug) to enhancement
- Version changed from trunk to 3.8
#5
@
9 years ago
I'm taking a look at this for #wcus-contributor-day, let me know in slack (chrissmith) if you want to collaborate or are already working on this.
#6
@
9 years ago
- Keywords needs-testing added; needs-refresh removed
I found a couple more locations where button-secondary could be removed:
src/wp-includes/customize/class-wp-customize-nav-menu-control.php
src/wp-includes/customize/class-wp-customize-new-menu-section.php
src/wp-includes/customize/class-wp-widget-area-customize-control.php
These are related to #19910's move away from switch statements for the customizer.
#7
@
9 years ago
Widgets in the customizer is using .button-secondary
in the JS, that needs to be considered here. We could probably use some documentation somewhere about what the classes are and what remains as back-compat. That can just be in this ticket for now while we figure it out.
#8
@
9 years ago
- Owner set to chris_d2d
- Status changed from new to assigned
Assigning to mark the good-first-bug as "claimed".
#13
@
8 years ago
- Keywords ui-feedback good-first-bug needs-testing removed
Refreshed patch. Tried to address all the points mentioned in the ticket description and comments. Additionally, there's a mixed situation now where submit_button()
is sometimes used passing an empty string for the CSS class, and sometimes passing button
(alone or together with other classes). Since passing button
is unnecessary, I'd propose to standardise and remove it. This implies a small adjustment to get_submit_button()
in order to remove empty items to avoid a single class button
being printed out with a space at the end class="button "
.
The patch is pretty big and would need to be merged as soon as possible :) Any feedback welcome, see also the QUnit tests part. /cc @helen @iseulde
Patch needs a refresh and feedback from the UI folks.