Make setting `axis` or `legend` = `null` as the default way to disable them. by kanitw · Pull Request #1384 · vega/vega-lite · GitHub
Skip to content

Make setting axis or legend = null as the default way to disable them. - #1384

Merged
domoritz merged 11 commits into
masterfrom
kw/axis-legend-null
Oct 19, 2016
Merged

domoritz merged 11 commits into
masterfrom
kw/axis-legend-null

Conversation

@kanitw

@kanitw kanitw commented May 22, 2016 •

Copy link
Copy Markdown
Member

Remove the support for axis: false and just support axis: null and simplify the schema
as briefly discussed in #1377.

@kanitw kanitw added Blocked 🕐 For issues that are blocked by other issues and removed #-Ready for Review labels May 22, 2016
@kanitw

kanitw commented May 22, 2016 •

Copy link
Copy Markdown
Member Author

@domoritz

domoritz commented May 22, 2016 •

Copy link
Copy Markdown
Member

I read the error message differently. I think we just have to add null as an option (null seems to be a type like number or object).

@domoritz

domoritz commented May 22, 2016 •

Copy link
Copy Markdown
Member

@domoritz domoritz removed the Blocked 🕐 For issues that are blocked by other issues label May 22, 2016
@domoritz

domoritz commented May 22, 2016 •

Copy link
Copy Markdown
Member

Okay, issue is that there is no null type in typescript and we are blocked on YousefED/typescript-json-schema#36 but nullable types are coming to ts soon (already merged) microsoft/TypeScript#7140

@kanitw
kanitw force-pushed the kw/axis-legend-null branch from 0b68dae to 7e7ad77 Compare October 3, 2016 03:21
@kanitw kanitw removed the Blocked 🕐 For issues that are blocked by other issues label Oct 3, 2016
kanitw added 2 commits October 3, 2016 10:44
Haven't tested since I don't have TS 2.0 locally yet!
@domoritz
domoritz merged commit 0aeaa8e into master Oct 19, 2016
@domoritz
domoritz deleted the kw/axis-legend-null branch October 19, 2016 23:36
@aishfenton

Copy link
Copy Markdown
Contributor

How will nullable be expressed in the scheme? In wrapper languages we'll need to handle this case explicitly (since not all types can be null, so will need to do something funky).

Json schema has "required" but that really means undefinable, and is already being used for that purpose.

And in general in JavaScript is it ok to have null != undefined? I don't know since I'm not a JS guy, but in typed languages there's really no equivalent to this, so having them mean something different will be tricky to support (for example in the Json parser I'm using it assume they're equivalent).

@domoritz

Copy link
Copy Markdown
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants