Conversation
Add UISchema for all value-customizable channels
Similarly, bars got changed to points too: And line got changed to area: In addition to fixing these, perhaps, it's worth trying more different combination of theses.
|
kanitw
left a comment
There was a problem hiding this comment.
Looks like you import node_modules in many places. Consider 1) use Typescript Importer if you haven't
2) check the project config if there is something causing this wrong imports.
| /> | ||
| </div> | ||
| <div ref={this.popupRefHandler}> | ||
| { (!fieldDef && !valueDef) || isValueDef(valueDef) ? |
There was a problem hiding this comment.
Why not just !fieldDef instead of (!fieldDef && !valueDef) || isValueDef(valueDef) ?
There was a problem hiding this comment.
Fixed! The issue was here: https://github.com/vega/voyager/blob/master/src/components/encoding-pane/index.tsx#L117
I fixed this by adding appropriate typeguarding and the basic !fieldDef logic can now work correctly
| import {ConnectDropTarget, DropTarget, DropTargetCollector, DropTargetSpec} from 'react-dnd'; | ||
| import * as TetherComponent from 'react-tether'; | ||
| import {contains} from 'vega-lite/build/src/util'; | ||
| import {isValueDef} from '../../../node_modules/vega-lite/build/src/fielddef'; |
There was a problem hiding this comment.
Remove ../../../node_modules/. Please also check if you have accidentally included node_modules like this in other places too. :)
| targetAttachment="bottom left" | ||
| > | ||
| {(fieldDef && !isWildcardChannelId(id) && contains(CUSTOMIZABLE_ENCODING_CHANNELS, id.channel)) ? | ||
| {(!isWildcardChannelId(id) && contains(CUSTOMIZABLE_ENCODING_CHANNELS, id.channel)) ? |
There was a problem hiding this comment.
Since we don't allow customizing x and y valuedef, caret shouldn't be shown for x and y if there is no fieldDef.
| } | ||
|
|
||
| protected changeValue(result: any) { | ||
| const value = result.formData[Object.keys(result.formData)[0]].toString(); |
There was a problem hiding this comment.
why toString(). Isn't size not a string, for example?
src/queries/alternative-encodings.ts
Outdated
|
|
||
| import {Query} from 'compassql/build/src/query/query'; | ||
| import {isWildcard, SHORT_WILDCARD} from 'compassql/build/src/wildcard'; | ||
| import {isValueQuery} from '../../node_modules/compassql/build/src/query/encoding'; |
51f1e85 to
6875adc
Compare
Remove ../node_modules prefix asdf
6875adc to
5da835b
Compare




UI for customization of constant values (valuedef). Addresses issue #662.