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

Add log link next to status message #367

Merged
merged 4 commits into from
Mar 5, 2024

Conversation

gabalafou
Copy link
Contributor

@gabalafou gabalafou commented Feb 9, 2024

Fixes #244. (But note that in the interest of time, I did not follow the design mocks exactly.)

Description

This pull request:

  • Renders a log link in the <EnvBuilds> component if the currently selected build status is "Failed"
  • Adds two tests
  • Adds story to Storybook

screenshot of EnvBuild component in Storybook

Pull request checklist

  • Did you test this change locally?
  • Did you update the documentation (if required)?
  • Did you add/update relevant tests for this change (if required)?

@gabalafou
Copy link
Contributor Author

Do the docs need to be updated for a change this small?

Copy link
Contributor Author

@gabalafou gabalafou left a comment

Choose a reason for hiding this comment

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

Done self-reviewing

</Typography>
</StyledMetadataItem>
</>
)}
{!currentBuild && (
) : (
Copy link
Contributor

Choose a reason for hiding this comment

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

Out of curiosity, how come this is needed? Are there cases where currentBuild is undefined? Looking through buildMapper it seems like the currentBuildId should always have a corresponding item in builds.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah... that's a good question. I don't know... Pagination maybe?

It doesn't help that the variable currentBuild does not actually correspond the currentBuildId build, see line 28 above:

  const currentBuild = envBuilds.find(build => build.id === selectedBuildId);

So maybe there's some way you can select a build id that isn't in the builds for that environment?

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't have the context to know whether an additional refactor here is appropriate, but you might. If you feel like this could be cleaner, please make an issue for it. In the meantime, let's get this merged.

test/metadata/EnvBuilds.test.tsx Show resolved Hide resolved
Copy link
Contributor Author

@gabalafou gabalafou left a comment

Choose a reason for hiding this comment

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

Thanks @peytondmurray!

</Typography>
</StyledMetadataItem>
</>
)}
{!currentBuild && (
) : (
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah... that's a good question. I don't know... Pagination maybe?

It doesn't help that the variable currentBuild does not actually correspond the currentBuildId build, see line 28 above:

  const currentBuild = envBuilds.find(build => build.id === selectedBuildId);

So maybe there's some way you can select a build id that isn't in the builds for that environment?

test/metadata/EnvBuilds.test.tsx Show resolved Hide resolved
@gabalafou
Copy link
Contributor Author

I do not know why the Playwright test is failing for this PR

@gabalafou
Copy link
Contributor Author

OK, test passing now, this just needs to be approved

Copy link
Contributor

@peytondmurray peytondmurray left a comment

Choose a reason for hiding this comment

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

Approved, see note though about filing an issue if a refactor of EnvBuilds.tsx is appropriate. The fact that it's confusing for both of us probably means we should track an issue even if we don't work on it right away, but I'll defer to your judgment about this.

@gabalafou gabalafou merged commit 7806a85 into conda-incubator:main Mar 5, 2024
4 checks passed
@gabalafou gabalafou mentioned this pull request Mar 5, 2024
3 tasks
gabalafou added a commit to gabalafou/conda-store-ui that referenced this pull request Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: documentation 📖 Improvements or additions to documentation type: enhancement 💅🏼 New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[UX] Reporting the errors at the top if a build fails
3 participants