-
Notifications
You must be signed in to change notification settings - Fork 887
feat: add 'impending deletion' badges to workspaces page #7530
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
Merged
Kira-Pilot
merged 8 commits into
main
from
deletion-indicators-workspaces-page/kira-pilot
May 15, 2023
Merged
Changes from 1 commit
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
0ba53bd
update deleting logic
Kira-Pilot 1255b07
added status badge on workspaces page
Kira-Pilot 3618c5d
licensing and feature flagging
Kira-Pilot d6adbd9
preset filter for failed workspaces
Kira-Pilot e00ed2a
remove comment
Kira-Pilot 2dfbb50
PR feedback
Kira-Pilot 3c72d11
Revert "PR feedback"
Kira-Pilot fc8e51c
PR feedback 2
Kira-Pilot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PR feedback
- Loading branch information
commit 2dfbb50acd2a564d92e39c7cea2886c3e876972c
There are no files selected for viewing
76 changes: 0 additions & 76 deletions
76
site/src/components/WorkspaceStatusBadge/WorkspaceStatusBadge.stories.tsx
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 are already checking if we should or not display the badge on
displayImpendingDeletion
I think we should move those checks to be there since they are doing the same thing.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.
@BrunoQuaresma those checks rely on a hook, which has to be called in a component. Would you rather I call the hook in the
WorkspaceStatusBadge
component? I definitely could; I just didn't want to screw up all the storybook stories.Alternatively, I thought about calling this hook in
WorkspacesPage
and then passing down props from there - but there are like 7 layers of prop passing and it just seemed like a lot to me.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.
The thing for me is to have the "should display or not" check in one single place. Splitting this check into different places looks confusing to me. But if it is hard, I would add a comment so that in the future, if we want to change the display behavior, we know there are two places to look for.
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.
Agreed - as the ideal behavior is to have the check in one place, I think the best path forward may be to call the hook in the badge component and then ignore Storybook's complaints, rather than let our testing tool dictate how we code.
I'll adjust.