Skip to content

Conversation

@mattseddon
Copy link
Contributor

@mattseddon mattseddon commented Mar 21, 2023

2/4 main <- #3477 <- this <- #3522 <- #3532

Part of #2277

Screenshot

image

with tooltip shown

image

I tried to make a ! work to fit in with the errors shown in the experiments table but it did not look very good.

Note: If an image is completely broken/missing for all revisions then we do not know that it is an image so we won't be able to display it like this. We will still be able to add an error indicator into the tree for this.

Previous idea:

Screenshot 2023-03-21 at 1 08 52 pm

@mattseddon mattseddon added the bug Something isn't working label Mar 21, 2023
@mattseddon mattseddon self-assigned this Mar 21, 2023
@mattseddon mattseddon changed the base branch from main to jump-plots-diff-bc March 21, 2023 03:59
@mattseddon mattseddon changed the base branch from jump-plots-diff-bc to main March 22, 2023 02:32
@mattseddon mattseddon changed the base branch from main to jump-plots-diff-bc March 22, 2023 02:33
<>
<ErrorTooltip error={error}>
<div>
<Error height={48} width={48} className={styles.errorIcon} />
Copy link
Contributor Author

Choose a reason for hiding this comment

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

[F] Tried an $error-color ! as well, couldn't make it work.

Copy link
Contributor

Choose a reason for hiding this comment

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

Did you set it like this:

.errorIcon {
  color: $error-color;
  margin: 6px;

  svg {
    fill: $error-color;
  }
}

Else you can pass the color directly on the fill prop for the icon.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sorry, there is no ! icon but we show ! for errors in the experiment table. What I meant was I had ! instead of the error icon for an error but it just looked weird (unfortunately).

import { Error } from '../../../shared/components/icons'
import Tooltip from '../../../shared/components/tooltip/Tooltip'
import { Error } from '../icons'
import Tooltip from '../tooltip/Tooltip'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

[Q] Should this component be grouped under tooltip?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think that would be a good idea. For discoverability mainly.

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'll move in a follow up

@mattseddon mattseddon changed the base branch from jump-plots-diff-bc to main March 22, 2023 02:49
@mattseddon mattseddon changed the base branch from main to jump-plots-diff-bc March 22, 2023 02:51
import React from 'react'
import { CellContents } from './CellContent'
import { ErrorTooltip } from '../Errors'
import { ErrorTooltip } from '../../../../shared/components/errorTooltip/ErrorTooltip'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

[F] Moved this because we are using it in both the experiments table and plots now (also means it will be easier to make it look better everywhere).

@mattseddon mattseddon marked this pull request as ready for review March 22, 2023 09:02
return undefined
}

return msgs.join('\n')
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be done when displaying instead? I feel like this could be more flexible if it were an array (displaying only the first error, wrap each error with something...). If it doesn't suit our use cases, it's totally fine to keep as is.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, you are right. I will move that logic out to the client.

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 will follow-up

<>
<ErrorTooltip error={error}>
<div>
<Error height={48} width={48} className={styles.errorIcon} />
Copy link
Contributor

Choose a reason for hiding this comment

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

Did you set it like this:

.errorIcon {
  color: $error-color;
  margin: 6px;

  svg {
    fill: $error-color;
  }
}

Else you can pass the color directly on the fill prop for the icon.

/>
</>
) : (
<p className={styles.emptyIcon}>-</p>
Copy link
Contributor

Choose a reason for hiding this comment

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

Why don't we keep <p>No Plot to Display.</p>?

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 stared at/reworded the statement for ~30 minutes then I decided that this is a table of data and that we could just display the same missing value that is displayed in the CLI experiments table. Could be the wrong decision but we can iterate with feedback 🙏🏻.

import { Error } from '../../../shared/components/icons'
import Tooltip from '../../../shared/components/tooltip/Tooltip'
import { Error } from '../icons'
import Tooltip from '../tooltip/Tooltip'
Copy link
Contributor

Choose a reason for hiding this comment

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

I think that would be a good idea. For discoverability mainly.

@shcheklein
Copy link
Contributor

I like the look and feel of this iteration way better, thank @mattseddon !

Copy link
Contributor

@julieg18 julieg18 left a comment

Choose a reason for hiding this comment

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

Great work!

/>
{error ? (
<>
<ErrorTooltip error={error}>
Copy link
Contributor

Choose a reason for hiding this comment

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

Are users going to want to be able to copy the error? I know that when I run into an issue that I can't figure out I need to copy the error message so I can post it somewhere 🤔

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 will make this copyable in the follow-up where I move the component.

@mattseddon mattseddon enabled auto-merge (squash) April 2, 2023 01:38
@qlty-cloud-legacy
Copy link

Code Climate has analyzed commit 224cfbb and detected 0 issues on this pull request.

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

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

View more on Code Climate.

@mattseddon mattseddon merged commit 1d3cfca into main Apr 2, 2023
@mattseddon mattseddon deleted the use-errors branch April 2, 2023 01:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants