-
-
Notifications
You must be signed in to change notification settings - Fork 814
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix buggy placement of icons on buttons #18005
Conversation
(Standard links)
|
See civicrm/civicrm-core#18005 for work to standardize this, but it's already common practice.
See civicrm/civicrm-core#18005 for work to standardize this, but it's already common practice.
@MegaphoneJon thanks for suggesting--I just added screenshots with Shoreditch, which appears to have nixed the icons all along. I do think we're in a bit of an unstable situation with regard to the UI. On the one hand, you can reasonably complain that a core change breaks Shoreditch, which has been promoted as "the future" in some circles for a while. Meanwhile, others can reasonably complain that something like #17775 causes core to depend upon Shoreditch, or at least Bootstrap. Finally, a key effort has been that the work to enable Shoreditch / CiviHR / "new" CiviCase should be modular so that others can write their own themes, and others have been doing just that. It's sort of reasonable to expect that a PR works nicely in four or five CMS contexts plus a second theme for one of them, but it becomes unreasonable to expect testing of a growing number of themes. One of the driving forces behind dev/user-interface#24 is dissatisfaction with Shoreditch, and I do think it will probably remain a niche thing rather than an emerging standard. |
Jenkins retest this please |
This is too form-layery to need a test |
@agh1 conflict.... |
aff03fa
to
0320402
Compare
@eileenmcnaughton thanks, just rebased |
@vingle @christianwach @artfulrobot @colemanw is anyone able to review this? Regarding shoreditch - affecting shoreditch is non-blocking but we should at least make @jamienovick aware when we think a PR may affect shoreditch so he can adjust shoreditch. |
0320402
to
be37c14
Compare
I just reworked the screenshots into a table so it's easier to see changes side-by-side in each context. Also, this is a case where a reviewer might do best by looking at the commits in sequence. Some are more significant than others, and 90% of the file changes are just one commit that cleans up extra non-breaking spaces. |
Merging based on @vingle 's review here |
I'm not sure if it's this PR but I'm noticing that one of the icon/button PRs lately changes the clickable surface area of the buttons. So for example if you click on a button in the area where the icon is then nothing happens, but if you click on the word then it clicks. Whereas hovering still covers the whole button surface. |
@demeritcowboy ugh you are absolutely right, and this PR caused it. The issue is that the button isn't what you see--it's only the part with the text. This all stems from using |
@agh1 @demeritcowboy We have some good forward-progress on buttons so would be a shame to revert if we can continue to improve. I've noticed that the clickable area is smaller and also once submitted they go a strange hashed colour briefly. I know that @vingle is keen to review button PRs (and see them become more consistent). |
@demeritcowboy @mattwire I'm making some progress on getting all of these switched out for real |
@demeritcowboy @mattwire @vingle I have a WIP that replaces all of the |
Thanks @agh1 |
This is very promising - be brilliant to see the end of |
Revert #18005 Fix buggy placement of icons
per recommendation from @mattwire this has been reverted along with the previously reverted one since it seems required to get stable. The plan is to send out an email before the end of the week pointing people to both & aim to merge next week into what will be 5.31 |
This reverts commit 353282c.
Overview
Buttons with icons can look funny in a number of circumstances, and CiviCRM wasn't always consistent with itself on how icons were placed. Specifically, icons had absolute positioning 4 pixels from the top and left of the button. For many sites, this would be well above or below the text and could distort the button size.
This standardizes icons as inline blocks with standard padding and a single space between them and any text that follows. In the process, I simplified a lot of how the box model on buttons is managed.
Finally, the WordPress admin CSS gives items with the class
button
a minimum height of 30 pixels, so this does a reset of that.Comparison
(In the View Contribution screenshots, the first two are
<a class="button">
while the third is an actual<input type="submit">
.)Technical Details
There was a special class for buttons with icons, and this makes that unnecessary. There were also some unused or barely-used button and icon related classes that I removed, standardizing the markup if necessary.