Skip to content

Commit b66211d

Browse files
committed
DOC-3147: Update split button tooltips and documentation
1 parent b3a9cdd commit b66211d

File tree

4 files changed

+40
-1
lines changed

4 files changed

+40
-1
lines changed

modules/ROOT/examples/live-demos/custom-toolbar-split-button/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ tinymce.init({
66
editor.ui.registry.addSplitButton('myButton', {
77
text: 'My Button',
88
icon: 'info',
9-
tooltip: 'This is an example split-button',
9+
tooltip: 'Execute my action',
10+
chevronTooltip: 'My Button menu options',
1011
onAction: () => editor.insertContent('<p>You clicked the main button</p>'),
1112
onItemAction: (api, value) => editor.insertContent(value),
1213
fetch: (callback) => {

modules/ROOT/pages/8.0-release-notes.adoc

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,11 @@ For information on using Enhanced Skins & Icon Packs, see: xref:enhanced-skins-a
104104

105105
// CCFR here.
106106

107+
=== Split button component architecture
108+
// #TINY-8665
109+
110+
Split buttons in {productname} {release-version} now render as two independent, focusable components instead of a single composite component. The main button handles primary actions while the chevron button controls dropdown functionality. This architectural change improves accessibility by providing separate focus targets and ARIA labels for each component. The `+setTooltip+` method has been enhanced to update both main and chevron button tooltips simultaneously.
111+
107112

108113
[[additions]]
109114
== Additions
@@ -115,6 +120,13 @@ For information on using Enhanced Skins & Icon Packs, see: xref:enhanced-skins-a
115120

116121
// CCFR here.
117122

123+
=== Split button tooltip configuration
124+
// #TINY-8665
125+
126+
The `+chevronTooltip+` property provides custom tooltip text for the chevron button portion of split buttons. When `+chevronTooltip+` is not specified, {productname} automatically generates tooltip text using the pattern `+"{tooltip} menu"+`. The enhanced `+setTooltip+` method intelligently updates both main and chevron tooltips to maintain consistency.
127+
128+
For more information, see xref:custom-split-toolbar-button.adoc[Split toolbar buttons].
129+
118130

119131
[[changes]]
120132
== Changes
@@ -126,6 +138,11 @@ For information on using Enhanced Skins & Icon Packs, see: xref:enhanced-skins-a
126138

127139
// CCFR here.
128140

141+
=== Split button DOM structure changes
142+
// #TINY-8665
143+
144+
The internal DOM structure of split buttons has been updated to support the new component architecture. Split button components now use `+.tox-split-button__main+` and `+.tox-split-button__chevron+` CSS classes instead of the previous composite structure. Each component renders as a separate DOM element with independent event handling and focus management. Custom CSS targeting split button internals may require updates to accommodate the new structure.
145+
129146

130147
[[removed]]
131148
== Removed

modules/ROOT/pages/creating-a-skin.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ _Do not edit these files directly_. Instead, use them as references when creatin
6767
* `+modules/oxide/src/less/theme/components/toolbar-button/toolbar-button.less+`
6868
6969
The typical workflow involves copying variables from the theme folder into the skins `skin.less` file and modifying them as needed.
70+
71+
NOTE: As of {productname} 8.0, split buttons use `.tox-split-button__main` and `.tox-split-button__chevron` CSS classes. If your skin targets split button components, you may need to update your CSS selectors.
7072
====
7173

7274
[NOTE]

modules/ROOT/pages/custom-split-toolbar-button.adoc

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ A split button contains a basic button and a menu button, wrapped up into one to
1313
|text |string |Primary button |optional |Text displayed if no icon is found.
1414
|icon |string |Primary button |optional |
1515
include::partial$misc/admon-predefined-icons-only.adoc[]
16+
|tooltip |string |Primary button |optional |Text displayed when hovering over the main button. If `+chevronTooltip+` is not provided, this will be used to auto-generate the chevron tooltip as `+"{tooltip} menu"+`.
17+
|chevronTooltip |string |Chevron button |optional |Text displayed when hovering over the chevron button. If not provided, auto-generates as `+"{tooltip} menu"+`.
1618
|onAction |`+(api) => void+` |Primary button |required |Function invoked when the basic button section is clicked.
1719
|select |`+(value: string) => boolean+` |Choice menu items |optional |default: `false` - Function run on each option when the menu is opened to determine if it should be highlighted as active.
1820
|columns |number or `+'auto'+` |Drop-down menu |optional |default: `1` - Number of columns for the list of options. When set to more than 1 column, only the icon for each item will be shown.
@@ -35,6 +37,7 @@ include::partial$misc/admon-predefined-icons-only.adoc[]
3537
3+|
3638
|setText |`+(text: string) => void+` |Sets the text label to display.
3739
|setIcon |`+(icon: string) => void+` |Sets the icon of the button.
40+
|setTooltip |`+(tooltip: string) => void+` |Sets the main button tooltip and auto-updates the chevron tooltip.
3841
|===
3942

4043
[[split-button-example-and-explanation]]
@@ -52,4 +55,20 @@ The `+fetch+` function is called whenever the split button's drop-down menu is o
5255

5356
include::partial$components/choice-menu-items.adoc[]
5457

58+
== CSS Classes
59+
60+
As of {productname} 8.0, split buttons render as two separate components:
61+
62+
* `.tox-split-button__main` - Main action button
63+
* `.tox-split-button__chevron` - Dropdown chevron button
64+
65+
If you have custom CSS targeting split button internals, you may need to update your selectors.
66+
67+
[source,css]
68+
----
69+
/* TinyMCE 8.0+ */
70+
.tox-split-button__main
71+
.tox-split-button__chevron
72+
----
73+
5574
include::partial$misc/onSetup.adoc[]

0 commit comments

Comments
 (0)