Skip to content

Conversation

@siddharthkp
Copy link
Member

@siddharthkp siddharthkp commented Oct 11, 2022

@changeset-bot
Copy link

changeset-bot bot commented Oct 11, 2022

⚠️ No Changeset found

Latest commit: cc57ad0

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@siddharthkp siddharthkp changed the title See diff for #2419 (don't merge) See diff for #2419 Oct 11, 2022
import React from 'react';
import Box from '../Box.js';
import '../sx.js';
import '@styled-system/css';
Copy link
Member Author

@siddharthkp siddharthkp Oct 11, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this feels like a strange replacement?

also looks like import '../sx.js' was imported without any import specifiers until now, strange?

@github-actions
Copy link
Contributor

github-actions bot commented Oct 11, 2022

size-limit report 📦

Path Size
dist/browser.esm.js 77.59 KB (0%)
dist/browser.umd.js 78.26 KB (0%)

var Avatar$1 = Avatar;

export { Avatar$1 as default };
export { Avatar as default };
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there's a bunch of removed $1 which honestly i like that

lib/index.js Outdated
exports.themeGet = constants.get;
exports.BaseStyles = BaseStyles;
exports.ThemeProvider = ThemeProvider["default"];
exports.ThemeProvider = ThemeProvider.ThemeProvider;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as long as these 2 are the same, all good!

@@ -0,0 +1,15 @@
'use strict';
Copy link
Member Author

@siddharthkp siddharthkp Oct 11, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice, this is the file we want to ship

const TYPOGRAPHY = compose(styledSystem__namespace.typography, whiteSpace);
// Border props
compose(styledSystem__namespace.border, styledSystem__namespace.shadow);
const BORDER = compose(styledSystem__namespace.border, styledSystem__namespace.shadow);
Copy link
Member Author

@siddharthkp siddharthkp Oct 11, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this output is wild? compose used to called without assigning to anything, that's strange?!

i guess this is a bugfix 😅

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think what happens when BORDER is removed is that it considers compose and if it is pure. Looking at styled-system, it doesn't have sideEffects listed so it can't assume compose is pure and has to leave it in case of side-effects.

@siddharthkp siddharthkp temporarily deployed to github-pages October 11, 2022 14:07 Inactive
const LAYOUT = styledSystem.layout;

export { COMMON, TYPOGRAPHY, get };
export { BORDER, COMMON, LAYOUT, TYPOGRAPHY, get };
Copy link
Member Author

@siddharthkp siddharthkp Oct 11, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it looks like border and layout were not exported till now? is it because they were tree shaken?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think so, it seemed like they aren't re-exported through src/index.ts and were removed based on usage in the codebase

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yay it's fixed!

@@ -0,0 +1,13 @@
// JSDOM doesn't mock ResizeObserver
Copy link
Member Author

@siddharthkp siddharthkp Oct 11, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice, this is the file we want to ship (lib-esm edition)

@siddharthkp siddharthkp self-assigned this Oct 11, 2022
@siddharthkp siddharthkp added the skip changeset This change does not need a changelog label Oct 11, 2022
@@ -0,0 +1,12 @@
export { useOnOutsideClick } from './useOnOutsideClick.js';
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a big win! love it

@siddharthkp siddharthkp temporarily deployed to github-pages October 11, 2022 16:22 Inactive
@siddharthkp
Copy link
Member Author

job done, let's ship

@joshblack joshblack deleted the tmp-diff-2419 branch January 19, 2023 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip changeset This change does not need a changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants