Skip to content

Commit

Permalink
Merge pull request learningequality#620 from MisRob/prepare-release-v…
Browse files Browse the repository at this point in the history
…4.2.0

Prepare release v4.2.0
  • Loading branch information
MisRob authored Apr 16, 2024
2 parents d6b8611 + 7507989 commit c6f5ec1
Show file tree
Hide file tree
Showing 8 changed files with 95 additions and 4 deletions.
52 changes: 52 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,58 @@ Changelog is rather internal in nature. See release notes for the public overvie

## Version 3.x.x (`release-v3` branch)

- [#611]
- **Description:** Adds a new `maxWidth` prop
- **Products impact:** new API
- **Addresses:** https://github.com/learningequality/kolibri-design-system/issues/595
- **Components:** KTooltip
- **Breaking:** no
- **Impacts a11y:** no
- **Guidance:** -

[#611]: https://github.com/learningequality/kolibri-design-system/pull/611

- [#612]
- **Description:** Prevent KListWithOverflow hidden elements from taking up space on the screen.
- **Products impact:** bugfix.
- **Addresses:** - .
- **Components:** KListWithOverflow.
- **Breaking:** no.
- **Impacts a11y:** no.
- **Guidance:** - .

- [#612]
- **Description:** Scope the styles of the KListWithOverflow component.
- **Products impact:** bugfix.
- **Addresses:** - .
- **Components:** KListWithOverflow.
- **Breaking:** no.
- **Impacts a11y:** no.
- **Guidance:** - .

[#612]: https://github.com/learningequality/kolibri-design-system/pull/612

- [##603]
- **Description:** Adds thumps down icon that is needed in Studio for search recomendation work.
- **Products impact:** New Icon
- **Addresses:** [#4450](https://github.com/learningequality/studio/issues/4450)
- **Components:** N/A
- **Breaking:** No
- **Impacts a11y:** No
- **Guidance:**
[#603]: https://github.com/learningequality/kolibri-design-system/pull/603

- [#605]
- **Description:** Adds the `dropup` icon
- **Products impact:** New icon
- **Addresses:** https://github.com/learningequality/kolibri-design-system/issues/594
- **Components:** -
- **Breaking:** no
- **Impacts a11y:** -
- **Guidance:** -

[#605]: https://github.com/learningequality/kolibri-design-system/pull/605

- [#586]
- **Description:** Adds a new prop `constrainToScrollParent ` to `KDropdownMenu` to allow overriding of its popover flipping behavior.
- **Products impact:** Bugfix
Expand Down
1 change: 1 addition & 0 deletions custom-icons/dropup.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions docs/rstIconReplacements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
.. |dragHorizontal| replace:: :raw-html:`<span class="design-system-icon"><svg viewBox="0 0 24 24" role="presentation" focusable="false" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path d="M24 0v24H0V0z" fill="none"/><path d="M6 11c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm8-2c0-1.1-.9-2-2-2s-2 .9-2 2 .9 2 2 2 2-.9 2-2zm6 0c0-1.1-.9-2-2-2s-2 .9-2 2 .9 2 2 2 2-.9 2-2zm-4 6c0 1.1.9 2 2 2s2-.9 2-2-.9-2-2-2-2 .9-2 2zm-2 0c0-1.1-.9-2-2-2s-2 .9-2 2 .9 2 2 2 2-.9 2-2zm-6 0c0-1.1-.9-2-2-2s-2 .9-2 2 .9 2 2 2 2-.9 2-2z"/></svg></span>`
.. |dragVertical| replace:: :raw-html:`<span class="design-system-icon"><svg viewBox="0 0 24 24" role="presentation" focusable="false" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path d="M11 18c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2zm-2-8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm6 4c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"/></svg></span>`
.. |dropdown| replace:: :raw-html:`<span class="design-system-icon"><svg viewBox="0 0 24 24" role="presentation" focusable="false" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path d="M7 10l5 5 5-5z"/></svg></span>`
.. |dropup| replace:: :raw-html:`<span class="design-system-icon"><svg role="presentation" focusable="false" xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24"><path d="M280-400l200-200 200 200H280z"/></svg></span>`
.. |edit| replace:: :raw-html:`<span class="design-system-icon"><svg viewBox="0 0 24 24" role="presentation" focusable="false" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04a.996.996 0 000-1.41l-2.34-2.34a.996.996 0 00-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"/></svg></span>`
.. |email| replace:: :raw-html:`<span class="design-system-icon"><svg viewBox="0 0 24 24" role="presentation" focusable="false" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 14H4V8l8 5 8-5v10zm-8-7L4 6h16l-8 5z"/></svg></span>`
.. |emptyTopic| replace:: :raw-html:`<span class="design-system-icon"><svg viewBox="0 0 24 24" role="presentation" focusable="false" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path d="M20 6h-8l-2-2H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 12H4V8h16v10z"/></svg></span>`
Expand Down Expand Up @@ -166,6 +167,8 @@
.. |star| replace:: :raw-html:`<span class="design-system-icon"><svg viewBox="0 0 24 24" role="presentation" focusable="false" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path d="M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"/></svg></span>`
.. |superadmin| replace:: :raw-html:`<span class="design-system-icon design-system-icon-color-mastered"><svg viewBox="0 0 24 24" role="presentation" focusable="false" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path d="M12.65 10A5.99 5.99 0 007 6c-3.31 0-6 2.69-6 6s2.69 6 6 6a5.99 5.99 0 005.65-4H17v4h4v-4h2v-4H12.65zM7 14c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z"/></svg></span>`
.. |systemUpdate| replace:: :raw-html:`<span class="design-system-icon"><svg viewBox="0 0 24 24" role="presentation" focusable="false" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path d="M22.7 19l-9.1-9.1c.9-2.3.4-5-1.5-6.9-2-2-5-2.4-7.4-1.3L9 6 6 9 1.6 4.7C.4 7.1.9 10.1 2.9 12.1c1.9 1.9 4.6 2.4 6.9 1.5l9.1 9.1c.4.4 1 .4 1.4 0l2.3-2.3c.5-.4.5-1.1.1-1.4z"/></svg></span>`
.. |thumbDown| replace:: :raw-html:`<span class="design-system-icon"><svg viewBox="0 0 24 24" role="presentation" focusable="false" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path d="M15 3H6c-.83 0-1.54.5-1.84 1.22l-3.02 7.05c-.09.23-.14.47-.14.73v2c0 1.1.9 2 2 2h6.31l-.95 4.57-.03.32c0 .41.17.79.44 1.06L9.83 23l6.59-6.59c.36-.36.58-.86.58-1.41V5c0-1.1-.9-2-2-2zm0 12l-4.34 4.34L12 14H3v-2l3-7h9v10zm4-12h4v12h-4z"/></svg></span>`
.. |thumbUp| replace:: :raw-html:`<span class="design-system-icon"><svg viewBox="0 0 24 24" role="presentation" focusable="false" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path d="M1 21h4V9H1v12zm22-11c0-1.1-.9-2-2-2h-6.31l.95-4.57.03-.32c0-.41-.17-.79-.44-1.06L14.17 1 7.59 7.59C7.22 7.95 7 8.45 7 9v10c0 1.1.9 2 2 2h9c.83 0 1.54-.5 1.84-1.22l3.02-7.05c.09-.23.14-.47.14-.73v-2z"/></svg></span>`
.. |timer| replace:: :raw-html:`<span class="design-system-icon"><svg viewBox="0 0 24 24" role="presentation" focusable="false" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path d="M15.07 1.01h-6v2h6v-2zm-4 13h2v-6h-2v6zm8.03-6.62l1.42-1.42c-.43-.51-.9-.99-1.41-1.41l-1.42 1.42A8.962 8.962 0 0012.07 4c-4.97 0-9 4.03-9 9s4.02 9 9 9 9-4.03 9-9c0-2.11-.74-4.06-1.97-5.61zm-7.03 12.62c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z"/></svg></span>`
.. |topic| replace:: :raw-html:`<span class="design-system-icon"><svg viewBox="0 0 24 24" role="presentation" focusable="false" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path d="M10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8l-2-2z"/></svg></span>`
.. |trash| replace:: :raw-html:`<span class="design-system-icon"><svg viewBox="0 0 24 24" role="presentation" focusable="false" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path d="M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"/></svg></span>`
Expand Down
9 changes: 9 additions & 0 deletions lib/KIcon/iconDefinitions.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ const KolibriIcons = {
dropdown: {
icon: require('./precompiled-icons/material-icons/arrow_drop_down/baseline.vue').default,
},
dropup: {
icon: require('./precompiled-icons/le/dropup.vue').default,
},
back: {
icon: require('./precompiled-icons/material-icons/arrow_back/baseline.vue').default,
rtlFlip: true,
Expand Down Expand Up @@ -69,6 +72,12 @@ const KolibriIcons = {

// Features and links
learn: { icon: require('./precompiled-icons/material-icons/school/baseline.vue').default },
thumbUp: {
icon: require('./precompiled-icons/material-icons/thumb_up/baseline.vue').default,
},
thumbDown: {
icon: require('./precompiled-icons/material-icons/thumb_down/outline.vue').default,
},
device: { icon: require('./precompiled-icons/material-icons/tablet_mac/baseline.vue').default },
profile: {
icon: require('./precompiled-icons/material-icons/account_circle/baseline.vue').default,
Expand Down
12 changes: 12 additions & 0 deletions lib/KIcon/precompiled-icons/le/dropup.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<template>

<svg role="presentation" focusable="false" xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24"><path d="M280-400l200-200 200 200H280z"/></svg>

</template>


<script>
export default {"name":"icon-b55570c35bc45ea258e83d6d61e84450"}
</script>
6 changes: 5 additions & 1 deletion lib/KListWithOverflow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,10 @@
if (itemWidth >= availableWidth || overflowItemsIdx.length > 0) {
overflowItemsIdx.push(i);
item.style.visibility = 'hidden';
item.style.position = 'absolute';
} else {
item.style.visibility = 'visible';
item.style.position = 'unset';
maxWidth += itemWidth;
availableWidth -= itemWidth;
const itemHeight = itemsSizes[i].height;
Expand Down Expand Up @@ -238,7 +240,7 @@
</script>


<style>
<style scoped>
.list-wrapper {
display: flex;
Expand All @@ -249,6 +251,8 @@
overflow: visible;
display: flex;
flex-wrap: wrap;
position: relative;
align-items: center;
}
.list > * {
Expand Down
14 changes: 12 additions & 2 deletions lib/KTooltip/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<div
dir="auto"
class="k-tooltip"
:style="{ backgroundColor: $themeTokens.text, color: $themeTokens.textInverted }"
:style="{ backgroundColor: $themeTokens.text, color: $themeTokens.textInverted, maxWidth: maxWidth ? maxWidth : 'calc(100vw - 10px)', }"
>
<!-- If text prop is provided, display the text -->
<template v-if="text">
Expand Down Expand Up @@ -75,6 +75,17 @@
type: String,
default: null,
},
/**
* Maximum width of the tooltip.
* Accepted values follow the standard
* CSS max-width property format.
* If it's not provided, the tooltip's
* size fits its content.
*/
maxWidth: {
type: String,
default: null,
},
},
data() {
return {
Expand Down Expand Up @@ -125,7 +136,6 @@
z-index: 24;
width: max-content;
min-width: 75px;
max-width: calc(100vw - 10px);
padding: 8px;
font-size: 12px;
font-weight: normal;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "kolibri-design-system",
"version": "4.1.0",
"version": "4.2.0",
"private": false,
"description": "The Kolibri Design System defines common design patterns and code for use in Kolibri applications",
"license": "MIT",
Expand Down

0 comments on commit c6f5ec1

Please sign in to comment.