Follow up for #238 in #1833022-238: Only display interface language detection options to customize more granularity
Problem/Motivation
On: admin/config/regional/language/detection
@Dries
I think we can improve the section titles and whitespace to make things look more like sections. For example, the title 'Content language detection' is kinda small-ish and doesn't help me understand the structure of the page. I can't really put my finger on it, but there is something about the design/layout/style that still doesn't make it 100% intuitive and clear
Steps to test
Try it with and without content translation enabled.
- Navigate to the modules page
- Enable the 'Content Translation' and 'Interface Translation' modules
- Navigate to 'admin/config/regional/language/detection'
Proposed resolution
Add more spacing below each section (except the last one). @Bojhan et. al. discussed (in person in Prague) making the titles bigger, but that is a pattern *not* used elsewhere and would have looked out of place.
Remaining tasks
Commit.
User interface changes
API changes
None.
Related Issues
Comment | File | Size | Author |
---|---|---|---|
#35 | core-js-installer-states-2033959-35.patch | 1.07 KB | nod_ |
#31 | DetectionBeforeAfter.png | 199.1 KB | Gábor Hojtsy |
#25 | drupal-language-design-2033959-25.patch | 541 bytes | thamas |
#21 | drupal-language-design-2033959-21.patch | 565 bytes | Gábor Hojtsy |
#13 | drupal-language-design-2033959-13.patch | 1.88 KB | borisbaldinger |
Comments
Comment #1
jeanfei CreditAttribution: jeanfei commentedI've take screenshots of the detection an selection admin page.
1. Without content translation enabled
2. With content translation enabled
3. With content translation enabled - 'Customize Content language' option checked
Comment #2
borisbaldinger CreditAttribution: borisbaldinger commentedAfter i talked to Gabor and Boyan, i just added a margin at the bottom of the table-group.
For the last element I had to add a "last"-class to remove the margin bottom right before the save button.
This one needs now a usability review.
Comment #3
seutje CreditAttribution: seutje commentedNo javamascripts to review...
Comment #4
seutje CreditAttribution: seutje commentedNo JavamaScripts to review...
Comment #5
Gábor HojtsyWe don't usually do naming like this. We instead usually write words separately. So $last_item.
IMHO instead of having a separate 'last' variable, have a $classes variable and initialize it above with the string that is already here, and append the 'last' class as needed. That keeps all classes together nicely?
Also needs screenshots (again :) about the solution now.
Comment #6
Gábor HojtsyCross-post.
Comment #7
borisbaldinger CreditAttribution: borisbaldinger commentedComment #8
borisbaldinger CreditAttribution: borisbaldinger commentedChanged the code as proposed.
Screenshots redone also.
1. With Content Translation enabled and checkbox checked
2. With Content Translation enabled
3. Without Content Translation
Comment #9
borisbaldinger CreditAttribution: borisbaldinger commentedAdded Patch from #8 because it was ignored in the post before.
Comment #10
borisbaldinger CreditAttribution: borisbaldinger commentedAdded the same patch from #8 again because there it was ignored....
Comment #11
Gábor HojtsyLooks almost perfect. Only one thing:
Coding style issue there :) Add a space after the comma.
No need to update screenshots for this, just the patch :)
Comment #12
Gábor HojtsyComment #13
borisbaldinger CreditAttribution: borisbaldinger commentedFixed the coding standard issue.
Comment #14
Gábor HojtsyThis was @Bojhan approved [TM] in person, and otherwise looks good as well, so let's get it in :)
Comment #15
alexpottThis isn't quite right. It is resulting in css like
<div class="form-item table-language-group table-' . language_content . '-wrapper last">
. It should be$classes = array('form-item table-language-group', 'table-' . $type . '-wrapper');
- just replace the all the double quotes with single quotes.This comment is way too vague... a lot of the css in this file is admin specific theming! Let's embrace the pattern set by the other sections and call this
/* Language UI */
or/* Language Admin UI */
.Also whilst reviewing the patch I was wondering if there was a way to do this only with css selectors and no php.
Comment #16
borisbaldinger CreditAttribution: borisbaldinger commentedI can do the codechanges with doubleqoutes and single quotes and the Comment.
But i think the PHP is needed because every module has the possibility to add another table. And in order to support older browsers we need a specific identificator for the last item.
Comment #17
Gábor HojtsyUse single quotes for all the strings, then the concatenation will fix itself :)
As for the PHP-less solution, https://drupal.org/node/61509 is not yet updated to Drupal 8 browser support. I'm not sure if we support older browsers anymore that need a class and cannot do with :last children selector? Should check with a frontender :)
Comment #18
Gábor HojtsyTrying to get that feedback via https://twitter.com/gaborhojtsy/status/385387453739446272 :)
Comment #19
nod_IE9+, so :last is totally good. http://caniuse.com/#feat=css-sel3
Only tagging for possible port to the ie8 module.
Comment #20
Gábor HojtsyOk, then let's skip the PHP part and apply the selector to CSS :)
Comment #21
Gábor HojtsySo looks like this would be as simple as the attached. (Also unassigned boris since he is not working on this looks like).
Comment #22
borisbaldinger CreditAttribution: borisbaldinger commentedSorry, had a lot of work to cover in the last weeks. :-/ Thx for adapting the patch.
Comment #23
Gábor HojtsySo apparently last-child does not work the way I thought it would. It will not apply, because the element is not the last child of its parent, although it is the last child *that has this class*. What am I doing wrong? Frontend help needed :)
Comment #24
Gábor HojtsyComment #25
thamasWe clould try to use
:nth-last-child()
, but if I understand right the submit button always will be the last element and before that we always will have a.table-language-group
div. If that is the case we can simpy apply a negative top margin to the submit button.Comment #26
Gábor HojtsyYeah well, that assumes some things about the form :D But it is true the bottom margin did too. Those who want to alter this form can adjust the styling as well in overrides.
Comment #27
Gábor HojtsyTested manually. Looks good as it can.
Comment #28
thamasIf there would be a reason to stick to a css
:last
solution, this works too::)
Comment #29
thamasOops!
Comment #30
YesCT CreditAttribution: YesCT commentedneeds work for quick screenshots of latest patch (before and after)
in a few browsers
Please embed them in the issue summary.
Instructions: https://drupal.org/contributor-tasks/add-screenshots
Comment #31
Gábor HojtsyBefore/after in one picture. Putting into summary.
Comment #32
ursula CreditAttribution: ursula commentedRemoved needs screenshot tag - the really nice screenshot is already in the issue summary.
Comment #33
webchickWow, there are a lot of comments in this issue for the change. :) It looked intimidating, but looks like it's a very simple fix.
So!
Committed and pushed to 8.x. Thanks!
Comment #34
Gábor HojtsyYay, thanks!
Comment #35
nod_Simplification since #type item has been fixed for #states.
Comment #35.0
nod_Updated issue summary.
Comment #36
nod_Sorry totally wrong issue, meant to send a patch for #2099577: Follow-up: First installer page has initially needless description for how translations are handled.
Comment #37
nod_Comment #39
LewisNymanHi, can someone involved in this issue review #2194807: Remove obsolete CSS for language admin form please?