diff --git a/CHANGELOG.md b/CHANGELOG.md index 7394071b8..f5c902312 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,27 @@ Changelog is rather internal in nature. See release notes for the public overvie ## Version 4.x.x (`release-v4` branch) + +- [#680] + - **Description:** Adds boolean `appendToRoot` prop to teleport the modal to the body element if true. + - **Products impact:** new API. + - **Addresses:** https://github.com/learningequality/kolibri/issues/12447. + - **Components:** KModal. + - **Breaking:** no + - **Impacts a11y:** no + - **Guidance:** + +- [#680] + - **Description:** Fixes the calculation of overflowed items when changes in the size of the list item slots occur. + - **Products impact:** bugfix. + - **Addresses:** https://github.com/learningequality/kolibri/issues/12447. + - **Components:** KListWithOverflow. + - **Breaking:** no + - **Impacts a11y:** no + - **Guidance:** + +[#680]: https://github.com/learningequality/kolibri-design-system/pull/680 + - [#673] - **Description:** Remove white space below Ktabs - **Products impact:** bugfix. diff --git a/lib/KListWithOverflow.vue b/lib/KListWithOverflow.vue index 12fc915cb..5cd0b2f55 100644 --- a/lib/KListWithOverflow.vue +++ b/lib/KListWithOverflow.vue @@ -101,6 +101,17 @@ // avoids sharing it across multiple instances, ensuring each component has its own function. this.throttledSetOverflowItems = throttle(this.setOverflowItems, 100); this.$watch('elementWidth', this.throttledSetOverflowItems); + + // Add resize observer to watch inner list items size changes + if (typeof window !== 'undefined' && window.ResizeObserver) { + this.resizeObserver = new ResizeObserver(this.throttledSetOverflowItems); + this.resizeObserver.observe(this.$refs.list); + } + }, + beforeUnmount() { + if (this.resizeObserver) { + this.resizeObserver.disconnect(); + } }, methods: { getSize(element) { diff --git a/lib/KModal.vue b/lib/KModal.vue index c22524c64..b5cf192ae 100644 --- a/lib/KModal.vue +++ b/lib/KModal.vue @@ -1,106 +1,109 @@ - - - - + + + - - - + - {{ title }} - - + - {{ errorMessage }} - - - - - - - + + {{ errorMessage }} + + + + + - - - + + + + + - - - - - - - - - - + + + + + + + + + + - - + +