-
Notifications
You must be signed in to change notification settings - Fork 627
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: implement repeat as a normalization to reduce number of models #6002
Conversation
9329da1
to
252a71b
Compare
252a71b
to
449e1af
Compare
10cb260
to
5899f3e
Compare
Rebased to master. Looking pretty good now. |
d41eb83
to
17c1e81
Compare
ac36746
to
9e5370d
Compare
a84080e
to
a0233ad
Compare
Let's rebase after #6026 is merged. |
TODO:
|
I think you just caused even more renames lol |
IDK, because I haven't looked at them -- too many. |
a31f229
to
655f1fd
Compare
I looked through the generated SVGs and this looks good to me. Anything left @kanitw? |
@@ -183,6 +182,7 @@ | |||
], | |||
"signals": [ | |||
{"name": "childWidth", "value": 200}, | |||
{"name": "childHeight", "value": 200}, |
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.
Why does this become childHeight? Similar to many other specs. This is repeat-column, which means the height can be reasonably shared.
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 you see an issue in the normalized (concat) spec? The height here is just the default, no?
It'd be great to look at generated Vega too. Just added one comment after looking at a few Vega specs. |
@@ -34,12 +34,6 @@ const scaleBindings: TransformCompiler = { | |||
const extent = {selection: selCmpt.name, field: proj.field}; | |||
scale.set('selectionExtent', extent, true); | |||
bound.push(proj); | |||
|
|||
// Bind both x/y for diag plot of repeated views. | |||
if (model.repeater && model.repeater.row === model.repeater.column) { |
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.
this seems problematic?
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.
This is #6000, right?
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.
Perhaps, but what's the effect of removing these lines?
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.
Let's try: #6124
882323d
to
bcf9b8b
Compare
844711f
to
6d4721d
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.
I'm glad to try to isolate massive diff so we can detect this small thing
3b70a14
to
c47962e
Compare
return { | ||
...spec, | ||
spec: this.map(spec.spec, params) | ||
data: data ?? childSpec.data, // data from child spec should have precedence |
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.
The code here doesn't really give precedence to child spec?
'child' + | ||
(repeatValue ? `__repeat_repeat_${varName(repeatValue)}` : '') + | ||
(rowValue ? `__repeat_row_${varName(rowValue)}` : '') + | ||
(columnValue ? `__repeat_column_${varName(columnValue)}` : ''); |
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.
The naming logic here seems wrong for nested repeat?
Existing repeatValue should be treated as prefix to the name, not inserted in the middle.
Fixes #4947
This also fixes the layer type, which incorrectly extended generic layer spec.