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

Revert prettier to v2.5.1 to fix Storybook HTML addon #188

Merged
merged 1 commit into from Mar 22, 2022

Conversation

stephiescastle
Copy link
Member

Checklist

  • Include a description of your pull request and instructions for the reviewer to verify your work.
  • Link to the issue if this PR is issue-specific.
  • Create/update the corresponding story if this includes a UI component.
  • Create/update documentation. If not included, tell us why.
  • List the environments / browsers in which you tested your changes.
  • Tests, linting, or other required checks are passing.
  • PR has an informative and human-readable title
    • PR titles are used to generate the change log in releases; good ones make that easier to scan.
    • PRs will be broadly categorized in the change log, but for even easier scanning, consider prefixing with a component name or other useful categorization, e.g., "BaseButton: fix layout bug", or "Storybook: Update dependencies".
  • PR has been tagged with a SemVer label and a general category label, or skip-changelog.
    • These tags are used to do the aforementioned broad categorization in the change log and determine what the next release's version number should be.
    • Release Drafter will attempt to do the category labeling for you! Please double-check its work.

Description

Reverts #184 to fix the Storybook HTML addon. The HTML tab in the compiled Storybook was missing, and upon running npm run build-storybook, I discovered this error:

WARN ./node_modules/prettier/standalone.js 68:43-50
WARN Critical dependency: require function is used in a way in which dependencies cannot be statically extracted

Which led me to this issue:
prettier/prettier#12493

The fix referred to in this comment is not yet merged, and I confirmed that replacing the files as discussed in that comment thread does fix the issue. Reverting Prettier until the fix is merged and released.

Instructions to test

  1. You can see that the HTML tab is missing on the current live Storybook: https://nasa-jpl.github.io/explorer-1/?path=/story/components-base-basebutton--primary-button
  2. In this branch, npm i
  3. then npm run build-storybook
  4. make sure storybook builds without errors
  5. Test static storybook locally. I usually do this by running python3 -m http.server 8005 in the storybook_compiled directory.

Tested in the following environments/browsers:

Operating System

  • macOS
  • iOS
  • iPadOS
  • Windows

Browser

  • Chrome
  • Firefox ESR
  • Firefox
  • Safari
  • Edge

@stephiescastle stephiescastle added storybook This issue relates to Storybook.js patch Contains bug fixes or maintenance work fix Fixes a bug labels Mar 22, 2022
@github-actions github-actions bot added the bug Something isn't working label Mar 22, 2022
Copy link
Contributor

@laespinoza laespinoza left a comment

Choose a reason for hiding this comment

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

can confirm i see the HTML tab again 👍

@stephiescastle stephiescastle merged commit 3f81a45 into main Mar 22, 2022
@stephiescastle stephiescastle deleted the fix/revert-prettier-2.5.1 branch March 22, 2022 00:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fix Fixes a bug patch Contains bug fixes or maintenance work storybook This issue relates to Storybook.js
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants