Skip to content
This repository has been archived by the owner on Jul 2, 2024. It is now read-only.

EVG-6867: Support searching by git hash on commit history #2073

Merged
merged 13 commits into from
Nov 16, 2023

Conversation

minnakt
Copy link
Contributor

@minnakt minnakt commented Oct 2, 2023

EVG-6867

Description

This PR includes the frontend changes to make it possible to jump to a specific commit in the commit history.

Screenshots

commit_history.mov

Testing

  • Cypress tests (I split up the files here b/c they were kind of long, only the search by git commit block is new)

Evergreen PR

@minnakt minnakt marked this pull request as ready for review October 3, 2023 15:15
@minnakt minnakt requested a review from a team October 3, 2023 15:15
@SupaJoon
Copy link
Contributor

SupaJoon commented Oct 4, 2023

I used the feature in staging to find active and inactive commits and it works really well to center a commit. There are some issues around paginating backwards which limits utility since that's probably something that users will want to do after searching. We could merge this in as an experimental feature to see how users utilize jumping to a commit which could help with a future redesign. Since fixing the pagination issue is a major lift, it may be worth collecting analytics and partially meeting users' needs than not meeting them at all. This might be good to discuss at the UI roundtable.

if (revision.trim() === "") {
return false;
}
if (version && version.revision.includes(revision)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if (version && version.revision.includes(revision)) {
if (version?.revision.includes(revision)) {

Comment on lines 118 to 124
if (
rolledUpVersions &&
rolledUpVersions.some((v) => v.revision.includes(revision))
) {
return true;
}
return false;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if (
rolledUpVersions &&
rolledUpVersions.some((v) => v.revision.includes(revision))
) {
return true;
}
return false;
return rolledUpVersions && rolledUpVersions.some((v) => v.revision.includes(revision))

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 kept this one since I think it's easier to read, but I implemented your other feedback

@@ -70,7 +70,7 @@ export const CommitChart: React.FC<Props> = ({
const onToggleAccordion = ({ isVisible }) =>
Cookies.set(COMMIT_CHART_TYPE_VIEW_OPTIONS_ACCORDION, isVisible.toString());

return hasError ? (
return noData ? (
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
return noData ? (
return !versions ? (

@minnakt minnakt requested review from SupaJoon and removed request for SupaJoon October 6, 2023 18:56
@sophstad sophstad marked this pull request as draft October 11, 2023 13:54
Copy link

cypress bot commented Nov 2, 2023

Passing run #13927 ↗︎

0 605 7 0 Flakiness 0
⚠️ You've recorded test results over your free plan limit.
Upgrade your plan to view test results.

Details:

Merge branch 'main' into EVG-6867
Project: Spruce Commit: 3608c9555d
Status: Passed Duration: 19:08 💡
Started: Nov 16, 2023 3:12 PM Ended: Nov 16, 2023 3:31 PM

Review all test suite changes for PR #2073 ↗︎

@minnakt minnakt marked this pull request as ready for review November 7, 2023 14:38
@minnakt minnakt requested review from SupaJoon and a team and removed request for SupaJoon November 7, 2023 14:38
@SupaJoon SupaJoon self-requested a review November 14, 2023 17:43
@SupaJoon
Copy link
Contributor

evergreen retry

@minnakt minnakt changed the title EVG-6867: Allow jumping to specific revision in commit history EVG-6867: Support searching by git hash on commit history Nov 16, 2023
@minnakt minnakt changed the title EVG-6867: Support searching by git hash on commit history EVG-6867: Support searching by git hash on Project Health page Nov 16, 2023
@minnakt minnakt changed the title EVG-6867: Support searching by git hash on Project Health page EVG-6867: Support searching by git hash on commit history Nov 16, 2023
@minnakt minnakt merged commit ccfd805 into evergreen-ci:main Nov 16, 2023
5 checks passed
@minnakt minnakt deleted the EVG-6867 branch November 16, 2023 15:36
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants