Skip to content

Conversation

@wise-king-sullyman
Copy link
Contributor

@wise-king-sullyman wise-king-sullyman commented May 9, 2023

@patternfly-build
Copy link
Contributor

patternfly-build commented May 9, 2023


const firstActionRef = React.useRef<HTMLButtonElement>(null);

const handleClick = (event: React.MouseEvent, ActionsToggleProps: CustomActionsToggleProps) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you add some comments here as to the purposes of these handlers? I don't think it will be apparent to consumers.

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'm not sure if I know quite what you mean by not apparent? Is the potential confusion just coming from the names that are a bit too generic?

I could definitely say that the KeyDown handler is to enable keyboard navigation of the toggle, and change the names so that it's more clear what these handlers are for, but I'm not sure what there really is to explain about the Click handler.

Copy link
Contributor

Choose a reason for hiding this comment

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

I guess I mean - why are they needed?
Users don't ususally need to wire up keydown and click handling for our basic dropdowns, so this won't be what they expect.

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 added a couple of comments and made the handler names more descriptive, WDYT?

Copy link
Contributor

@nicolethoen nicolethoen left a comment

Choose a reason for hiding this comment

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

I'm also noticing that using keyboard to click the link, or select an item from the dropdown, it toggles the drawer on the side.

I think the keyboard handling for these table rows should be attached to the checkbox, not the whole row (or other elements on the row) so it may be a little different than a click event (although I am seeing the same issue with the click events on the links, too).

This behavior could be a follow up issue if it is more of an implementation detail on the demo itself and not indicative of further breaking changes needed on any of the components it uses.

@wise-king-sullyman
Copy link
Contributor Author

@nicolethoen it does seem like the problems are just demo based rather than component based to me, I made #9100 to address the link selection issue.

@wise-king-sullyman wise-king-sullyman force-pushed the tabla-actionsColumn-actionsToggle-dropdown-incorrect branch from e1e2a97 to f545013 Compare May 11, 2023 17:47
@nicolethoen nicolethoen merged commit 7ea3a28 into patternfly:v5 May 15, 2023
@wise-king-sullyman wise-king-sullyman deleted the tabla-actionsColumn-actionsToggle-dropdown-incorrect branch May 15, 2023 17:42
@patternfly-build
Copy link
Contributor

Your changes have been released in:

  • @patternfly/react-code-editor@5.0.0-alpha.100
  • @patternfly/react-core@5.0.0-alpha.99
  • @patternfly/react-docs@6.0.0-alpha.107
  • demo-app-ts@5.0.0-alpha.83
  • @patternfly/react-table@5.0.0-alpha.101

Thanks for your contribution! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug - Table - ActionsColumn actionsToggle dropdown menu position is incorrect

4 participants