Add css_id parameter to Viewable components#7617
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #7617 +/- ##
==========================================
+ Coverage 81.83% 86.75% +4.92%
==========================================
Files 341 341
Lines 51661 51688 +27
==========================================
+ Hits 42275 44843 +2568
+ Misses 9386 6845 -2541 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
How about |
|
Or element_id? |
|
Is it the case that CSS framework refer to this as "id"? In that case css_element_id might be the most appropriate. I wonder if element_id might be confusing, or if, in future, some_other_thing_element_id might be a useful name, in which case element_id could become confusing. Am I correcting in assuming the css element (with a unique id) would be available to all components (but not necessarily applied to all components)? Would it be useful if the documentation contained code that shows how to list what components are using the CSS element? And what CSS elements a particular component uses? |
|
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
While we probably want to eventually expose this at the Bokeh level, adding an ID on the DOM nodes that correspond to Panel components is a useful way of referencing individual components for testing and when trying to look up a component. This PR implements this via
tags, i.e. when ancss_idis set this is added as an item in thetagsproperty of the Model. On Document initialization on the frontend thecss_idis then applied.