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

fix: default link widget with react strict mode #1014

Merged
merged 1 commit into from
Feb 15, 2024

Conversation

marian2js
Copy link
Contributor

Checklist

  • The tests pass
  • I have referenced the issue(s) or other PR(s) this fixes/relates-to
  • I have run pnpm changeset and followed the instructions
  • I have explained in this PR, what I did and why
  • I replaced the image below
  • Had a beer/coffee/tea because I did something cool today

What, why and how?

Solves #598, #618, #653, and #967 (the closed ones are closed with the workaround of removing strict mode).

React Strict Mode is recommended on production, DefaultLinkWidget was changing the component's state on render, which is not recommended by React. I refactored the component to use hooks, so now can be used with strict mode.

Feel good image:

LOL

@changeset-bot
Copy link

changeset-bot bot commented Aug 10, 2023

🦋 Changeset detected

Latest commit: 20766f5

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 5 packages
Name Type
@projectstorm/react-diagrams-defaults Patch
@projectstorm/react-diagrams-routing Patch
@projectstorm/react-diagrams Patch
@projectstorm/react-diagrams-gallery Patch
@projectstorm/react-diagrams-demo Patch

Not sure what this means? Click here to learn what changesets are.

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

@igorhaf
Copy link

igorhaf commented Sep 15, 2023

Hello @marian2js Could you help me? How would I include your fork into my project? I've tried several ways, pulling the npm from your git, but the library is not recognized in the code as a package.

@kale1d0code
Copy link

Hello @marian2js Could you help me? How would I include your fork into my project? I've tried several ways, pulling the npm from your git, but the library is not recognized in the code as a package.

Without having the pull request go through, I think the best way would be to use pnpm and copy all the code as packages within a monorepo.
or create new npm packages from the fork under a different name

@abhishek-doe
Copy link

Hello @marian2js Could you help me? How would I include your fork into my project? I've tried several ways, pulling the npm from your git, but the library is not recognized in the code as a package.

Without having the pull request go through, I think the best way would be to use pnpm and copy all the code as packages within a monorepo. or create new npm packages from the fork under a different name

can you help me about doing with the steps of doing it, I don't know much changeset and how do i use these in my library?

@ericlarssen
Copy link

@dylanvorster would it be possible to get this pr reviewed?

@dylanvorster
Copy link
Member

Sorry this took so long everyone, and thanks for the work on this PR :)

@dylanvorster dylanvorster merged commit 5045968 into projectstorm:master Feb 15, 2024
@ericlarssen
Copy link

Thanks so much!

@ericlarssen
Copy link

@dylanvorster I think this may have broken links altogether. Something must have changed when pulling in the newer versions of core and canvas in the same release.

@dylanvorster
Copy link
Member

I did check each PR on my own machine with storybook, lemme take another look

@dylanvorster
Copy link
Member

looks like the custom demos are broken, but the gallery (which is deployed automatically on release) seems to work, @ericlarssen can you elaborate a bit?

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.

6 participants