Financial-Times / o-tracking

Origami Tracking component
http://registry.origami.ft.com/components/o-tracking
6 stars 8 forks source link

Refactor: rename whitelistProps to filterProperties and replace reduce with a for-of loop #261

Closed JakeChampion closed 4 years ago

JakeChampion commented 4 years ago

Rename variables and function to be more descriptive.

Replace reduce function which generates an object via Object.assign with a for-of loop.

origamiserviceuser commented 4 years ago

o-tracking bundle size difference from 2.0.10 to 11e0bd2afdd1179fde1e65b06425ec841c2ab3d7 No significant bundle size differences found.

JakeChampion commented 4 years ago

Good spot @notlee!

I'm happy to make this breaking change, o-tracking is a leaf component which is used directly in applications and not other components, it should not be hard to push out new majors for.

notlee commented 4 years ago

@JakeChampion yeah I think to move forward with o-tracking we'll need to be comfortable making breaking changes. This seems quite small, do you think its worth batching with other quick win major changes?

JakeChampion commented 4 years ago

@JakeChampion yeah I think to move forward with o-tracking we'll need to be comfortable making breaking changes. This seems quite small, do you think its worth batching with other quick win major changes?

Yep, I'll not be merging this yet, will likely make a v3 branch which this work goes into.

JakeChampion commented 4 years ago

@notlee I've change the base branch this is merging into from master to v3 👍

origamiserviceuser commented 4 years ago

o-tracking bundle size difference from 2.0.10 to 7e1f789126ecf5348a1e2c6e597c0a66d47dccb7 No significant bundle size differences found.

origamiserviceuser commented 4 years ago

o-tracking bundle size difference from 2.0.10 to b8da4498cb6fbaeee20c1f7e682f212831a45c9b No significant bundle size differences found.

origamiserviceuser commented 4 years ago

o-tracking bundle size difference from 2.0.10 to 716213539f01b6b8fd98dda47570136fc749ae77 No significant bundle size differences found.