-
Notifications
You must be signed in to change notification settings - Fork 2
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
feat: toggle node images and data fields on editor graph #3789
Conversation
Removed vultr server and associated DNS entries |
editor.planx.uk/src/pages/FlowEditor/components/Flow/components/Checklist.tsx
Show resolved
Hide resolved
: theme.palette.text.disabled, | ||
})} | ||
> | ||
{showDataFields ? <DataFieldIcon /> : <DataFieldOffIcon />} |
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.
Open to MUI icon suggestions for this one especially - there's only so many that have "on"/"off" pairings !
But I think there's something sweet and hopefully not too far of a stretch about "auto" wand → "auto-answering" → data fields ?
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'd say we need to be more literal as the magic element is an implied function of the data itself, rather than describing the function of the button.
Not perfect from a technical sense (code vs data), but CodeIcon
and CodeOffIcon
is a really simple icon combo that gives a stronger literal link to the 'thing' being toggled.
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.
{Icon && <Icon titleAccess={iconTitleAccess} />} | ||
<span>{props.text}</span> | ||
</Link> | ||
{props.type !== TYPES.SetValue && props.data?.fn && ( | ||
<DataField value={props.data.fn} variant="parent" /> | ||
)} |
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.
Two points about this:
SetValue
as a whole already has a "data" style so we don't need to additionally show the data field bandprops.data.fn
will not catch all data fields on nodes (eg especially individual file types in FileUpload&Label, List component, etc) but it should catch all the major "top-level" data fields - which feels "good enough" for this experiment!- Would be a nice future exercise to apply some of Daf's thorough search mappings here for more accurate coverage, but doesn't feel like a priority right now
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.
Looking good to me! ✨
Adds ability to toggle visibility of images & data fields on the graph. Follows on from #3674 (toggle tags) & #2947 (maximalist biennale graph styling).
In cases where all attributes are set & toggled "on", proposed heirarchy of info from top to bottom is:
Does that feel right? Toggle button group is organised in same vertical order.