Conversation
The args of a Cell are the args of a function, so a column that carries them is not a column that carries none. Code that only reads a column — a column menu, an export, a reordering helper — had to name those args and then ignore them, in every signature it has. These two say "any args" instead, and carry the row type and the column meta such code does read. Cowritten by Claude
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
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.
On top of universal-ember#202 (60dafd9). An alternative to the
CellArgs = anydefault in that commit, and to #4.60dafd9 makes
CellArgsdefault toanyso that a column whose Cell asks for args fits aColumn<DataType>parameter — which the plugin helpers need. It also makes the Cell of every column written by hand unchecked:So
<column.Cell />with no args, or with args no Cell takes, now passes at any site that writesColumn<T>by hand.The two readings of
Column<Person>cannot both hold: "a column I will render", which needs the Cell checked, and "a column I only read", which needs any column to fit. This gives the second one its own name.AnyColumnandAnyTableare what the plugin helpers,meta.forColumn, the header modifier and the resize handle take.CellArgsgoes back tounknown, soColumn<Person>is checked again.takesAnyColumnandtakesAnyTableincell-args.test.tssayAnyColumn/AnyTable, and still pass.88 lines of source across 11 files, against 250 in #4, which threaded the four parameters through every plugin signature instead. #4 can be closed either way.
Checked: the package, its type tests and
test-appare clean. Our app — 13 tables, about 300 call sites — type checks and lints clean on this plus #6.Cowritten by Claude