Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
In the mail display we have changed the way how we display the header. We should allow hiding the all headers part for making the mail more readable for the user.
Proposed resolution
Implement a show/hide link to display or not the All headers part of the mail.
Remaining tasks
User interface changes
API changes
Data model changes
Comment | File | Size | Author |
---|---|---|---|
#22 | provide_a_show_hide-2822298-22.patch | 4.43 KB | tduong |
| |||
#22 | interdiff-2822298-17-22.txt | 914 bytes | tduong |
#22 | Screen Shot 2016-10-28 at 09.57.44.png | 146.57 KB | tduong |
#18 | Screen Shot 2016-10-28 at 08.34.25.png | 86.68 KB | tduong |
#17 | interdiff-2822298-16-17.txt | 363 bytes | johnchque |
Comments
Comment #2
johnchqueLet's try this.
Comment #3
miro_dietikerThe expanded header should
- Not display the headers that are already output (from, to, ..)
- Be preformatted, including consideration of line wrappings, in fixed width format
Comment #4
johnchqueBy now made the Hide / Show work, still need to implement the icon and add a better format to the all header thingy, not sure if we should remove the All header label.
Comment #6
johnchqueSorry, branch one commit behind.
Comment #7
johnchqueMade some changes for adding icons. :)
Comment #8
johnchqueIMHO we should add the expand / hide before the All headers element so the link remains in the same place, which is more core-ish.
I would also remove the All Headers label.
Comment #9
miro_dietikerStarts to look good.
Yeah the Expand / Collapse link should be above the headers and stay there.
It should also not eat an extra line, doesn't need to be a block element.
The headers are still not wrapped on new line and should still use a fixed format (preformatted style) font.
Comment #10
mbovan CreditAttribution: mbovan at MD Systems GmbH commentedIs this going to work if Inmail is not installed in /modules directory?
Not sure how complex is to implement this without jQuery... It would be cool for future Inmail Message element integrations to use plain JS to reduce dependencies as much as possible. Could be a followup.
Should we prefix classes with inmail?
Also, we load JS logic in teaser mode as well. I think it should be loaded only for the full view mode. Same applies for "Expand header" button which is now visible in teaser mode.
Comment #11
tduong CreditAttribution: tduong at MD Systems GmbH commentedI've just moved the header link to be displayed before the "All headers" block, thought that by removing the
more-link
from the a-Tag class removes the "block behaviour" ( ).I was also trying to figure out where to break the "All headers" elements to be displayed each on a separate line but didnt had enough time for it.
Uploading a small progress here, not implementing the observations of comment #10 because I don't actualy know stuff about js/libraries and how they work together, sorry ^^'
EDIT: sorry, I took over this patch/issue because @miro_dietiker told me I could do/try something to make some little progress in here (since @yongt9412 and I work alternatively during Thursday afternoon resp. morning).
Comment #12
johnchqueSorry, took longer than expected. now should be better, classes are nicer, link doesn't take a whole line and added pre tags to the header, also removed "All Headers" to make the display more similar to the mockups.
Comment #14
johnchqueHere we go with the screenshots.
Which are similar to this mockup: https://www.drupal.org/files/issues/Screen%20Shot%202016-10-21%20at%2011... :)
Comment #15
johnchqueSorry, tests fixed.
Comment #16
johnchqueOK, addressing all comments above, now the classes / ids are better. The css icons work when the module is not installed in modules/, also the font size of the pre has been reduced to 0.9 em's and finally it has a horizontal scroll when the screen is small. :).
Comment #17
johnchqueUps sorry, last change. :)
Comment #18
tduong CreditAttribution: tduong at MD Systems GmbH commentedOh, that was the way... totally didn't think about this ._.
Nice :)
Actually I'm not sure if I'm missing something, but after applying your last patch and clear all caches, I still have the links eating a line and I don't have the horizontal scroll :/
Comment #19
miro_dietikerWe are missing this on the preformatted container:
So the lines stay as lines and don't wrap and we have a horizontal scrollbar if they are oversize.
Comment #20
miro_dietikerThe label "All headers" is semantically needed. We just hide it in CSS.
Comment #21
miro_dietikerUsing the multiple-attachments.eml example, it turns out the Message-ID line is wrapped into two lines still. We need to investigate where the newline is coming from, but that's a follow-up.
Comment #22
tduong CreditAttribution: tduong at MD Systems GmbH commentedImplemented observations mentioned above.
Do we need a test for this layout ? Followup ?
Created followup: #2822786: multiple-attachments.eml Message-ID line is wrapped into two lines
Comment #24
miro_dietikerAwesome, i like, but we do:
display: none
Fixed, committed.