-
Notifications
You must be signed in to change notification settings - Fork 13
Shared cells #2121
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
Merged
Merged
Shared cells #2121
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Now this change causes the expected type error due to incompatibility with the actual types of diff --git a/app/table/columns/common.tsx b/app/table/columns/common.tsx
index cf885cdf..08160209 100644
--- a/app/table/columns/common.tsx
+++ b/app/table/columns/common.tsx
@@ -23,7 +23,7 @@ export const Columns = {
cell: (info: Info<string>) => <Truncate text={info.getValue()} maxLength={48} />,
},
size: {
- cell: (info: Info<number>) => <SizeCell value={info.getValue()} />,
+ cell: (info: Info<string>) => info.getValue(),
},
timeCreated: { |
13c3516
to
adf3da1
Compare
charliepark
approved these changes
Apr 3, 2024
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.
Aw yeah
david-crespo
added a commit
to oxidecomputer/omicron
that referenced
this pull request
Apr 3, 2024
oxidecomputer/console@156c082...b22ca1d * [b22ca1dc](oxidecomputer/console@b22ca1dc) add loop comment to scp-assets * [99173b92](oxidecomputer/console@99173b92) bump omicron script: automatically run gh run watch when assets aren't ready * [2cfc8ee7](oxidecomputer/console@2cfc8ee7) oxidecomputer/console#2076 * [11411bb8](oxidecomputer/console@11411bb8) oxidecomputer/console#2121 * [1f8b25d7](oxidecomputer/console@1f8b25d7) oxidecomputer/console#2119 * [95f2e49e](oxidecomputer/console@95f2e49e) oxidecomputer/console#2108 * [8e3a2005](oxidecomputer/console@8e3a2005) oxidecomputer/console#2116 * [bf592a31](oxidecomputer/console@bf592a31) oxidecomputer/console#2105 * [b63c81ea](oxidecomputer/console@b63c81ea) oxidecomputer/console#2115 * [d5d70bd7](oxidecomputer/console@d5d70bd7) oxidecomputer/console#2113 * [1954709e](oxidecomputer/console@1954709e) oxidecomputer/console#2112 * [4db8d830](oxidecomputer/console@4db8d830) oxidecomputer/console#2111 * [9485ca23](oxidecomputer/console@9485ca23) Revert "Revert "Change all uses of RHF `<Controller>` to `useController` (oxidecomputer/console#2102)""
david-crespo
added a commit
to oxidecomputer/omicron
that referenced
this pull request
Apr 3, 2024
oxidecomputer/console@156c082...b22ca1d * [b22ca1dc](oxidecomputer/console@b22ca1dc) add loop comment to scp-assets * [99173b92](oxidecomputer/console@99173b92) bump omicron script: automatically run gh run watch when assets aren't ready * [2cfc8ee7](oxidecomputer/console@2cfc8ee7) oxidecomputer/console#2076 * [11411bb8](oxidecomputer/console@11411bb8) oxidecomputer/console#2121 * [1f8b25d7](oxidecomputer/console@1f8b25d7) oxidecomputer/console#2119 * [95f2e49e](oxidecomputer/console@95f2e49e) oxidecomputer/console#2108 * [8e3a2005](oxidecomputer/console@8e3a2005) oxidecomputer/console#2116 * [bf592a31](oxidecomputer/console@bf592a31) oxidecomputer/console#2105 * [b63c81ea](oxidecomputer/console@b63c81ea) oxidecomputer/console#2115 * [d5d70bd7](oxidecomputer/console@d5d70bd7) oxidecomputer/console#2113 * [1954709e](oxidecomputer/console@1954709e) oxidecomputer/console#2112 * [4db8d830](oxidecomputer/console@4db8d830) oxidecomputer/console#2111 * [9485ca23](oxidecomputer/console@9485ca23) Revert "Revert "Change all uses of RHF `<Controller>` to `useController` (oxidecomputer/console#2102)""
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We don't save a ton of lines here, but we do get more consistency and correctness. One major difference is we are now using
TruncateCell
on every description column, whereas before we were using it in only one or two spots.Closes #1608
Looking over all the accessor calls, I don't see any more candidates for extraction.
rg 'accessor\('
resultsI tried the first commit here and got excited because it typechecks, but then I noticed that it is way too lenient. Neither of the two line changes below causes a type error, which is garbage.
So instead I am updating this PR to share only the cell part, and we still still have to use
colHelper.accessor
at each column definition.