feat: Cache status height to avoid expensive renders (#4439)
* feat: Cache status height to avoid expensive renders * feat: Escape content and emojify in reducers * fix(css): Remove backface-visibility: hidden from .scrollable * fix(statuses): Avoid creating DOMParses inside a loop
This commit is contained in:
parent
5942347407
commit
8eb6d171e6
15 changed files with 83 additions and 57 deletions
|
@ -9,19 +9,9 @@ describe('<DisplayName />', () => {
|
|||
const account = fromJS({
|
||||
username: 'bar',
|
||||
acct: 'bar@baz',
|
||||
display_name: 'Foo',
|
||||
display_name_html: '<p>Foo</p>',
|
||||
});
|
||||
const wrapper = render(<DisplayName account={account} />);
|
||||
expect(wrapper).to.have.text('Foo @bar@baz');
|
||||
});
|
||||
|
||||
it('renders the username + account name if display name is empty', () => {
|
||||
const account = fromJS({
|
||||
username: 'bar',
|
||||
acct: 'bar@baz',
|
||||
display_name: '',
|
||||
});
|
||||
const wrapper = render(<DisplayName account={account} />);
|
||||
expect(wrapper).to.have.text('bar @bar@baz');
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue