openownership / visualisation-tool

A visualisation library for beneficial ownership structures
https://www.openownership.org/en/publications/beneficial-ownership-visualisation-system/bods-data-visualiser/
Apache License 2.0
19 stars 4 forks source link

If possible, make `.label` selector used in line 230 of index.js less generic as it can find elements outside of the bods visualizer DOM nodes. #134

Closed andrewShillito closed 1 year ago

andrewShillito commented 1 year ago

https://github.com/openownership/visualisation-tool/blob/a6225e964d39ccedfb9acfa59764a2bafdb10740/src/index.js#L230

Background:

StephenAbbott commented 1 year ago

Thanks for posting this issue, @andrewShillito. I'll check in with our team on this

andrewShillito commented 1 year ago

@StephenAbbott Thank you! Sounds good.

codemacabre commented 1 year ago

I've increased the specificity to include the labels' parent classes, which will prevent unexpected .label elements being selected: https://github.com/openownership/visualisation-tool/blob/180e1fdec5920fbf86111f2ec56fa8b5cb23acea/src/index.js#L230

andrewShillito commented 1 year ago

Looks good and thank you.