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

Improve bounding box frontend components #5305

Closed
wants to merge 32 commits into from

Conversation

julieg18
Copy link
Contributor

@julieg18 julieg18 commented Feb 16, 2024

main <- #5227 <- #5241 <- #5250 <- this <- #5313

Updates our class logic to handle different use cases and adds other various improvements I spotted while working in Studio (details inline).

Demo

https://github.com/iterative/vscode-dvc/assets/43496356/50a95839-ce6f-47f5-819a-d8a1ea953cb6

Screen.Recording.2024-02-20.at.6.17.42.AM.mov

@julieg18 julieg18 added the product PR that affects product label Feb 16, 2024
@julieg18 julieg18 self-assigned this Feb 16, 2024
@julieg18 julieg18 changed the base branch from main to bounding-boxes February 16, 2024 00:12
Copy link

codeclimate bot commented Feb 16, 2024

Code Climate has analyzed commit 9535cd3 and detected 5 issues on this pull request.

Here's the issue category breakdown:

Category Count
Duplication 5

The test coverage on the diff in this pull request is 94.4% (85% is the threshold).

This pull request will bring the total coverage in the repository to 95.3% (0.0% change).

View more on Code Climate.

@julieg18 julieg18 changed the base branch from bounding-boxes to add-bb-backend-logic February 16, 2024 12:49
@@ -18,7 +18,6 @@ const boundingBoxColorsList = [
'#ff701f',
'#ffb21d',
'#cfd231',
'#48f90a',
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stephanie commented previously that this neon green color makes text hard to read.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Along with removing the neon color, Svetlana spotted that some colors don't look deselected with the opacity change, so I updated the deselected styles:

image

{
box: { bottom: 370, left: 370, right: 390, top: 343 },
score: 0.987
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add some extra classes so we could show how classes go into a dropdown.

<span className={styles.showMoreButtonWrapper}>
<Button
appearance="secondary"
onClick={() => {}}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I went for a button like I did with Studio, but I also tested a "tooltip" option that used text instead of a VSCode button:

Screenshot 2024-02-16 at 11 23 06 AM

classDetailsArr.unshift([
'tree',
{ color: getBoundingBoxColor(classDetailsArr.length), selected: false }
])
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a unselected option that we could view in Storybook since checks rely on the backend.

@@ -189,22 +189,48 @@ $gap: 4px;
display: none;
}

.classButtons {
font-family: $font;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated the font since it takes up less space and it felt like it made more sense since we use it for plot section widgets:

image

@julieg18 julieg18 marked this pull request as ready for review February 16, 2024 17:38
@julieg18 julieg18 requested a review from sroy3 February 20, 2024 14:02
Copy link
Contributor

@sroy3 sroy3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the "With Many Classes" story, is it possible to add some actions before the snapshot so that we actually see the classes on it? I'm talking about adding play on the story.

Base automatically changed from add-bb-backend-logic to bounding-boxes February 20, 2024 17:26
@mattseddon mattseddon closed this Mar 12, 2024
@mattseddon mattseddon deleted the improve-bounding-box-frontend branch March 12, 2024 05:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
product PR that affects product
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants