Skip to content

Conversation

cliffmeyers
Copy link
Contributor

@cliffmeyers cliffmeyers commented May 16, 2017

Description

Submitter checklist

  • Link to JIRA ticket in description, if appropriate.
  • Change is code complete and matches issue description
  • Appropriate unit or acceptance tests or explanation to why this change has no tests
  • Reviewer's manual test instructions provided in PR description. See Reviewer's first task below.
  • Ran Acceptance Test Harness against PR changes.

Reviewer checklist

  • Run the changes and verified the change matches the issue description
  • Reviewed the code
  • Verified that the appropriate tests have been written or valid explanation given

Cliff Meyers added 2 commits May 16, 2017 14:12
…rwise when URL value changes the child result item will undergo remount and replay animations
@cliffmeyers cliffmeyers requested a review from scherler May 16, 2017 19:41
@cliffmeyers
Copy link
Contributor Author

@scherler would just like some feedback from you that these changes are appropriate. See my comments inline. Thanks!!

if (this.pager.pending) {
logger.debug('pending returning null');
return null;
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was causing the entire ResultItem - header included - to disappear while data was loading. Removing this didn't seem to cause any issues and ATH passed.

Copy link
Member

Choose a reason for hiding this comment

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

ah yes, react accepts null as meaning "remove this component or don't bother rendering". Looks like left over debug code.

@@ -139,7 +134,7 @@ export class Step extends Component {
liveFormat={t('common.date.duration.format', { defaultValue: 'm[ minutes] s[ seconds]' })}
hintFormat={t('common.date.duration.hint.format', { defaultValue: 'M [month], d [days], h[h], m[m], s[s]' })}
/>);
return (<div className={logConsoleClass} key={this.pager.currentLogUrl}>
return (<div className={logConsoleClass}>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

After making the above change, I noticed that when the log data loaded, the slide/open animation would play again. It wasn't terrible but it looked a little funny. I noticed that the value of this.pager.currentLogUrl was undefined before the data fetch, and then populated after. This caused the component to be created/redestroyed, so the ResultItem was playing its animation again. This fix seems appropriate but I am curious if there is a specific reason you set a key on this component. It seems unnecessary since the parent Steps component is already defining a key on each Step?

Copy link
Collaborator

Choose a reason for hiding this comment

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

@cliffmeyers I am not 100% sure but I think that has been there because of the effect it has on rendering, I remember adding it when using the satges and steps and the steps had been from the old stage, but I guess that is not needed anymore then ;)

@cliffmeyers
Copy link
Contributor Author

jenkins-49348-1-fixed

@i386
Copy link
Contributor

i386 commented May 16, 2017

@cliffmeyers nice one 👍

@michaelneale
Copy link
Member

🐝 nice one cliff on this critical issue!

@@ -139,7 +134,7 @@ export class Step extends Component {
liveFormat={t('common.date.duration.format', { defaultValue: 'm[ minutes] s[ seconds]' })}
hintFormat={t('common.date.duration.hint.format', { defaultValue: 'M [month], d [days], h[h], m[m], s[s]' })}
/>);
return (<div className={logConsoleClass} key={this.pager.currentLogUrl}>
return (<div className={logConsoleClass}>
Copy link
Collaborator

Choose a reason for hiding this comment

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

@cliffmeyers I am not 100% sure but I think that has been there because of the effect it has on rendering, I remember adding it when using the satges and steps and the steps had been from the old stage, but I guess that is not needed anymore then ;)

@cliffmeyers cliffmeyers merged commit 7987f58 into master May 17, 2017
@cliffmeyers cliffmeyers deleted the bug/JENKINS-43948-step-header-disappears-clicked branch May 17, 2017 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants