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

Bug 1840624: fix(CLI-drawer): Add preventdefault to adjust scroll issue #5596

Merged

Conversation

abhinandan13jan
Copy link
Contributor

@abhinandan13jan abhinandan13jan commented May 27, 2020

Fixes:

Addresses https://issues.redhat.com/browse/ODC-3740
https://bugzilla.redhat.com/show_bug.cgi?id=1840624

Analysis / Root cause:

Autoscrolling when using Terminal drawer

Solution Description:

Adds prevent default to the function passed over to the onStart action

Screenshot

Terminal__scroll

Tests

Alters test in Drawer.spec.tsx

Browser conformation

Chrome 73

@openshift-ci-robot openshift-ci-robot added the component/shared Related to console-shared label May 27, 2020
@abhinandan13jan abhinandan13jan changed the title fix(CLI-drawer): Add preventdefault to adjust scroll issue [WIP] fix(CLI-drawer): Add preventdefault to adjust scroll issue May 27, 2020
@openshift-ci-robot openshift-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 27, 2020
@abhinandan13jan
Copy link
Contributor Author

/retitle Bug 1840624: fix(CLI-drawer): Add preventdefault to adjust scroll issue

@openshift-ci-robot openshift-ci-robot changed the title [WIP] fix(CLI-drawer): Add preventdefault to adjust scroll issue Bug 1840624: fix(CLI-drawer): Add preventdefault to adjust scroll issue May 27, 2020
@openshift-ci-robot openshift-ci-robot added bugzilla/severity-high Referenced Bugzilla bug's severity is high for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. and removed do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. labels May 27, 2020
@openshift-ci-robot
Copy link
Contributor

@abhinandan13jan: This pull request references Bugzilla bug 1840624, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.5.0) matches configured target release for branch (4.5.0)
  • bug is in the state NEW, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

Bug 1840624: fix(CLI-drawer): Add preventdefault to adjust scroll issue

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci-robot
Copy link
Contributor

@abhinandan13jan: This pull request references Bugzilla bug 1840624, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.5.0) matches configured target release for branch (4.5.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

Bug 1840624: fix(CLI-drawer): Add preventdefault to adjust scroll issue

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Copy link
Contributor

@rohitkrai03 rohitkrai03 left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label May 27, 2020
const data = {} as DraggableData;
const onChange = jest.fn();
const wrapper = shallow(<Drawer resizable defaultHeight={100} onChange={onChange} />);
wrapper
.find(DraggableCoreIFrameFix)
.props()
.onStart({ pageY: 500 } as any, data);
.onStart({ pageY: 500, ...e } as any, data);
Copy link
Contributor

Choose a reason for hiding this comment

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

This seems like just associating a variable with extra steps 😄

// const e = { preventDefault: jest.fn() };
const preventDefault = jest.fn();
Suggested change
.onStart({ pageY: 500, ...e } as any, data);
.onStart({ pageY: 500, preventDefault } as any, data);

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 this

@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label May 28, 2020
@andrewballantyne
Copy link
Contributor

/assign @christianvogt

@christianvogt
Copy link
Contributor

/lgtm
/approve

@openshift-ci-robot openshift-ci-robot added lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels May 28, 2020
@spadgett spadgett removed their request for review May 28, 2020 13:50
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: abhinandan13jan, christianvogt, jcaianirh, rohitkrai03

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

2 similar comments
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-merge-robot openshift-merge-robot merged commit 3e5eedb into openshift:master May 28, 2020
@openshift-ci-robot
Copy link
Contributor

@abhinandan13jan: All pull requests linked via external trackers have merged: openshift/console#5596. Bugzilla bug 1840624 has been moved to the MODIFIED state.

In response to this:

Bug 1840624: fix(CLI-drawer): Add preventdefault to adjust scroll issue

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@spadgett spadgett added this to the v4.5 milestone Jun 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. bugzilla/severity-high Referenced Bugzilla bug's severity is high for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. component/shared Related to console-shared lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants