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 server side rendering bugs, update dependencies to work with Vite and NextJS #1508

Closed
wants to merge 18 commits into from

Conversation

vladimir-mck
Copy link
Contributor

@vladimir-mck vladimir-mck commented Aug 29, 2023

Description

Resolves #1293 and #1504

Development notes

This pull request addresses several JavaScript issues, enhancing the compatibility of Kedro-Viz when integrated with Svelte and Next.js. Although the JS-related errors have been resolved, it's worth noting that there are ongoing CSS-related errors. This CSS issue will be tackled in an upcoming PR.

  • Enhanced worker functionality to incorporate a mock when used for server-side rendering.
  • Updated Apollo configuration to ensure WebSocket connections exclusively on the client side.
  • Replaced lodash. dependencies with lodash to ensure compatibility with both Next.js and Vite.
  • Upgraded Plotly to a newer version to fix errors experienced in both Vite and Next.js environments.

Vite:
Screenshot 2023-08-29 at 13 17 24
Screenshot 2023-08-29 at 13 17 34

QA notes

Create a new project with Vite:

  • npm create vite@latest my-react-app --template react
  • install kedro-viz alpha version npm i @quantumblack/[email protected]
  • add the component and data to it.

Checklist

  • Read the contributing guidelines
  • Opened this PR as a 'Draft Pull Request' if it is work-in-progress
  • Updated the documentation to reflect the code changes
  • Added new entries to the RELEASE.md file
  • Added tests to cover my changes

vladimir-mck and others added 18 commits August 30, 2023 13:30
Signed-off-by: Vladimir <[email protected]>
Signed-off-by: Vladimir <[email protected]>
Signed-off-by: Vladimir <[email protected]>
Signed-off-by: Vladimir <[email protected]>
Signed-off-by: Vladimir <[email protected]>
Signed-off-by: Vladimir <[email protected]>
Signed-off-by: Jo Stichbury <[email protected]>
Signed-off-by: Vladimir <[email protected]>
* Fix to search for a '<lambda' Python function in the sidebar

* Fix for failed test cases

* Variable name updated

---------

Co-authored-by: Tynan DeBold <[email protected]>
Signed-off-by: Vladimir <[email protected]>
…1499)

* add stats to data node

* lint and format check fix

* fix pytests

* fix layout issue

* fix transcoded data stats

Signed-off-by: Vladimir <[email protected]>
Signed-off-by: Vladimir <[email protected]>
@vladimir-mck vladimir-mck force-pushed the bugfix/1293-SSR-bug branch 2 times, most recently from 79ad120 to 39b0c87 Compare August 30, 2023 11:47
@vladimir-mck
Copy link
Contributor Author

Closing this PR because it got messed up after merging and signing-off

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.

Importing Kedro-Viz React-Component in Svelte
4 participants