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

Consolidate calls to createPlotlyComponent #1548

Merged
merged 3 commits into from
Feb 4, 2025

Conversation

nickgros
Copy link
Collaborator

@nickgros nickgros commented Feb 3, 2025

Some bundlers (like esbuild) do not produce expected output when bundling react-plotly.js/factory (I think it has unusual CJS syntax). I consolidated usage of this to one module to simplify debugging, but it's a generally-useful refactor.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Component is no longer used.

Some bundlers (like esbuild) do not produce expected output when bundling react-plotly.js/factory (I think it has unusual CJS syntax). I consolidated usage of this to one module to simplify debugging, but it's a generally-useful refactor.
import rawData from '../../mocks/distribution_data.json'
import Plotly from 'plotly.js-basic-dist'

const meta = {
title: 'Components/PlotlyWrapper',
component: PlotlyWrapper,
title: 'Components/PlotlyPlot',
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Update story to just use the Plot component instead of the unused PlotlyWrapper component

@@ -143,7 +142,6 @@ const SynapseComponents = {
displayToast,
IconSvg,
UserProfileLinks,
PlotlyWrapper,
Copy link
Member

@jay-hodgson jay-hodgson Feb 4, 2025

Choose a reason for hiding this comment

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

I think we ran a POC with utilizing this in Agora at one point, but I think Agora is only using SRC for rendering Synapse Wikis now (@sagely1 or @hallieswan , could you confirm?)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

A search in Sage-Bionetworks/sage-monorepo tells me that no projects there, including Agora, are currently using synapse-react-client.

@nickgros nickgros merged commit 68c2bba into Sage-Bionetworks:main Feb 4, 2025
24 checks passed
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.

2 participants