Problem/Motivation
Found a small bug on admin/config/regional/translate. If i translate something, and I clicked somewhere the message is visible and looks bad (strange brown border, no left border, no margin between message and table, etc):
Proposed resolution
Make it appear as a proper message, as it was intended. It needs a wrapper div element, and the proper message subclass. The it appears properly:
Note that the message is still misaligned. That is already handled on a more general level in #2220905: Misaligned messages status.
Remaining tasks
Review. Commit.
User interface changes
Message looks like a standard message.
API changes
None.
Comment | File | Size | Author |
---|---|---|---|
#25 | 2318381_message-bug_25.patch | 841 bytes | csakiistvan |
#11 | 2318381_message-bug_11.patch | 873 bytes | csakiistvan |
localeTranslateChangedMarker_bug_after.png | 96.02 KB | csakiistvan | |
localeTranslateChangedMarker_bug_before.png | 86.89 KB | csakiistvan | |
#2 | 2318381_message-bug_2.patch | 905 bytes | csakiistvan |
Comments
Comment #1
csakiistvanComment #2
csakiistvanThere is the patch
Comment #3
csakiistvanComment #4
thamasI reviewed the patch and made a couple of changes:
Comment #9
csakiistvan@thamas the messages alignement problem is in the other issue see that: https://www.drupal.org/node/2220905
So, i agree the localetranslate-changed-warning is deleted, but the others is not necessary
Comment #10
csakiistvanComment #11
csakiistvanThere is a patch with new div see #2 and without "localetranslate-changed-warning" class #4
Comment #12
thamas@csakiistvan you are right, thanks for pointing this out!
I checked up the #console question and it seems that it may be removed (see #2017257-50: Create generic layout classes) but I did not find any relavant work yet.
Comment #13
thamasComment #14
thamasComment #15
Gábor HojtsyUpdating issue summary with embedded screenshot for easier review.
Comment #16
Gábor HojtsyI tested the patch manually and it works well. I'm not 100% sure its the best idea to add a console here, for example, if you already have strings saved from this screen, you have a id="console" on the page above the form, now you change something, you have two elements with id="console". Looks like all that console does is it adds some margins so the message will not run into the form table (in this case). The same margins may be applied without the risk of duplicating the console / message container. I'll ask a few frontend people to take a look.
Comment #17
Gábor HojtsyComment #18
Gábor HojtsyWhat tabledrag does for example is the following:
The tabledrag-changed-warning class has a bottom margin set. That sounds more compatible with an existing #console on the page compared to adding a #console in the markup. Also less markup :)
Comment #19
thamasAdding a class for setting margins seems to be a better way to me too. (We can add back the class I removed and than add that selector in the CSS near to the table-drag's… :) )
Using the "role=alert" is also a good practice in the table-drag example, that should be added too!
See also: #2321121: Remove #console
Comment #20
Gábor HojtsyThe tabledrag class is system level, the locale class will be in locale's CSS I guess.
Comment #21
thamasYou're right I think because locale is not necessary switched on. Then we have to add a locale.admin.theme.css file.
Comment #22
Gábor HojtsySo sounds like we should fix #2321121: Remove #console first and then come back here?
Comment #23
csakiistvanOk, if the Replace #console with .messages__container will fixed, I adapt it.
Comment #24
Gábor HojtsySo we postponed this on #2321121: Remove #console but that was marked as dupilcate of #2213583: Misaligned Icons in Drupal 8.x. THAT one finally landed, so unpostponing this one. Looking forward to updates to this one so we can get it in :)
Comment #25
csakiistvanSo I update the patch, I removed #console div element, add the clearfix class to .messages div element.
Comment #26
herom CreditAttribution: herom commentedComment #27
Gábor HojtsyLooks great to me. Thanks!
Comment #28
catchCommitted/pushed to 8.0.x, thanks!
Comment #30
Gábor Hojtsy