- 
                Notifications
    
You must be signed in to change notification settings  - Fork 15
 
Added Benchmark UI Chips #534
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
Conversation
          Summary of ChangesHello @MapleSyrupy, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request primarily focuses on enhancing the user interface of benchmark listings by integrating a newly developed  Highlights
 Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either  
 Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a  Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
  | 
    
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.
Code Review
This pull request introduces a new Chips component to enhance the UI for displaying benchmark information, which is a great improvement. My review focuses on improving the new component's naming for clarity, fixing a potential typo in the Storybook file, addressing some logic changes in data presentation that might lead to misinterpretation, and general code cleanup. Overall, the changes are positive, and with a few adjustments, the code will be even more robust and maintainable.
| {benchmark?.number_of_trials ? ( | ||
| <Chips | ||
| label={benchmark?.number_of_trials} | ||
| color="primary" | ||
| size="medium" | ||
| ></Chips> | ||
| ) : ( | ||
| <Chips | ||
| label={"0"} | ||
| color="default" | ||
| size="medium" | ||
| sx={{ | ||
| border: "1px solid", | ||
| borderColor: "primary", | ||
| }} | ||
| ></Chips> | ||
| )} | 
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.
Similar to current_level, the logic for number_of_trials has changed to display "0" instead of "N/A" for falsy values. This could be misleading if a null value means 'Not Applicable'. The previous logic || "N/A" was also flawed for a value of 0. It's better to explicitly check for null or undefined to decide whether to show the value or "N/A".
| {benchmark?.number_of_trials ? ( | |
| <Chips | |
| label={benchmark?.number_of_trials} | |
| color="primary" | |
| size="medium" | |
| ></Chips> | |
| ) : ( | |
| <Chips | |
| label={"0"} | |
| color="default" | |
| size="medium" | |
| sx={{ | |
| border: "1px solid", | |
| borderColor: "primary", | |
| }} | |
| ></Chips> | |
| )} | |
| {benchmark?.number_of_trials != null ? ( | |
| <Chips | |
| label={benchmark.number_of_trials} | |
| color="primary" | |
| size="medium" | |
| /> | |
| ) : ( | |
| <Chips | |
| label={"N/A"} | |
| color="default" | |
| size="medium" | |
| sx={{ | |
| border: "1px solid", | |
| borderColor: "primary", | |
| }} | |
| /> | |
| )} | 
| label: "Primary Chip", | ||
| sx: { | ||
| border: "1px solid", | ||
| borderColor: "Primary", | 
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 value for borderColor is "Primary" with a capital 'P'. CSS property values and theme keys are typically lowercase. This is likely a typo and should be "primary" to match the usage in other parts of the application (e.g., BenchmarkListElement.tsx).
| borderColor: "Primary", | |
| borderColor: "primary", | 
| 
           Changed the code to align more with the Figma designs, but there might still be some issues especially with the icons on the buttons to add or view targets.  | 
    
| 
           Don't check, not completed, just committing for the sake of saving it. I still need to check it over for any potential styling problems. Also forgot to run prettier on a file.  | 
    
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.
@MapleSyrupy I've added more comments and change requests, we can discuss on the call today if you're available.
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.
I think this is looking good to merge now...
I made and pushed up an additional change- since you added the new "startIcon" prop to our design system Button, I added corresponding stories to preview how that looks in storybook across all variants. I then used that to tweak the layout a bit so that the icon is centered with the button label text.


No description provided.