Skip to content

Conversation

@vishal2005025
Copy link

📝 Description:

This PR adds support for dynamically setting the toolbar background color through the IFrame API, improving customizability for embedded integrations.

🚀 Changes Introduced:

  • Added a new IFrame API command:
    api.executeCommand('setToolbarBackgroundColor', '#ff0000');

@jitsi-jenkins
Copy link

Hi, thanks for your contribution!
If you haven't already done so, could you please make sure you sign our CLA (https://jitsi.org/icla for individuals and https://jitsi.org/ccla for corporations)? We would unfortunately be unable to merge your patch unless we have that piece :(.

@damencho
Copy link
Member

There is no point of having a special command for this when you can use overwriteConfig command or you can pass it as a configOverwrite when initializing the iframAPI.
You added backgroundColor to toolbarConfig in config type, but you missed adding it to the config.js file where we put all configs with the default values they are initialized:

// toolbarConfig: {

When adding a config, that should be implemented for both web and mobile.
Drop the not relevant changes as the gitignore one.

@vishal2005025
Copy link
Author

Got it, thanks for the clarification!
I’ll switch to using overwriteConfig instead of adding a new command and make sure backgroundColor is added to config.js with proper defaults for both web and mobile.
Also dropping the unnecessary .gitignore change.
I’ll update the PR shortly!

@vishal2005025
Copy link
Author

Updated the implementation to use configOverwrite for toolbar background color on web and mobile. Previous review comments have been addressed - please review.

config.js Outdated
// autoHideWhileChatIsOpen: false,
// },
// Holds values related to toolbar visibility control.
toolbarConfig: {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't uncomment this, leave it commented out, reflecting the defaults.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for pointing that out! I’ve fixed it- it’s now left commented out as per the defaults.

@vishal2005025 vishal2005025 requested a review from saghul October 28, 2025 10:36
config.js Outdated
// // Indicates whether the toolbar should still autohide when chat is open
// autoHideWhileChatIsOpen: false,
// // Default background color for the main toolbar. Accepts any valid CSS color.
// // backgroundColor: '#ffffff'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a trailing comma please.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I have added the trailing comma as suggested

@vishal2005025 vishal2005025 requested a review from saghul October 28, 2025 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants