Add a dropdown for choosing MRVA result format#2743
Merged
shati-patel merged 3 commits intomainfrom Aug 24, 2023
Merged
Conversation
f5952b3 to
7ac9ea0
Compare
3 tasks
charisk
approved these changes
Aug 24, 2023
Contributor
charisk
left a comment
There was a problem hiding this comment.
Looks great! Thanks for adding a story for it too!
| return ( | ||
| <Dropdown value={value} onInput={handleInput} className={className}> | ||
| <Codicon name="table" label="Result format..." slot="indicator" /> | ||
| <VSCodeOption value={ResultFormat.Alerts}>Alerts</VSCodeOption> |
Contributor
There was a problem hiding this comment.
I think we can use the enum values here too since they have the same text as we want.
Suggested change
| <VSCodeOption value={ResultFormat.Alerts}>Alerts</VSCodeOption> | |
| <VSCodeOption value={ResultFormat.Alerts}>{ResultFormat.Alerts}</VSCodeOption> |
BTW, I don't remember using string enum values with spaces in them 🤔 I've looked in our repo and it doesn't look like we're following any kind of convention though (some are capital case, some lower case, some camel case, some pascal case, and in some rare occasions we have spaces 😓 ).
Contributor
Author
There was a problem hiding this comment.
Thanks! And yeah, it looks like we're pretty inconsistent with enums 🙈
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
I've added a new component for picking the format for MRVA results:

It follows the style of the existing Sort and Filter dropdowns:

Note that I haven't hooked this new component up to the rest of the view yet, so it won't show up anywhere (except in Storybook). See internal linked issue for details!
Checklist
N/A—no user impact yet 🐘
ready-for-doc-reviewlabel there.