Is your feature request related to a problem? Please describe.
I have Javascript that is added to the page which will activate a tab during specific instances. I do this by scanning the tab buttons in the tab bar and checking the label of each one to know which one to activate, however, an issue has popped up where someone is using a translation extension that swaps out the labels on the buttons and that breaks the functionality I was using to find the tab button.
Describe the solution you'd like
If we were able to add an id, class, or attribute to the tab's button I could then use that to find the correct button instead of a string compare on the label.
Example:
with gr.Tab(
my_tab_label,
elem_id=f"my_tab_id",
elem_classes="my_tab_class",
btn_id=f"my_tabs_btn_id",
btn_classes="my_tabs_btn_class"
):
I'm hesitant to add two separate parameters. However, what if we were to automatically set the btn id to be "{elem_id}-btn", allowing you to target it directly?
Is your feature request related to a problem? Please describe.
I have Javascript that is added to the page which will activate a tab during specific instances. I do this by scanning the tab buttons in the tab bar and checking the label of each one to know which one to activate, however, an issue has popped up where someone is using a translation extension that swaps out the labels on the buttons and that breaks the functionality I was using to find the tab button.
Describe the solution you'd like
If we were able to add an id, class, or attribute to the tab's button I could then use that to find the correct button instead of a string compare on the label.
Example:
Would result in: