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

Fixes #13601 - Storybook redirects off page #14491

Merged

Conversation

payapula
Copy link
Contributor

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update

Description

  • Storybook for crayons-tabs redirects off page #13601 Fixed the anchor tags with hash routes to prevent navigating to different page.
  • Since the stories are inside iFrame, I couldn't keep it in the same story navigatable view, instead it will open the story on fullscreen and the corresponding selected tab is highlighed.
  • Took reference from implemented Tab component for className toggles - Tabs.tsx
  • Used state to highlight the current tab.
  • Used location.hash to set the initial state.

Related Tickets & Documents

Closes #13601

QA Instructions, Screenshots, Recordings

The fix is shown in the GIF below

13601

UI accessibility concerns?

There are no UI changes.

Added/updated tests?

  • Yes
  • No, and this is why: This is a bugfix in storybook story
  • I need help with writing tests

[Forem core team only] How will this change be communicated?

Will this PR introduce a change that impacts Forem members or creators, the
development process, or any of our internal teams? If so, please note how you
will share this change with the people who need to know about it.

  • I've updated the Developer Docs and/or
    Admin Guide, or
    Storybook (for Crayons components)
  • I've updated the README or added inline documentation
  • I've added an entry to
    CHANGELOG.md
  • I will share this change in a Changelog
    or in a forem.dev post
  • I will share this change internally with the appropriate teams
  • I'm not sure how best to communicate this change and need help
  • This change does not need to be communicated, and this is why not: please
    replace this line with details on why this change doesn't need to be
    shared

What gif best describes this PR or how it makes you feel?

My work here is finally done

@payapula payapula requested review from a team, Ridhwana and aitchiss and removed request for a team August 12, 2021 19:00
@pr-triage pr-triage bot added the PR: unreviewed bot applied label for PR's with no review label Aug 12, 2021
@CLAassistant
Copy link

CLAassistant commented Aug 12, 2021

CLA assistant check
All committers have signed the CLA.

@github-actions
Copy link
Contributor

Thank you for opening this PR! We appreciate you!

For all pull requests coming from third-party forks we will need to
review the PR before we can process it through our CI pipelines.

A Forem Team member will review this contribution and get back to
you as soon as possible!

Copy link
Contributor

@aitchiss aitchiss left a comment

Choose a reason for hiding this comment

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

It works great! Nice one working around the iframe issue ✨

@pr-triage pr-triage bot added PR: partially-approved bot applied label for PR's where a single reviewer approves changes and removed PR: unreviewed bot applied label for PR's with no review labels Aug 13, 2021
@aitchiss
Copy link
Contributor

I've hit re-run on the E2E build job - the tests had run into the 500 error flake we've seen a few times recently, nothing to do with the changes here 👍

Copy link
Contributor

@nickytonline nickytonline left a comment

Choose a reason for hiding this comment

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

Thanks @payapula! 🚢

@nickytonline nickytonline merged commit 5234618 into forem:main Aug 13, 2021
@pr-triage pr-triage bot added PR: merged bot applied label for PR's that are merged and removed PR: partially-approved bot applied label for PR's where a single reviewer approves changes labels Aug 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: merged bot applied label for PR's that are merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Storybook for crayons-tabs redirects off page
4 participants