-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[ui] Fix awkward messaging on the “Materialize” button when selection is empty #28846
Conversation
3e49d68
to
1f58153
Compare
Deploy preview for dagit-core-storybook ready! ✅ Preview Built with commit 9d8a845. |
return 'Select one or more assets to materialize'; | ||
} | ||
if (all.some((a) => !a.hasMaterializePermission)) { | ||
return 'You do not have permission to materialize assets'; |
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.
But you might be able to materialize some of them, no?
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.
Yeah I think that is true... It's possible this should behave like a mixed materializable / observable selection and say Materialize (2)
instead of Materialize (4)
when you are missing permissions on two of the assets. I'll ask Josh next time we talk to him, I'm not sure how common this case is!
return 'Assets do not have observation functions'; | ||
} | ||
return null; | ||
} |
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.
Might be worth writing some simple jest specs for these.
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.
Yeah good call I'll put one together
1f58153
to
9d8a845
Compare
Summary & Motivation
https://linear.app/dagster-labs/issue/FE-798/improve-tooltip-for-button-with-no-selection
Before:

After:
How I Tested These Changes
Other cases are unchanged, I just unwound a mega-ternary into a function (probably my doing...) and added a new case at the top. Verified the other cases still work by selecting non-executable and observable assets.