-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Toolbox-custom-order #14759
Toolbox-custom-order #14759
Conversation
2f10d97
to
357ee29
Compare
357ee29
to
003e3f5
Compare
@@ -440,6 +440,7 @@ export interface IConfig { | |||
}; | |||
localSubject?: string; | |||
locationURL?: URL; | |||
mainToolbarButtons?: Array<Array<ToolbarButton | string>>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Won't it always be an array of strings?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally yes, since ToolbarButton is ultimately a string. But when we add the ToolbarButton type this can improve the autocomplete in the IDE, you get some suggestions from ToolbarButton type. In addition it looks a little but clearer to me because it shows that you can put our stock buttons or a custom one (which is represented by | string
).
If you don't like it I don't mind removing the ToolbarButton
part tho.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please do, since it doesn't match the actual config.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
if (isHangupVisible) { | ||
sliceIndex -= 1; | ||
} | ||
// if we have 1 button in the overflow menu it is better to directly display it in the main toolbar by replacing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
003e3f5
to
718579d
Compare
As part of the PR, it also fixes: - Removes button aliases - Unifies the keys in the object returned by getAllToolboxButtons and the button keys - Makes sure that the number of buttons displayed are always the same as the number of buttons specified in the thresholds and removes the exception for not filling up the main toolbar with buttons from overflow menu when reactions button is disabled. - Introduces a priority for buttons that will be used to fill empty spaces in the main toolbar.
718579d
to
fa708c2
Compare
As part of the PR, it also fixes: