René's URL Explorer Experiment


Title: Improve 'relink private keys' steps · Issue #749 · plotly/plotly.js · GitHub

Open Graph Title: Improve 'relink private keys' steps · Issue #749 · plotly/plotly.js

X Title: Improve 'relink private keys' steps · Issue #749 · plotly/plotly.js

Description: Synopsis At the moment, during Plots.supplyDefaults we loop over all keys found in the old trace and layout containers in order to relink all private keys not set during the defaults step in the new trace and layout containers (remember,...

Open Graph Description: Synopsis At the moment, during Plots.supplyDefaults we loop over all keys found in the old trace and layout containers in order to relink all private keys not set during the defaults step in the ne...

X Description: Synopsis At the moment, during Plots.supplyDefaults we loop over all keys found in the old trace and layout containers in order to relink all private keys not set during the defaults step in the ne...

Opengraph URL: https://github.com/plotly/plotly.js/issues/749

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Improve 'relink private keys' steps","articleBody":"### Synopsis\r\n\r\nAt the moment, during `Plots.supplyDefaults` we loop over all keys found in the _old_ trace and layout containers in order to _relink_ all _private keys_ **not set** during the defaults step in the new trace and layout containers (remember, `fullData` and `fullLayout` start as empty `[]` and `{}` respectively in every `Plots.supplyDefaults` call).\r\n\r\nThese _private keys_ are linked to subplot instances (e.g `fullLayout.scene._scene`), computed values (e.g. `fullLayout.xaxis._m`), graph svg selections (e.g. `fullLayout._infolayer`) etc ...\r\n### In brief\r\n\r\nLooping over all keys is dumb, slow and hard to maintain ; we can do better!\r\n### Observations\r\n\r\nNot relinking private keys in trace objects results in:\r\n- geo trace visibility toggle not functioning (`_module` isn't defined anymore for `visible: false` traces)\r\n- contour restyle not working as `trace._emptypoints` isn't relinked\r\n\r\nNot relinking array container results in:\r\n- annotations not behaving correctly on zoom -\u003e double-click interactions\r\n### Possible solution\r\n\r\nMake the trace and base plot module (and possibly the component module) `clean` method relink the _sticky_ keys that need to be relinked during `Plots.supplyDefaults`.  This would make the `clean` methods handle all old container --\u003e new container logic in one go.\r\n\r\nFor example, most base plot modules have a  `clean` method that looks like:\r\n\r\n``` js\r\noldSubplotIds.forEach((id) =\u003e {\r\n  if(!newFullLayout[id]._subplot \u0026\u0026 !!oldFullLayout[id]._subplot) {\r\n     oldFullLayout[id]._subplot.destroy();\r\n     return;\r\n  }\r\n\r\n  // it would be then be easy to relink the active subplot objects here\r\n  newFullLayout[id]._subplot = oldFullLayout[id]._subplot;\r\n});\r\n```\r\n\r\nIt might be convenient to put private keys generated in [`makePlotFramework`](https://github.com/plotly/plotly.js/blob/7ae437bbbb81ec1f49fee7145fc796d64e688bc6/src/plot_api/plot_api.js#L2592) under one object in fullLayout (e.g  `fullLayout_base._toppaper`) to keep track of private keys more easily. \r\n","author":{"url":"https://github.com/etpinard","@type":"Person","name":"etpinard"},"datePublished":"2016-07-18T19:16:05.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/749/plotly.js/issues/749"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:d6639558-2718-ffad-9c0d-9539dd07205b
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idE11E:CD74F:4A06C57:685E3C7:6A56F70C
html-safe-nonce6976e6447bd06fefc06bf5100e52a61668a524f87cc67d8fffa5485f0f25f481
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMTFFOkNENzRGOjRBMDZDNTc6Njg1RTNDNzo2QTU2RjcwQyIsInZpc2l0b3JfaWQiOiI1MDU3MDgzMDQwODYzODExMzQwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac6ab6367d697107ba60244ecea42a990247c7f462dd0cbe2abf6d47944a913e02
hovercard-subject-tagissue:166170875
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/plotly/plotly.js/749/issue_layout
twitter:imagehttps://opengraph.githubassets.com/88d4cccb148c7d57090310288db4750ef7cc79a2bdbb8f2c48b1540df1819e21/plotly/plotly.js/issues/749
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/88d4cccb148c7d57090310288db4750ef7cc79a2bdbb8f2c48b1540df1819e21/plotly/plotly.js/issues/749
og:image:altSynopsis At the moment, during Plots.supplyDefaults we loop over all keys found in the old trace and layout containers in order to relink all private keys not set during the defaults step in the ne...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameetpinard
hostnamegithub.com
expected-hostnamegithub.com
None4eb29e5f807bd95e41196adfbc6d28f9af12d89830d8b684f3e871774ddff2fc
turbo-cache-controlno-preview
go-importgithub.com/plotly/plotly.js git https://github.com/plotly/plotly.js.git
octolytics-dimension-user_id5997976
octolytics-dimension-user_loginplotly
octolytics-dimension-repository_id45646037
octolytics-dimension-repository_nwoplotly/plotly.js
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id45646037
octolytics-dimension-repository_network_root_nwoplotly/plotly.js
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releaseb056788a129fb0194b61f2ebb4c43f6a9f4dfd27
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/plotly/plotly.js/issues/749#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fplotly%2Fplotly.js%2Fissues%2F749
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fplotly%2Fplotly.js%2Fissues%2F749
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=plotly%2Fplotly.js
Reloadhttps://github.com/plotly/plotly.js/issues/749
Reloadhttps://github.com/plotly/plotly.js/issues/749
Reloadhttps://github.com/plotly/plotly.js/issues/749
Please reload this pagehttps://github.com/plotly/plotly.js/issues/749
plotly https://github.com/plotly
plotly.jshttps://github.com/plotly/plotly.js
Please reload this pagehttps://github.com/plotly/plotly.js/issues/749
Notifications https://github.com/login?return_to=%2Fplotly%2Fplotly.js
Fork 2k https://github.com/login?return_to=%2Fplotly%2Fplotly.js
Star 18.3k https://github.com/login?return_to=%2Fplotly%2Fplotly.js
Code https://github.com/plotly/plotly.js
Issues 772 https://github.com/plotly/plotly.js/issues
Pull requests 58 https://github.com/plotly/plotly.js/pulls
Actions https://github.com/plotly/plotly.js/actions
Security and quality 0 https://github.com/plotly/plotly.js/security
Insights https://github.com/plotly/plotly.js/pulse
Code https://github.com/plotly/plotly.js
Issues https://github.com/plotly/plotly.js/issues
Pull requests https://github.com/plotly/plotly.js/pulls
Actions https://github.com/plotly/plotly.js/actions
Security and quality https://github.com/plotly/plotly.js/security
Insights https://github.com/plotly/plotly.js/pulse
Improve 'relink private keys' stepshttps://github.com/plotly/plotly.js/issues/749#top
https://github.com/etpinard
etpinardhttps://github.com/etpinard
on Jul 18, 2016https://github.com/plotly/plotly.js/issues/749#issue-166170875
makePlotFrameworkhttps://github.com/plotly/plotly.js/blob/7ae437bbbb81ec1f49fee7145fc796d64e688bc6/src/plot_api/plot_api.js#L2592
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.