Skip to content

Create randomPollOrder.js#39

Open
msgoings wants to merge 3 commits into
masterfrom
msgoings-patch-1
Open

Create randomPollOrder.js#39
msgoings wants to merge 3 commits into
masterfrom
msgoings-patch-1

Conversation

@msgoings

Copy link
Copy Markdown
Contributor

Reorders multi-choice polls in a random order in an attempt to avoid bias

Reorders multi-choice polls in a random order in an attempt to avoid bias
Updating vars to const/let
Swapping const for let to avoid repeated console errors in VDS

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a new guide snippet intended to randomize the display order of multi-choice poll options to reduce ordering bias.

Changes:

  • Introduces randomPollOrder.js to generate a randomized option order.
  • Applies DOM reordering to the poll’s option container.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +1 to +5
let pollWrapper=document.querySelector("[id^='pendo-radio-select-']");
let pollChildren=pollWrapper.children;
let childCount = pollChildren.length-1;
let pollNewOrder=[];
for(let n=0;n<childCount;n++){
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