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

[ui] Fix awkward messaging on the “Materialize” button when selection is empty #28846

Merged
merged 1 commit into from
Mar 28, 2025

Conversation

bengotow
Copy link
Collaborator

@bengotow bengotow commented Mar 28, 2025

Summary & Motivation

https://linear.app/dagster-labs/issue/FE-798/improve-tooltip-for-button-with-no-selection

Before:
image

After:

image

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.

@bengotow bengotow requested review from salazarm and hellendag March 28, 2025 14:54
@bengotow bengotow force-pushed the bengotow-2025-03/FE-798 branch from 3e49d68 to 1f58153 Compare March 28, 2025 14:56
Copy link

github-actions bot commented Mar 28, 2025

Deploy preview for dagit-core-storybook ready!

✅ Preview
https://dagit-core-storybook-b835skwhm-elementl.vercel.app
https://bengotow-2025-03-FE-798.core-storybook.dagster-docs.io

Built with commit 9d8a845.
This pull request is being automatically deployed with vercel-action

return 'Select one or more assets to materialize';
}
if (all.some((a) => !a.hasMaterializePermission)) {
return 'You do not have permission to materialize assets';
Copy link
Member

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?

Copy link
Collaborator Author

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;
}
Copy link
Member

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.

Copy link
Collaborator Author

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

@bengotow bengotow force-pushed the bengotow-2025-03/FE-798 branch from 1f58153 to 9d8a845 Compare March 28, 2025 16:22
@bengotow bengotow merged commit 40fb259 into master Mar 28, 2025
6 of 7 checks passed
@bengotow bengotow deleted the bengotow-2025-03/FE-798 branch March 28, 2025 18:28
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.

2 participants