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
[Design System] - New Package #5467
Conversation
✅ Deploy Preview for dev-web-novu ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for novu-design ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
f3776e9
to
714bde9
Compare
@@ -10,7 +10,7 @@ | |||
"forceConsistentCasingInFileNames": true, | |||
"noFallthroughCasesInSwitch": true, | |||
"module": "esnext", | |||
"moduleResolution": "node", | |||
"moduleResolution": "Node16", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🗒 note (non-blocking): This was necessary to enable using the "new" exports
field in package.json
(in novui/package.json
). This permits imports like @novu/novui/css
which actually points to ./styled-system/css
instead of dist
@@ -1,7 +1,7 @@ | |||
import { MembersTable } from './MembersTable'; | |||
import { TestWrapper } from '../../../testing'; | |||
import { MemberRoleEnum, MemberStatusEnum } from '@novu/shared'; | |||
import { SinonSpy } from 'cypress/types/sinon'; | |||
import { SinonSpy } from 'sinon'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🗒 note (non-blocking): This broke when changing module resolution in tsconfig -- also just not ideal anyway
@@ -1,7 +1,7 @@ | |||
import { FC, PropsWithChildren, useState } from 'react'; | |||
import { NavLink } from 'react-router-dom'; | |||
import { css } from '../../../styled-system/css'; | |||
import { HStack } from '../../../styled-system/jsx'; | |||
import { css } from '@novu/novui/css'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🗒 note (non-blocking): Example imports using the new DS
".": { | ||
"source": "./src/index.ts", | ||
"types": "./dist/index.d.ts", | ||
"import": "./dist/index.js" | ||
}, | ||
"./css": { | ||
"types": "./styled-system/css/index.d.ts", | ||
"require": "./styled-system/css/index.js", | ||
"import": "./styled-system/css/index.js" | ||
}, | ||
"./tokens": { | ||
"types": "./styled-system/tokens/index.d.ts", | ||
"require": "./styled-system/tokens/index.js", | ||
"import": "./styled-system/tokens/index.js" | ||
}, | ||
"./types": { | ||
"types": "./styled-system/types/index.d.ts", | ||
"require": "./styled-system/types/index.js", | ||
"import": "./styled-system/types/index.js" | ||
}, | ||
"./patterns": { | ||
"types": "./styled-system/patterns/index.d.ts", | ||
"require": "./styled-system/patterns/index.js", | ||
"import": "./styled-system/patterns/index.js" | ||
}, | ||
"./recipes": { | ||
"types": "./styled-system/recipes/index.d.ts", | ||
"require": "./styled-system/recipes/index.js", | ||
"import": "./styled-system/recipes/index.js" | ||
}, | ||
"./jsx": { | ||
"types": "./styled-system/jsx/index.d.ts", | ||
"require": "./styled-system/jsx/index.js", | ||
"import": "./styled-system/jsx/index.js" | ||
}, | ||
"./styles.css": "./styled-system/styles.css" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🗒 note (non-blocking): Enables better imports for package consumers. Requires moduleResolution: >= Node16
in the consumer
import { Test } from '@novu/novui'; | ||
import { css } from '@novu/novui/css'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🗒 note (non-blocking): Example of new imports!
<NoDataSubHeading className={css({ color: 'legacy.success !important' })}> | ||
Start from a blank workflow or use a template | ||
</NoDataSubHeading> | ||
<Test /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🗒 note (non-blocking): We will remove this before merging! This is just to validate that everything is working across the two
…5546) * fix: Import aliases * refactor: Point styled-system imports to ds
* refactor: Setup storybook & vitest
…nt audit (#5592) * refactor: Remove panda * refactor: Move audit to new package * refactor: Move scripts and config * refactor: Move ComponentAuditTable * fix: Component audit
What changed? Why was the change needed?
novui
(Novu + UI) is not final and can be replaced. It was used to be clearly different than the existing package so as not to confuse the twoSolves NV-3691 and NV-3693
Notes
web
imports to point to new Panda #5546) to avoid 40+ files of only import changestsup
:( I repeatedly got issues withReact is not defined
when importing theTest
component inweb
, so went back to plain ol'tsconfig
Screenshots
This incredible UI showcases a component built in the new DS package next to a component with styles overwritten in
web
using the generated panda code imported from the new package -- all using tokens for colorsFuture iterations
web
-- currently this causes a lot of errors for tokens that shouldn't seemingly be excluded from strict