Skip to content
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

Merged
merged 5 commits into from
Oct 16, 2024

Conversation

jessicamcinchak
Copy link
Member

@jessicamcinchak jessicamcinchak commented Oct 9, 2024

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:

  • Image
  • Flag band
  • Text / title (sometimes including icon)
  • Data field
  • Tag(s)

Does that feel right? Toggle button group is organised in same vertical order.

Screenshot from 2024-10-16 10-01-27

Copy link

github-actions bot commented Oct 9, 2024

Removed vultr server and associated DNS entries

@jessicamcinchak jessicamcinchak changed the title feat: toggle node images on editor graph feat: toggle node images and data fields on editor graph Oct 10, 2024
: theme.palette.text.disabled,
})}
>
{showDataFields ? <DataFieldIcon /> : <DataFieldOffIcon />}
Copy link
Member Author

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 ?

Copy link
Contributor

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.

Copy link
Member Author

@jessicamcinchak jessicamcinchak Oct 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good shout - that's definitely a clearer option - updated!

Screenshot from 2024-10-16 12-38-59

@jessicamcinchak jessicamcinchak marked this pull request as ready for review October 16, 2024 08:06
@jessicamcinchak jessicamcinchak requested a review from a team October 16, 2024 08:07
{Icon && <Icon titleAccess={iconTitleAccess} />}
<span>{props.text}</span>
</Link>
{props.type !== TYPES.SetValue && props.data?.fn && (
<DataField value={props.data.fn} variant="parent" />
)}
Copy link
Member Author

@jessicamcinchak jessicamcinchak Oct 16, 2024

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 band
  • props.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

Copy link
Contributor

@jamdelion jamdelion left a 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! ✨

@jessicamcinchak jessicamcinchak merged commit d2fe0cc into main Oct 16, 2024
12 checks passed
@jessicamcinchak jessicamcinchak deleted the jess/toggle-images branch October 16, 2024 11:39
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