Skip to content

Fix _template leak in layout rangeslider options - #8229

Closed
abdulhamid999 wants to merge 3 commits into
plotly:mainfrom
abdulhamid999:fix/rangeslider-layout-template-6310
Closed

abdulhamid999 wants to merge 3 commits into
plotly:mainfrom
abdulhamid999:fix/rangeslider-layout-template-6310

Conversation

@abdulhamid999

Copy link
Copy Markdown

Description

Remove internal _template property before copying full-layout rangeslider axis options into user layout. In doAutoRange, �nchorAx.rangeslider[ax._name] holds _template from Template.newContainer on _fullLayout, so copying _template into �nchorAx._input.rangeslider[ax._name] wrote non-attribute _template into gd.layout.xaxis.rangeslider. This change clones �xeRangeOpts, deletes _template from the copy, and assigns �nchorAx._input.rangeslider[ax._name] only when �xeRangeOpts exists.

Closes #6310

🐦

Changes

  • Delete _template from the copied rangeslider axis options in doAutoRange inside src/plots/cartesian/autorange.js, leaving _fullLayout intact
  • Add a Jasmine regression test in est/jasmine/tests/range_slider_test.js covering plots with no template, plots with a template, and Plotly.relayout
  • Add a bug-fix draftlog entry under draftlogs/

Testing

pm run lint: passed across 2,699 files

pm run typecheck: passed with 0 errors

pm run schema-typegen-diff-check: passed with 0 schema drift

pm run test-jasmine -- range_slider template axes --nowatch on Windows Chrome: 476 passed and 10 failed (the same 6 pre-existing pixel-coordinate slider drag tests fail on upstream/main, plus 4 Windows font-metric �xes assertions; the new regression test and all emplate specs passed)

  • Verified doAutoRange directly in Node (esbuild bundle) for non-template, template,
    angemode: 'auto', and missing-option cases

Checklist

  • The linked issue has the
    eady-for-pr label, and it has no assignee or lists me as an assignee
  • I opened the pull request from a branch other than main in my fork
  • I selected "Allow edits from maintainers"
  • I did not edit files in dist/
  • I committed package-lock.json only for a dependency change
  • I added a file to draftlogs/ as draftlogs/README.md describes, or I will add one after the pull request opens

abdulhamid999 added a commit to abdulhamid999/open-source-contributions that referenced this pull request Dec 4, 2026
@camdecoster

Copy link
Copy Markdown
Contributor

I'm closing this PR because it isn't following our contribution process. Every new PR needs to be reviewed by a human before posting.

@camdecoster camdecoster closed this Dec 4, 2026
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.

rangeslider template bug (non-attribute inserted into layout instead of fullLayout)

2 participants