Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(Vanilla Extract): as a future replacement of jss #561

Merged
merged 54 commits into from
Nov 8, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
f841a5e
playroom and storybook working
atabel Oct 20, 2022
f75a192
build
atabel Oct 25, 2022
0a3b84c
Merge branch 'master' into atoledano-vanilla
atabel Oct 25, 2022
0823022
removed unused imports
atabel Oct 25, 2022
1ab5c3e
ssr tests
atabel Oct 25, 2022
36754f6
fix playroom build
atabel Oct 25, 2022
9302619
autoprefixer
atabel Oct 25, 2022
68e3282
comment
atabel Oct 25, 2022
dd14992
added postcss plugin for automatic box-sizing border-box
atabel Oct 25, 2022
f630d09
make postcss work in storybook
atabel Oct 26, 2022
18ff594
fix ts
atabel Oct 26, 2022
e6e8d15
fix vercel deploy
atabel Oct 26, 2022
5cd60b9
update swc
atabel Oct 26, 2022
e28b19f
fix test
atabel Oct 26, 2022
b703449
fix ssr tests
atabel Oct 26, 2022
ac1ad82
fix eslint rule
atabel Oct 27, 2022
8b57721
migrate Box
atabel Oct 27, 2022
bf0df66
revert box
atabel Oct 27, 2022
813a9f5
add lib overhead gzip to stats
atabel Oct 27, 2022
3f6bf11
remove unused eslint directive
atabel Oct 27, 2022
4959f58
setup ssr tests to work with vanilla extract
atabel Oct 28, 2022
3696296
move yarn ci to gh workflow
atabel Oct 28, 2022
97870fa
move ts check after build
atabel Oct 28, 2022
0c561d1
dont render theme styles in unit tests
atabel Oct 31, 2022
60e034a
add comment in storybook config
atabel Oct 31, 2022
e364e14
flex 1
atabel Oct 31, 2022
22c8f14
typo
atabel Oct 31, 2022
b42cb36
mediaqueries and migrated snackbar
atabel Oct 31, 2022
61df2f6
fix preview tools
atabel Oct 31, 2022
37a9cb6
flow types
atabel Oct 31, 2022
505b7ab
Fix dimensions config logic
atabel Nov 2, 2022
ce58c96
fix playroom theme config
atabel Nov 2, 2022
eaac9cf
flow defs
atabel Nov 2, 2022
b5afb04
deprecate theme.mediaQueries
atabel Nov 2, 2022
9100938
deprecate mediaqueries config
atabel Nov 2, 2022
2d91fd1
remove background from sprinkles
atabel Nov 2, 2022
242586a
flow defs
atabel Nov 2, 2022
af44f26
make 3 playroom builds to be able to force mobile/desktop
atabel Nov 2, 2022
443f28c
fix ts
atabel Nov 2, 2022
17e8571
embed VE sytles into js
atabel Nov 2, 2022
24b5c75
Merge branch 'master' into atoledano-vanilla
atabel Nov 2, 2022
0e9df6f
deprecate jss
atabel Nov 2, 2022
4afd417
fix tests
atabel Nov 2, 2022
a95d1d2
Merge branch 'master' into atoledano-vanilla
atabel Nov 3, 2022
ab8e52b
comment vercel builds
atabel Nov 3, 2022
690f2ca
make forceMobile and forceDesktop work in PreviewTools
atabel Nov 3, 2022
ce6ced7
handle false in forceMobile/forceDesktop
atabel Nov 3, 2022
b44bab2
Merge branch 'master' into atoledano-vanilla
atabel Nov 3, 2022
941ed0e
handle false in forceMobile/forceDesktop
atabel Nov 3, 2022
9bb76ba
grammar
atabel Nov 3, 2022
b85347c
Merge branch 'master' into atoledano-vanilla
atabel Nov 4, 2022
039381b
support consummer apps to use VE too
atabel Nov 7, 2022
097ee7b
change .vanilla.css to .mistica-vanilla.css
atabel Nov 7, 2022
1185096
Merge branch 'master' into atoledano-vanilla
atabel Nov 8, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions flow-defs/index.js.flow
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// @flow

declare export { createUseStyles, getJss, ServerSideStyles } from "./jss";
declare export { vars as skinVars } from "./skins/skin-contract.css";
declare export { default as ThemeContext } from "./theme-context";
declare export { default as ThemeContextProvider } from "./theme-context-provider";
declare export { default as ScreenReaderOnly } from "./screen-reader-only";
Expand Down
1 change: 1 addition & 0 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export {
ServerSideStyles,
} from './jss';

export {vars as skinVars} from './skins/skin-contract.css';
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Export vars (skin colors) to be usable by apps using Vanilla Extract

export {default as ThemeContext} from './theme-context';
export {default as ThemeContextProvider} from './theme-context-provider';
export {default as ScreenReaderOnly} from './screen-reader-only';
Expand Down
9 changes: 8 additions & 1 deletion vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,14 @@ import {vanillaExtractPlugin} from '@vanilla-extract/vite-plugin';
import noBundlePlugin from 'vite-plugin-no-bundle';

export default defineConfig({
plugins: [react(), vanillaExtractPlugin(), noBundlePlugin()],
plugins: [
react(),
vanillaExtractPlugin(),
noBundlePlugin({
// Change .css.js files to something else so that they don't get re-processed by consumer apps using vanilla extract too
Copy link
Contributor

Choose a reason for hiding this comment

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

this is because VE process all files ended in css? ir is because of vite?

fileNames: ({name}) => `${name.replace(/\.css$/, '.css.vanilla')}.js`,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Vanilla Extract Next plugin applies to node_modules too, so it tries to re-process mistica files (which are already compiled by mistica build) and result in errors. With this change, we make those files invisible for the Next plugin in apps using mistica and VE (zeus, for example).

Copy link
Member

Choose a reason for hiding this comment

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

perhaps a better name would be .css.mistica

}),
],
publicDir: false,
build: {
lib: {
Expand Down