-
Notifications
You must be signed in to change notification settings - Fork 394
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
refactor(desk-tool): up TS coverage; introduce pane types #2853
Conversation
This pull request is being automatically deployed with Vercel (learn more). perf-studio – ./🔍 Inspect: https://vercel.com/sanity-io/perf-studio/AzjnuDTAJ1nChKAR7km44hwHqXZi test-studio – ./🔍 Inspect: https://vercel.com/sanity-io/test-studio/EnLeABUfrbtjXbDEpLQyHaf1CRt9 studio-workshop – ./dev/workshop🔍 Inspect: https://vercel.com/sanity-io/studio-workshop/4cKRFqhUVZL3RsC4q8YifePvBSJd |
e4d8ef0
to
2d7a12b
Compare
I think the best is to keep these within Another thought I had when reading these changes, was that I think the |
2d7a12b
to
1910764
Compare
1910764
to
cf9b62b
Compare
cf9b62b
to
fd77ed0
Compare
fd77ed0
to
1863075
Compare
@@ -45,7 +45,7 @@ | |||
"@sanity/uuid": "^3.0.1", | |||
"hashlru": "^2.1.0", | |||
"is-hotkey": "^0.1.6", | |||
"leven": "^2.1.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.
note: https://github.com/sindresorhus/leven/releases/tag/v3.0.0 (needed for types)
@@ -61,7 +61,7 @@ | |||
"inquirer": "^6.0.0", | |||
"is-installed-globally": "^0.1.0", | |||
"klaw-sync": "^4.0.0", | |||
"leven": "^2.1.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.
note: https://github.com/sindresorhus/leven/releases/tag/v3.0.0 (needed for types)
@@ -33,7 +33,7 @@ | |||
"@sanity/generate-help-url": "2.18.0", | |||
"arrify": "^1.0.1", | |||
"humanize-list": "^1.0.1", | |||
"leven": "^2.1.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.
note: https://github.com/sindresorhus/leven/releases/tag/v3.0.0 (needed for types)
1863075
to
11c0e0e
Compare
34a66af
to
04c7c54
Compare
04c7c54
to
051a34a
Compare
051a34a
to
093aa12
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.
LGTM! 👏🏼
093aa12
to
b4ecd6c
Compare
Description
The following PR:
lib
folders — kind of a small change but we have ignore files at the top-level of the monorepo that target**/lib
. I think by convention we shouldn't uselib
folder insrc
(similar to how we shouldn't usedist
folders inside ofsrc
).Hoists the desk-tool types toThis was moved to@sanity/types
— The idea behind this move was to make the types for these pane items more accessible and enforceable. The end result is much more descriptive types internally to the desk-tool which should also make it more portable for the future. Eventually these types should be enforced inside of@sanity/structure
but that can come at a later time (I did try and it seems too difficult to combine due to many slight type nuances)./src/desk-tool/types
insteadDeletesThese types were kept and base was not touched@sanity/base/__legacy/@sanity/components/menu/types
— after carefully looking theMenuItem
type, I came to the conclusion the type is a desk-tool-only concept and renamed itPaneMenuItem
andPaneMenuItemGroup
. These types now live in@sanity/types/src/desk-tool
and gets us really close to removing the@sanity/base/__legacy/@sanity/components
folder 😄 .resolvePanes
and more — and also removes the stubStructurePane
typenoImplicitAny
from the tsconfig 🎉TODO:
desk-tool
PaneX
s toPaneXNode
etcWhat to review
Review #2852 before this one.✅Most of the changes are renames and adding types so the review should go quicker than what it seems. Review the new types, the names, and their usage. There was no intention on changing any logic in this one so keep an eye out of anything divergent.