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

ActionList: Add comment to avoid import confusion #1607

Closed
wants to merge 2 commits into from

Conversation

siddharthkp
Copy link
Member

@siddharthkp siddharthkp commented Nov 15, 2021

In the docs, because we have multiple ActionLists now, we import it ActionList2 from a different scope:

const {ActionList} = unreleased

render(
  <ActionList>
    ...
  </ActionList>
)

This causes confusion in where does unreleased come from?

The long term fix would be to modify the scope conditionally by tagging the code block with "unreleased": ```javascript live unreleased.

For now, the bandaid is the add a comment to ignore the internal silliness and import from the path

// import {ActionList} from '@primer/components/unreleased'
const {ActionList} = unreleased // ignore this, import like that ↑

We mention this import path at the start of the page as well

Screenshots

image

Merge checklist

  • NA Added/updated tests
  • Added/updated documentation
  • NA Tested in Chrome
  • NA Tested in Firefox
  • NA Tested in Safari
  • NA Tested in Edge

@siddharthkp siddharthkp added docs Documentation react labels Nov 15, 2021
@siddharthkp siddharthkp requested review from a team, mperrotti and colebemis November 15, 2021 14:17
@siddharthkp siddharthkp added the skip changeset This change does not need a changelog label Nov 15, 2021
@github-actions
Copy link
Contributor

github-actions bot commented Nov 15, 2021

size-limit report 📦

Path Size
dist/browser.esm.js 54.96 KB (0%)
dist/browser.umd.js 55.35 KB (0%)

@changeset-bot
Copy link

changeset-bot bot commented Nov 15, 2021

⚠️ No Changeset found

Latest commit: c7c47e1

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@siddharthkp
Copy link
Member Author

Closed in favor of #1609

@joshblack joshblack deleted the siddharth/actionlist-doc-comment branch January 19, 2023 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation react skip changeset This change does not need a changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant