helpscout / hsds-react

Help Scout Design System (HSDS) — React Component Library
MIT License
86 stars 17 forks source link

BEMBED-338: Performance improvements for beacon #1048

Closed jakubjanczyk closed 2 years ago

jakubjanczyk commented 2 years ago

Problem/Feature

This PR contains any changes that are necessary to improve on performance/bundle size for Beacon. Full list TBD

Write to your heart's content, include:

Guidelines

Make sure the pull request:

jakubjanczyk commented 2 years ago

@Charca I am thinking if at this stage there is anything else we need to change in hsds-react? The only thing I thought about was to extract makeBrandColors to its own file, because we use it in critical path and the file that contains it adds around 3-5 kB of unused code (including lodash.get dependency). However, maybe at this point we are good enough with what we have and there is no point in complicating the code (and we will have this problem sorted out when hsds would be fully tree shakeable in the future :smile: :crossed_fingers:)

Charca commented 2 years ago

@jakubjanczyk yep this looks good to me, I'm not planning to make any other changes for now!

jakubjanczyk commented 2 years ago

@tinkertrain If I could please get your eyes on this one before I make a final release :)