-
Notifications
You must be signed in to change notification settings - Fork 178
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
WIP -- Value Def Customization UI #827
base: master
Are you sure you want to change the base?
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.
|
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not just !fieldDef
instead of (!fieldDef && !valueDef) || isValueDef(valueDef)
?
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.
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
@@ -5,6 +5,7 @@ import * as CSSModules from 'react-css-modules'; | |||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove ../../../node_modules/
. Please also check if you have accidentally included node_modules
like this in other places too. :)
@@ -91,27 +93,35 @@ class EncodingShelfBase extends React.PureComponent< | |||
attachment="top left" | |||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why toString()
. Isn't size not a string, for example?
src/queries/alternative-encodings.ts
Outdated
@@ -1,6 +1,7 @@ | |||
|
|||
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'; |
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.
node_modules
51f1e85
to
6875adc
Compare
Remove ../node_modules prefix asdf
6875adc
to
5da835b
Compare
UI for customization of constant values (valuedef). Addresses issue #662.