Skip to content

Conversation

@MisRob
Copy link
Member

@MisRob MisRob commented Nov 4, 2025

Background

Kolibri expects KToolbar to accept theme color via textColor, such as here, but KToolbar was only able to work with two hardcoded colors 'black' and 'white'.

We recently added validators to KToolbar reflecting this restriction that now cause Kolibri console warnings:

Rather than reverting the validators, this PR addresses the issue by resolving the underlying problem of the unmet expectation for KToolbar to be themeable.

Description

Makes KToolbar themeable and cleans up unused or not functional code (this was easier than trying to update all intertwined logic related to colors, and is aligned with Keen tech debt removal).

First, I audited our codebases with this search, then update in such a way that should cause no breaking changes. Some removed APIs are used from Kolibri, but they are all obsolete code that don't seem to take effect - see review notes for details.

Also adds visual tests and has documentation fixes and further improvements.

Changelog

TBD

Steps to test

  1. Did I remove/change something that shouldn't be?
  2. Preview documentation
  3. Preview visual tests

- Make it themeable
- Remove unused logic
- Remove Keen dependencies
- Bugfixes
- Add visual tests
- Update documentation
/**
* Controls the toolbar appearance and styling. Options are:
* - 'default': Standard white background with shadow
* - 'colored': Uses theme primary color as background
Copy link
Member Author

Choose a reason for hiding this comment

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

'colored' option removed. Background color can be customized via the backgroundColor prop if future need arises.

Audit

Not used from anywhere.

* Controls the text color throughout the toolbar. Use 'white' for dark backgrounds
* and 'black' for light backgrounds to ensure proper contrast.
*/
textColor: {
Copy link
Member Author

Choose a reason for hiding this comment

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

'black' and 'white' restriction removed. Now accepts all values, including our theme.

/**
* Whether to hide the navigation icon button completely
*/
removeNavIcon: {
Copy link
Member Author

Choose a reason for hiding this comment

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

Removed.

Audit

/**
* Icon name displayed in the navigation button when using the default icon slot
*/
navIcon: {
Copy link
Member Author

Choose a reason for hiding this comment

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

Removed (utilized obsolete UiIconButton).

Audit

  • Not used from anywhere (we always use the #icon slot since we need granular KIconButton configuration)

/**
* Whether to show the loading progress indicator
*/
loading: {
Copy link
Member Author

Choose a reason for hiding this comment

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

Removed. If we need KToolbar to have API for linear loading progress in the future, it'd be better to utilize KLinearLoader and expose APIs that are meaningful.

Audit

  • Not used from anywhere

/**
* Position of the loading progress bar indicator. Options are 'top' or 'bottom'.
*/
progressPosition: {
Copy link
Member Author

Choose a reason for hiding this comment

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

Removed. If we need KToolbar to have API for linear loading progress in the future, it'd be better to utilize KLinearLoader and expose APIs that are meaningful.

Audit

  • Not used from anywhere

* Emitted when the navigation icon is clicked
* @event nav-icon-click
*/
this.$emit('nav-icon-click');
Copy link
Member Author

Choose a reason for hiding this comment

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

Removed. Since navIcon and the default UiIconButton was removed, this will never be emitted.

Audit

@github-actions
Copy link
Contributor

github-actions bot commented Nov 5, 2025

Percy Visual Test Results

Percy Dashboard: View Detailed Report

Environment:

  • Node.js Version: 18.x
  • OS: Ubuntu-latest

Instructions for Reviewers:

  • Click on the Percy Dashboard link to view detailed visual diffs.
  • Review the visual changes highlighted in the report.
  • Approve or request changes based on the visual differences.

@MisRob MisRob changed the title KToolbar maintenance Make KToolbar themeable, fix textColor validator check error in Kolibri, and remove obsolete Keen code Nov 5, 2025
@MisRob MisRob added TODO: needs review Waiting for review TODO: needs decisions Further discussion and planning necessary labels Nov 5, 2025
@MisRob
Copy link
Member Author

MisRob commented Nov 5, 2025

Needs some decisions in regard to release planning (Slack thread)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

TODO: needs decisions Further discussion and planning necessary TODO: needs review Waiting for review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants