experimenter icon indicating copy to clipboard operation
experimenter copied to clipboard

Invalid element IDs used in nimbus-ui

Open jaredlockhart opened this issue 3 years ago • 5 comments

I just noticed on the branch page we have a bunch of element IDs that aren't queryable without special escaping ie

Normal document query returns null:

document.querySelector('#referenceBranch.featureEnabled')
null

Same query with \\ escape returns input as expected:

document.querySelector('#referenceBranch\\.featureEnabled')
<input id="referenceBranch.featureEnabled" class="custom-control-input" data-testid="referenceBranch.featureEnabled" name="referenceBranch.featureEnabled" type="checkbox">

Querying the 0th treatment branch gives an exception:

document.querySelector('#treatmentBranches[0].featureEnabled')
Uncaught DOMException: Document.querySelector: '#treatmentBranches[0].featureEnabled' is not a valid selector

We should probably be using - instead of [] or .

┆Issue is synchronized with this Jira Task

jaredlockhart avatar Dec 14 '21 16:12 jaredlockhart

I'd like to get started on this, but I'm a beginner. Could you please point me in the right direction?

purna135 avatar Feb 24 '22 06:02 purna135

Hi @purna135! Are you still interested in trying this?

eliserichards avatar Oct 05 '22 20:10 eliserichards

Hi @eliserichards It will be a pleasure for me to try this.

purna135 avatar Oct 05 '22 21:10 purna135

Wonderful! I will assign you to this issue. Take a look at how to query documents. I updated the description to make it a little clearer

eliserichards avatar Oct 10 '22 16:10 eliserichards

Hey @eliserichards! I'd like to take this issue, any beginner pointers on where to change?

nox1134 avatar Nov 08 '23 06:11 nox1134