Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use CSS-safe IDs in generated HTML #12902

Merged
merged 2 commits into from Mar 18, 2023
Merged

Conversation

mattpap
Copy link
Contributor

@mattpap mattpap commented Mar 5, 2023

Use safe IDs only in places where they actually are used in HTML, so that APIs like document.querySelector("#id") can work. Note that one can always use document.getElementById(id), which doesn't care about such limitations.

fixes #10547
fixes #12905

@mattpap mattpap added this to the 3.2 milestone Mar 5, 2023
@codecov
Copy link

codecov bot commented Mar 5, 2023

Codecov Report

Merging #12902 (67f68f6) into branch-3.2 (00fd457) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@             Coverage Diff             @@
##           branch-3.2   #12902   +/-   ##
===========================================
  Coverage       92.36%   92.36%           
===========================================
  Files             315      315           
  Lines           19962    19969    +7     
===========================================
+ Hits            18437    18444    +7     
  Misses           1525     1525           

@mattpap mattpap force-pushed the mattpap/10547_css_safe_ids branch from b6c5e5c to 566aca3 Compare March 5, 2023 14:05
@mattpap mattpap requested a review from bryevdv March 17, 2023 09:36
@mattpap mattpap merged commit 2b15751 into branch-3.2 Mar 18, 2023
27 checks passed
@mattpap mattpap deleted the mattpap/10547_css_safe_ids branch March 18, 2023 20:22
bryevdv pushed a commit that referenced this pull request Apr 27, 2023
* Use CSS-safe IDs in generated HTML

* Generate DOM elements with unique IDs in load_notebook()
@bryevdv bryevdv mentioned this pull request Apr 27, 2023
@bryevdv bryevdv modified the milestones: 3.2, 3.1.1 May 2, 2023
mattpap added a commit that referenced this pull request May 4, 2023
* Fix tiny error in doc code-block (#12973)

* Add a ref for LegendLocation (#12939)

* Temporarily disable docker_from_wheel test in CI (#12963)

* Update In-kind sponsors list (#13054)

* Update In-kind sponsors list

* Update README.md

* Update first_steps_1.rst (#13084)

* Update first_steps_1.rst

* Update docs/bokeh/source/docs/first_steps/first_steps_1.rst

Co-authored-by: Timo Cornelius Metzger <39711796+tcmetzger@users.noreply.github.com>

* Update first_steps_1.rst

Made the changes suggested!

* Update docs/bokeh/source/docs/first_steps/first_steps_1.rst

Co-authored-by: Bryan Van de Ven <bryan@bokeh.org>

* Update first_steps_1.rst

Follow up edits

---------

Co-authored-by: Timo Cornelius Metzger <39711796+tcmetzger@users.noreply.github.com>
Co-authored-by: Bryan Van de Ven <bryan@bokeh.org>

* Allow `static/` symlinks in `BOKEH_ACTION=install pip install -e .` (#13065)

* Disable user select globally when dragging slider handles (#13082)

* Add tests for custom arrayable functions (#12892)

* Add tests for custom arrayable functions

* add more tests for arrayable

* fix ESLint error

* fix another ESLint error

* List installed software and versions in CI (#12899)

* List installed software in CI

* Don't require npm@8, install most recent one

* Allow to correctly sort international strings in DataTable (#12900)

* Don't assign model's name to HTMLElement.name (#12901)

* Use CSS-safe IDs in generated HTML (#12902)

* Use CSS-safe IDs in generated HTML

* Generate DOM elements with unique IDs in load_notebook()

* Don't double stroke in diagonal hatch patterns (#12903)

* Add bokehjs example for grid band patterns

* Don't double stroke in diagonal hatch patterns

* Update visual baselines

* updated commands with correct links to executable (#12910)

changed examples/app/slider.py to examples/server/app/sliders.py 

transform_markers.py is updated here but shows as marker_map here
https://docs.bokeh.org/en/latest/docs/dev_guide/setup.html

* Copy files if symlinking fails in 'pack' build task (#12928)

* Document lack of serialization support for decimal.Decimal under Serializer class (#12935)

* Add message in Serializer docstring addressing lack of support for decimal.Decimal.

* Remove trailing whitespace

* Remove trailing whitespace

* Delete test file

* Upload latest docs more cleanly (#12955)

* Upload latest docs more cleanly

* Missing return type

* Check for git tags before build (#12962)

* Check for git tags during build

* Update setup.py

Co-authored-by: Mateusz Paprocki <mattpap@gmail.com>

---------

Co-authored-by: Mateusz Paprocki <mattpap@gmail.com>

* Added troubleshooting for issue #13001 (#13002)

* Added troubleshooting for issue #13001

* update

* updated ReadMe file of examples folder (#13066)

* updated ReadMe file of examples folder

* Update examples/README.md

Co-authored-by: Bryan Van de Ven <bryan@bokeh.org>

* Update examples/README.md

Co-authored-by: Bryan Van de Ven <bryan@bokeh.org>

* Update examples/README.md

Co-authored-by: Bryan Van de Ven <bryan@bokeh.org>

* removed intergration section from readme

* added linebreaks

* fixed widespace issues

* trimmed trailing widespace

---------

Co-authored-by: Bryan Van de Ven <bryan@bokeh.org>

* Fix race conditions related to layout resize and updates (#13100)

* Fix a race condition between plot and canvas resize

* Ignore child model/view state inconsistencies for now

* Notify ready after render and layout is done

* Add a regression test for issue #13104

* manual eslint patch

* Make autocompleteinput.py example work with Pandas 2.0 (#13057)

* fix baseline

* Added metadata to line_on_off.py (#13003)

* Added metadata to line_on_off.py

* update

* update

* update

* update

* Tile source metadata (#13026)

* added accessible color palette

* Delete latex_schrodinger.png

* Delete latex_schrodinger@2x.png

* Add new thumbnails for updated palette

* Add metadata to text.py

* Revert changes from ths branch

* Update tile_source.py

* fix consistency & linter issues

* fix broken docs refs (#13086)

* fix broken docs refs

* pin sphinx to 5.3

* sphinx pin for 3.8

* Use libmamba solver in CI (#13061)

* Use libmamba solver in CI

* Disable "Post prepare environment" on Windows

* Correctly resolve custom host and port with server resources (#13041)

* Correctly resolve custom host and port with server resources

* Use pathlib.Path instead of a comment

* Fix argument types in _bundle_extensions()

* Remove support for BaseResources

* Add a release note

* Add support for Resources.clone()

* Include settings.dev in Resources.dev

Allows to specify:

BOKEH_DEV=true BOKEH_RESOURCES=server python ...

instead of:

BOKEH_DEV=true BOKEH_RESOURCES=server-dev python ...

* Fix `MultiRootStaticHandler` after PR #13041 (#13070)

* Fix MultiRootStaticHandler after PR #13041

* Work around unawaited async function calls

* Fix bokeh.sphinxext.util after PR #13041 (#13062)

* Increase the number of iterations in CSS safe ID generator (#13035)

* Add dropdowns to contributor docs troubleshooting (#13009)

* Simpler WebGL line shaders (#13039)

* Simplify webgl line shaders

* Update baseline images

* Add new image tests

* Add Path.is_relative_to() polyfill for Python 3.8

* [BUG] Fix broken link to tools guide (#13109)

* [BUG] Fix broken link to tools guide

#13108

* [BUG] Fix broken link to tools guide

#13108

---------

Co-authored-by: Ian Thomas <ianthomas23@gmail.com>
Co-authored-by: Timo Cornelius Metzger <39711796+tcmetzger@users.noreply.github.com>
Co-authored-by: Victoria Adesoba <victoria@makepath.com>
Co-authored-by: Mateusz Paprocki <mattpap@gmail.com>
Co-authored-by: Timon Jurschitsch <103483059+DerTimonius@users.noreply.github.com>
Co-authored-by: Sooter Saalu <53571625+Soot3@users.noreply.github.com>
Co-authored-by: Ben Russell <bprussell80@protonmail.com>
Co-authored-by: Azaya <99359668+Azaya89@users.noreply.github.com>
Co-authored-by: Medhavi Singh <78318301+Med16-11@users.noreply.github.com>
Co-authored-by: Chinmay <chinmay.cc.06@gmail.com>
Co-authored-by: Kshitiz Gupta <Kshitiz305@live.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants