-
Notifications
You must be signed in to change notification settings - Fork 25
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: immutable records according to designs (wip) #984
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
4 Ignored Deployments
|
🦋 Changeset detectedLatest commit: 471aea9 The changes in this PR will be included in the next version bump. This PR includes changesets to release 0 packagesWhen changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
339b862
to
0813aac
Compare
))} | ||
</div> | ||
</main> | ||
<div className={yearsSidebar}> |
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.
een
tag?}, | ||
]); | ||
|
||
export const main = style([ | ||
sprinkles({ | ||
margin: '$4', |
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.
hm..als je overal gewoon 'px' gebruikt. zou ik dat bij deze denk ik ook doen.
je zit zover van de react-ui af, dan zou ik het eigenlijk helemaal niet gebruiken.
anders veranderd opeens deze variabele en klopt er niets van je design.
ik zou wel aan vanilla extract vasthouden, want dat gebruiken we nu overal
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.
isa heeft een npm package '@kadena/fonts' ofzo. daar kun je de kodemono mee gebruiken in css.
het zit ook al in react-ui (font-family: 'mono')
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.
I checked out trying to use @kadena/fonts
together with Isa, but it does not work well with next.js appdir. It is not able to load the font until javascript is executed causing it to pop-in after pageload. Using nextjs's font helper gives the best performance, but it was not compatible with the @kadena/fonts
package.
a6fbd29
to
1cf31df
Compare
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.
Small-ish PRs are great, but maybe still give a short description what is included?
'@typescript-eslint/strict-boolean-expressions': 'off', | ||
// TODO: eslint in vscode does not understand tsconfig paths and gives errors | ||
// even though in the build it works fine | ||
'import/no-unresolved': 'off', |
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.
Looks like a good opportunity to have something of a shared app
ESLint config, or extend the existing next
config.
Those profiles are here: https://github.com/kadena-community/kadena.js/tree/main/packages/tools/eslint-config/profile
This specific import/no-unresolved
should not need to be disabled, this works well in the other packages too?
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.
But I'm already extending next
via @kadena-dev/eslint-config/profile/next
right?
Also next
extends react
and react
extends lib
, so when I use next
I automatically opt-in to all the lib
rules too
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.
Also about the import/no-unresolved
I think it's specifically the eslint extension in vscode that is missing how to read some configuration, I'm assuming because it's a monorepo and it by default tries to read configs in the root? When I open packages/apps/immutable-records
as a new workspace it has no issues.
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.
But I'm already extending
next
via@kadena-dev/eslint-config/profile/next
right? Alsonext
extendsreact
andreact
extendslib
, so when I usenext
I automatically opt-in to all thelib
rules too
True. Multiple packages are doing something similar, so perhaps we could share more rules, e.g. some kind of shared next or app ruleset.
Also about the
import/no-unresolved
I think it's specifically the eslint extension in nextjs that is missing how to read some configuration, I'm assuming because it's a monorepo and it by default tries to read configs in the root? When I openpackages/apps/immutable-records
as a new workspace it has no issues.
Not sure what causes the issue, but import/no-unresolved
is an important rule. It does not only resolve your local imports, but also external ones. I think it might catch issues that would not fail the build, only to surface at runtime.
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.
By the way, it would be fine to create a new ticket to look into all of this later. But either should be fixed here or handled properly.
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.
Found the solution, you have to configure "eslint.workingDirectories": ["./packages/apps/immutable-records"]
in ./vscode/settings.json
Where I just have this app now, but ideally any directory that has a .eslintrc.*
is added, really don't know why they don't just resolve these configs automatically but okay, this does work.
@@ -3,6 +3,7 @@ | |||
"compilerOptions": { | |||
"rootDir": "./", | |||
"types": ["node", "@types/gtag.js"], | |||
"lib": ["ES2022", "DOM"], |
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.
See comment about shared profiles for ESLint.
fd22765
to
471aea9
Compare
@@ -39,6 +47,8 @@ | |||
"@vanilla-extract/next-plugin": "2.3.1", | |||
"eslint": "^8.45.0", | |||
"eslint-config-next": "13.4.5", | |||
"lokijs": "^1.5.12", |
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.
What is this dependency being used for?
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.
lokijs
and pino-pretty
were both required by @walletconnect/modal
and @walletconnect/sign-client
, it gives build errors when I did not add these, seems like a bug on their side. It's dev-dependencies anyway, I don't think its a big deal right now.
@@ -39,6 +47,8 @@ | |||
"@vanilla-extract/next-plugin": "2.3.1", | |||
"eslint": "^8.45.0", | |||
"eslint-config-next": "13.4.5", | |||
"lokijs": "^1.5.12", | |||
"pino-pretty": "^10.2.0", |
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.
What is this dependency being used for?
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.
see comment on lokijs
, these two have the same reason.
open, | ||
onClose, | ||
}) => { | ||
useEventListener('keydown', (e) => { |
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.
Do we really need another dependency to use addEventListener
?
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.
usehooks-ts
provides many useful utilities for react apps at a 4kb gziped size. I don't think there should be much reason to have to justify a package of that size if it makes us have to write and maintain less code.
This pull request adds work in progress on immutable records app. I want to make this PR now to avoid it becoming even larger.
The app was already set up as a nextjs project, this PR adds