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

use FocusTrap for popover and remount StepComponent to remove the focus from Next button #7014

Merged
merged 1 commit into from Oct 29, 2020

Conversation

sahil143
Copy link
Contributor

Fixes:

https://issues.redhat.com/browse/ODC-4722
https://issues.redhat.com/browse/ODC-4919

Analysis / Root cause: Color of Next button was changed because once next button is clicked it remains focused.

Solution Description: Remount the component so focus is not on the Next Button

Screen shots / Gifs for design review:

focus-trap

Unit test coverage report: None

Test setup:

Browser conformance:

  • Chrome
  • Firefox
  • Safari
  • Edge

@sahil143
Copy link
Contributor Author

/kind bug

@openshift-ci-robot openshift-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Oct 28, 2020
@openshift-ci-robot openshift-ci-robot added component/core Related to console core functionality component/shared Related to console-shared labels Oct 28, 2020
@lwrigh
Copy link

lwrigh commented Oct 28, 2020

This looks good from UX perspective!

@andrewballantyne
Copy link
Contributor

/lgtm
/assign @rohitkrai03 @christianvogt

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Oct 28, 2020
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.

/approve

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 28, 2020
@@ -1,5 +1,5 @@
import * as React from 'react';
import { Popper } from '../popper';
import * as FocusTrap from 'focus-trap-react';
Copy link
Contributor

Choose a reason for hiding this comment

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

Use focus trap from PF:

Suggested change
import * as FocusTrap from 'focus-trap-react';
import * as FocusTrap from '@patternfly/react-core';

edit: not sure when they started exporting this but we also have a few other places that use focus-trap-react that we should look to update.

Copy link
Contributor

Choose a reason for hiding this comment

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

Agree, there are only a few other places that use FocusTrap from this external lib, we should get rid of them and drop the dependency.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed in other places as well

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure if we want to remove the dependency as well from package.json

Copy link
Contributor

Choose a reason for hiding this comment

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

@christianvogt Did you want to consult with the Admin team?

@sahil143 Did you test the other areas? Because you've just created an extra step before I can lgtm this lol... Will have to wait until I can test the other areas.

@christianvogt
Copy link
Contributor

/lgtm cancel

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

@sahil143 Could you squash your commits?

@andrewballantyne
Copy link
Contributor

LGTM, retested it with the PF lib and operates the same. Just need the commits to be squashed and then we get this merged.

@openshift-ci-robot openshift-ci-robot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. component/dev-console Related to dev-console labels Oct 29, 2020
ODC-4919: trap foxus inside popover

use Focus Trap from patternfly/react-core

use FocusTrap from patternfly
@openshift-ci-robot openshift-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 29, 2020
@sahil143
Copy link
Contributor Author

@andrewballantyne commits squashed! Please take a look again.

@christianvogt
Copy link
Contributor

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Oct 29, 2020
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: andrewballantyne, christianvogt, rohitkrai03, sahil143

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-merge-robot openshift-merge-robot merged commit 8d538a1 into openshift:master Oct 29, 2020
@spadgett spadgett added this to the v4.7 milestone Nov 4, 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. component/core Related to console core functionality component/dev-console Related to dev-console component/shared Related to console-shared kind/bug Categorizes issue or PR as related to a bug. 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

8 participants