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

docs(Tabs): converted tabs & tables demo to use inputs for selection #9395

Conversation

wise-king-sullyman
Copy link
Contributor

@wise-king-sullyman wise-king-sullyman commented Jul 21, 2023

What: Closes #9100

Additional issues:

Convenience link to the changed demo: https://patternfly-react-pr-9395.surge.sh/components/tabs/react-demos/tables-and-tabs/

@patternfly-build
Copy link
Contributor

patternfly-build commented Jul 21, 2023

@wise-king-sullyman wise-king-sullyman marked this pull request as ready for review July 26, 2023 20:41
Copy link
Contributor

@thatblindgeye thatblindgeye left a comment

Choose a reason for hiding this comment

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

This looks good. Can we just make one additional fix on line ~257:

// Preventing default behavior for demo purposes only
<a onClick={(event) => event.preventDefault()} href="#">siemur/test-space</a>

Right now clicking those links causes the redirect which makes the first row become selected again, which may be confusing in the context of the demo (make it seem like the old behavior still exists or that a new "bug" was introduced)

@wise-king-sullyman wise-king-sullyman changed the base branch from postV5 to main July 31, 2023 17:37
@wise-king-sullyman wise-king-sullyman force-pushed the tables-and-tabs-stop-opening-drawer-on-link-click branch from 590921b to 811f30e Compare August 1, 2023 13:51
@thatblindgeye
Copy link
Contributor

Followup to my previous comment after some discussion on Slack with Austin, we may want to have a larger discussion regarding how we handle links in examples/demos.

  • Should we preventDefault on links unless being redirected serves an actual purpose (for example, Dropdown-like examples that include a link as an item probably doesn't need to redirect since we're just showing what props need to be passed in for a link item)
  • Should we just have links function as normal, as users should expect that clicking the link will redirect in some form (whether it's an actual page or the top of the page with # which we're using often)

cc'ing @andrew-ronaldson for visibility

@tlabaj tlabaj merged commit dec2806 into patternfly:main Aug 2, 2023
nicolethoen pushed a commit to Kells512/patternfly-react that referenced this pull request Sep 1, 2023
…atternfly#9395)

* docs(Tabs): converted tabs & tables demo to use inputs for selection

* docs(Tabs): updated links to not refresh the page to prevent confusion
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug - Tabs - Tables and Tabs demo - Clicking the link opens the drawer
5 participants