Skip to content

Commit fd53c79

Browse files
committed
Fix CSS issues with message list, update CHANGELOG
1 parent 42b9f3e commit fd53c79

File tree

3 files changed

+45
-39
lines changed

3 files changed

+45
-39
lines changed

CHANGELOG.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,35 @@
11
# Mailspring Changelog
22

3+
### 1.2.0 (4/3/2018)
4+
5+
Features:
6+
7+
* **Thread Sharing** allows you to easily sync an email thread to the cloud and share it using a link. Mailspring automatically syncs new emails that arrive on the thread and anyone with the link can view the thread or download attachments.
8+
9+
Fixes:
10+
11+
* Searching your mailbox using the "in:folder" syntax no longer produces a limited / old set of results when many, many results match.
12+
13+
* The composer cursor no longer gets "stuck" occasionally when typing diatric or multi-key composition characters. #718, #578
14+
15+
* The composer no longer copies an empty string to the clipboard if you have no selected text when you press Ctrl/Cmd+C. #787
16+
17+
* The thread toolbar buttons now have a grouped appearance which makes the UI more compact and usable. #283
18+
19+
* Mailspring now uses the correct presets for Fastmail and Startmail accounts. #759, #756
20+
21+
* Clicking to collapse a message with expanded headers now works as expected. #636
22+
23+
* Mailspring never shows images by default when you're viewing your spam folder. #784
24+
25+
Development:
26+
27+
* The "Download attachments when..." option, which was never implemented in the new sync engine, has been removed from Preferences > General.
28+
29+
* When resetting an account, Mailspring correctly re-fetches open/read receipt and snoozing metadata
30+
31+
* Mailspring now uses Electron 1.8.4.
32+
333
### 1.1.5 (3/6/2018)
434

535
Fixes:

app/internal_packages/message-list/lib/message-item.jsx

Lines changed: 2 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import React from 'react';
22
import PropTypes from 'prop-types';
3-
import classNames from 'classnames';
43
import { Utils, Actions, AttachmentStore } from 'mailspring-exports';
54
import { RetinaImg, InjectedComponentSet, InjectedComponent } from 'mailspring-component-kit';
65

@@ -32,23 +31,17 @@ export default class MessageItem extends React.Component {
3231
downloads: AttachmentStore.getDownloadDataForFiles(fileIds),
3332
filePreviewPaths: AttachmentStore.previewPathsForFiles(fileIds),
3433
detailedHeaders: false,
35-
detailedHeadersTogglePos: { top: 18 },
3634
};
3735
}
3836

3937
componentDidMount() {
4038
this._storeUnlisten = AttachmentStore.listen(this._onDownloadStoreChange);
41-
this._setDetailedHeadersTogglePos();
4239
}
4340

4441
shouldComponentUpdate(nextProps, nextState) {
4542
return !Utils.isEqualReact(nextProps, this.props) || !Utils.isEqualReact(nextState, this.state);
4643
}
4744

48-
componentDidUpdate() {
49-
this._setDetailedHeadersTogglePos();
50-
}
51-
5245
componentWillUnmount() {
5346
if (this._storeUnlisten) {
5447
this._storeUnlisten();
@@ -76,23 +69,6 @@ export default class MessageItem extends React.Component {
7669
Actions.fetchAndSaveAllFiles(this.props.message.files);
7770
};
7871

79-
_setDetailedHeadersTogglePos = () => {
80-
if (!this._headerEl) {
81-
return;
82-
}
83-
const fromNode = this._headerEl.querySelector(
84-
'.participant-name.from-contact,.participant-primary'
85-
);
86-
if (!fromNode) {
87-
return;
88-
}
89-
const fromRect = fromNode.getBoundingClientRect();
90-
const topPos = Math.floor(fromNode.offsetTop + fromRect.height / 2 - 10);
91-
if (topPos !== this.state.detailedHeadersTogglePos.top) {
92-
this.setState({ detailedHeadersTogglePos: { top: topPos } });
93-
}
94-
};
95-
9672
_onToggleCollapsed = () => {
9773
if (this.props.isMostRecent) {
9874
return;
@@ -219,12 +195,11 @@ export default class MessageItem extends React.Component {
219195
if (this.props.pending) {
220196
return null;
221197
}
222-
const { top } = this.state.detailedHeadersTogglePos;
223198
if (this.state.detailedHeaders) {
224199
return (
225200
<div
226201
className="header-toggle-control"
227-
style={{ top, left: '-14px' }}
202+
style={{ top: 18, left: -14 }}
228203
onClick={e => {
229204
this.setState({ detailedHeaders: false });
230205
e.stopPropagation();
@@ -241,7 +216,7 @@ export default class MessageItem extends React.Component {
241216
return (
242217
<div
243218
className="header-toggle-control inactive"
244-
style={{ top }}
219+
style={{ top: 18 }}
245220
onClick={e => {
246221
this.setState({ detailedHeaders: true });
247222
e.stopPropagation();

app/internal_packages/message-list/styles/message-list.less

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ body.platform-win32 {
395395
}
396396

397397
.header-row {
398-
margin-top: 0.5em;
398+
margin-top: 0.2em;
399399
color: @text-color-very-subtle;
400400

401401
.header-label {
@@ -404,9 +404,6 @@ body.platform-win32 {
404404
font-weight: @font-weight-normal;
405405
margin-left: 0;
406406
}
407-
408-
.header-name {
409-
}
410407
}
411408

412409
.message-actions-wrap {
@@ -451,7 +448,6 @@ body.platform-win32 {
451448
}
452449

453450
.message-time {
454-
padding-top: 4px;
455451
z-index: 2;
456452
position: relative;
457453
display: inline-block;
@@ -471,11 +467,12 @@ body.platform-win32 {
471467
.message-header-right {
472468
z-index: 4;
473469
position: relative;
474-
top: -5px;
470+
top: -2px;
475471
float: right;
476472
text-align: right;
477473
display: flex;
478-
height: 2em;
474+
align-items: baseline;
475+
height: 1em;
479476
}
480477
}
481478

@@ -641,12 +638,19 @@ body.platform-win32 {
641638
color: @text-color-very-subtle;
642639
}
643640

641+
&.from-participants {
642+
.expanded-participants {
643+
.participant-type {
644+
margin-top: 0;
645+
}
646+
}
647+
}
648+
644649
&.to-participants {
645650
width: 100%;
646651

647652
.collapsed-participants {
648653
width: 100%;
649-
margin-top: -6px;
650654
}
651655
}
652656

@@ -672,10 +676,7 @@ body.platform-win32 {
672676
}
673677

674678
.participant-type {
675-
margin-top: 0.5em;
676-
&:first-child {
677-
margin-top: 0;
678-
}
679+
margin-top: 0.2em;
679680
}
680681

681682
.from-label,

0 commit comments

Comments
 (0)