diff --git a/.github/workflows/notify_team_new_comment.yml b/.github/workflows/notify_team_new_comment.yml new file mode 100644 index 000000000..cc5ec443e --- /dev/null +++ b/.github/workflows/notify_team_new_comment.yml @@ -0,0 +1,35 @@ +name: Send a slack notification when a contributor comments on issue + +on: + issue_comment: + types: [created] + +jobs: + contributor_issue_comment: + name: Contributor issue comment + + if: >- + ${{ + !github.event.issue.pull_request && + github.event.comment.author_association != 'MEMBER' && + github.event.comment.author_association != 'OWNER' + }} + + runs-on: ubuntu-latest + steps: + - name: Escape title double quotes + id: escape_title + env: + ISSUE_TITLE: ${{ github.event.issue.title }} + run: echo "ISSUE_TITLE=${ISSUE_TITLE//\"/\\\"}" >> "$GITHUB_OUTPUT" + + - name: Send message to Slack channel + env: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK + uses: slackapi/slack-github-action@v1.25.0 + with: + payload: | + { + "text": "*[KDS] New comment on issue: <${{ github.event.issue.html_url }}#issuecomment-${{ github.event.comment.id }}|${{ steps.escape_title.outputs.ISSUE_TITLE }} by ${{ github.event.comment.user.login }}>*" + } diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 1e2558f89..7698d9fb3 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4 with: node-version: '10.x' registry-url: 'https://registry.npmjs.org' diff --git a/CHANGELOG.md b/CHANGELOG.md index 74870b5d2..b0f7910b9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,160 @@ Changelog is rather internal in nature. See release notes for the public overvie [#572]: https://github.com/learningequality/kolibri-design-system/pull/572 +- [616] + - **Description:** Fixes `KModal` not showing content after the initial load + - **Products impact:** bugfix + - **Addresses:** https://github.com/learningequality/kolibri/pull/11911#issuecomment-2040030433 + - **Components:** `KModal` + - **Breaking:** no + - **Impacts a11y:** no + - **Guidance:** - + +[616]: https://github.com/learningequality/kolibri-design-system/pull/616 + +- [616] + - **Description:** Fixes `KSelect`'s missing padding + - **Products impact:** bugfix + - **Addresses:** https://github.com/learningequality/kolibri/pull/11911#issuecomment-2040030433 + - **Components:** `KSelect` + - **Breaking:** no + - **Impacts a11y:** no + - **Guidance:** - + +[616]: https://github.com/learningequality/kolibri-design-system/pull/616 + +- [#591] + - **Description:** Added a clearable prop to KTextbox + - **Products impact:** - + - **Addresses:** https://github.com/learningequality/kolibri-design-system/issues/584 + - **Components:** `KTextbox` + - **Breaking:** no + - **Impacts a11y:** no + - **Guidance:** - + +[#591]: https://github.com/learningequality/kolibri-design-system/pull/591 + +- [#582] + - **Description:** Upgrade popper.js from 1.14.6 to 1.16.1 + - **Products impact:** - + - **Addresses:** - + - **Components:** - + - **Breaking:** - + - **Impacts a11y:** - + - **Guidance:** - + +[#582]: https://github.com/learningequality/kolibri-design-system/pull/582 + +- [#599] + - **Description:** Upgrade express from 4.18.2 to 4.19.2 + - **Products impact:** - + - **Addresses:** - + - **Components:** - + - **Breaking:** - + - **Impacts a11y:** - + - **Guidance:** - + +[#599]: https://github.com/learningequality/kolibri-design-system/pull/599 + +- [#587] + - **Description:** Rebrands icons in buttons and links + - **Products impact:** UI + - **Addresses:** - + - **Components:** `KButton`, `KRouterLink`, `KExternalLink` + - **Breaking:** no + - **Impacts a11y:** - + - **Guidance:** - + +[#587]: https://github.com/learningequality/kolibri-design-system/pull/587 + +- [#561] + - **Description:** Update KLogo for new branding guidelines + - **Products impact:** Enables general use of KLogo for all frontend logo usage. Changes props API for square logo presentation. + - **Addresses:** Updates logo to new logo, adds all permissible alternates, adds animated form. + - **Components:** KLogo + - **Breaking:** Yes + - **Impacts a11y:** No + - **Guidance:** Rendering the Kolibri logo can now be done using the KLogo component, as well as the loading animation. + +[#561]: https://github.com/learningequality/kolibri-design-system/pull/561 + +- [#580] + - **Description:** Remove use of KResponsiveWindowMixin internally + - **Products impact:** - none + - **Addresses:** - + - **Components:** KDateRange, KModal, KPageContainer, KGrid, KFixedGrid, KGridItem, KFixedGridItem + - **Breaking:** no + - **Impacts a11y:** no + - **Guidance:** Updates all components to use the useKResponsiveWindow composable + +[#580]: https://github.com/learningequality/kolibri-design-system/pull/580 + +- [#415] + - **Description:** Upgrade purecss from 0.6.2 to 2.2.0 + - **Products impact:** Updates for base styling for all elements + - **Addresses:** - + - **Components:** - + - **Breaking:** - + - **Impacts a11y:** - + - **Guidance:** - + +[#415]: https://github.com/learningequality/kolibri-design-system/pull/415 + +- [#569] + - **Description:** Upgrade actions/setup-node from 3 to 4 + - **Products impact:** Dependencies + - **Addresses:** - + - **Components:** - + - **Breaking:** - + - **Impacts a11y:** - + - **Guidance:** - + +[#569]: https://github.com/learningequality/kolibri-design-system/pull/569 + +- [#576] + - **Description:** Upgrade follow-redirects from 1.15.4 to 1.15.6 + - **Products impact:** Dependencies + - **Addresses:** - + - **Components:** - + - **Breaking:** - + - **Impacts a11y:** - + - **Guidance:** - + +[#576]: https://github.com/learningequality/kolibri-design-system/pull/576 + +- [#553] + - **Description:** Upgrade ip from 1.1.5 to 1.1.9 + - **Products impact:** Dependencies + - **Addresses:** - + - **Components:** - + - **Breaking:** - + - **Impacts a11y:** - + - **Guidance:** - + +[#553]: https://github.com/learningequality/kolibri-design-system/pull/553 + +- [#559] + - **Description:** Upgrade lodash from 4.17.15 to 4.17.21 + - **Products impact:** Dependencies + - **Addresses:** - + - **Components:** - + - **Breaking:** - + - **Impacts a11y:** - + - **Guidance:** - + +[#559]: https://github.com/learningequality/kolibri-design-system/pull/559 + +- [#555] + - **Description:** Add action to notify us on Slack about GH issues comments from contributors community + - **Products impact:** none + - **Addresses:** - + - **Components:** - + - **Breaking:** - + - **Impacts a11y:** - + - **Guidance:** - + +[#555]: https://github.com/learningequality/kolibri-design-system/pull/555 + - [#565] - **Description:** Revert adding engines - **Products impact:** Dependencies @@ -115,6 +269,28 @@ Changelog is rather internal in nature. See release notes for the public overvie ## Version 3.x.x (`release-v3` branch) +- [#586] + - **Description:** Adds a new prop `constrainToScrollParent ` to `KDropdownMenu` to allow overriding of its popover flipping behavior. + - **Products impact:** Bugfix + - **Addresses:** [#432](https://github.com/learningequality/kolibri-design-system/issues/432) + - **Components:** KDropdownMenu + - **Breaking:** no + - **Impacts a11y:** no + - **Guidance:** Use the `constrainToScrollParent` prop to override the default popover flipping behavior of the `KDropdownMenu` component prop where necessary. + +[#586]: https://github.com/learningequality/kolibri-design-system/pull/586 + +- [#573] + - **Description:** More precise calculation of list with in KListWithOverflow. + - **Products impact:** bugfix. + - **Addresses:** -. + - **Components:** KListWithOverflow. + - **Breaking:** no. + - **Impacts a11y:** no. + - **Guidance:** -. + +[#573]: https://github.com/learningequality/kolibri-design-system/pull/573 + - [#552] - **Description:** New `KListWithOverflow` component. - **Products impact:** new API. diff --git a/docs/common/DocsPageTemplate/SideNav/index.vue b/docs/common/DocsPageTemplate/SideNav/index.vue index 9608d5a0c..a332183f0 100644 --- a/docs/common/DocsPageTemplate/SideNav/index.vue +++ b/docs/common/DocsPageTemplate/SideNav/index.vue @@ -8,7 +8,7 @@ > @@ -46,6 +162,54 @@ + + + \ No newline at end of file diff --git a/docs/pages/kselect.vue b/docs/pages/kselect.vue index 63d0c53ba..0395121e6 100644 --- a/docs/pages/kselect.vue +++ b/docs/pages/kselect.vue @@ -63,7 +63,7 @@ export default { data() { return { - exampleData: null, + exampleData: {}, options: [ { label: 'Somebody', diff --git a/docs/pages/layout/index.vue b/docs/pages/layout/index.vue index 2fd8d7542..a63fd5e80 100644 --- a/docs/pages/layout/index.vue +++ b/docs/pages/layout/index.vue @@ -175,7 +175,7 @@

- Note that an additional complexity not shown in the example above is that conditional styling sometimes needs to be applied using KResponsiveWindowMixin properties. See the source code of this page for details. + Note that an additional complexity not shown in the example above is that conditional styling sometimes needs to be applied using useKResponsiveWindow properties. See the source code of this page for details.

Also note that grid containers have a debug property that will show helpful visual information about columns and grid items when set to true. @@ -210,10 +210,13 @@ \ No newline at end of file diff --git a/docs/pages/playground.vue b/docs/pages/playground.vue index bf32354b2..686423285 100644 --- a/docs/pages/playground.vue +++ b/docs/pages/playground.vue @@ -24,9 +24,6 @@ - - - diff --git a/jest.conf/testUtils.js b/jest.conf/testUtils.js new file mode 100644 index 000000000..80f4afbe7 --- /dev/null +++ b/jest.conf/testUtils.js @@ -0,0 +1,21 @@ +import 'mock-match-media/jest-setup.cjs'; +import { setMedia } from 'mock-match-media'; + +export const resizeWindow = (width, height = 768) => { + window.innerWidth = width; + window.innerHeight = height; + window.dispatchEvent(new Event('resize')); + setMedia({ + width: `${width}px`, + height: `${height}px`, + }); +}; + +export const testAfterResize = testFunction => { + let animationFrameId; + const assertAfterResize = () => { + testFunction(); + animationFrameId = cancelAnimationFrame(animationFrameId); + }; + animationFrameId = requestAnimationFrame(assertAfterResize); +}; diff --git a/lib/KDateRange/index.vue b/lib/KDateRange/index.vue index e43ca7450..917cbb372 100644 --- a/lib/KDateRange/index.vue +++ b/lib/KDateRange/index.vue @@ -64,7 +64,6 @@ import get from 'lodash/get'; import debounce from 'lodash/debounce'; import KModal from '../KModal'; - import KResponsiveWindowMixin from '../KResponsiveWindowMixin'; import KDateCalendar from './KDateCalendar'; import KDateInput from './KDateInput'; import { validationMachine, initialContext } from './ValidationMachine'; @@ -77,7 +76,6 @@ KDateInput, KDateCalendar, }, - mixins: [KResponsiveWindowMixin], props: { /** * Constrains the selection to after this date, disabling dates prior diff --git a/lib/KDropdownMenu.vue b/lib/KDropdownMenu.vue index 355288e53..824d992c1 100644 --- a/lib/KDropdownMenu.vue +++ b/lib/KDropdownMenu.vue @@ -5,6 +5,7 @@ :z-index="99" :containFocus="true" :dropdownPosition="position" + :constrainToScrollParent="constrainToScrollParent" @close="handleClose" @open="handleOpen" > @@ -34,6 +35,13 @@ UiMenu, }, props: { + /** + * The dropdown menu popover flips its position to avoid overflows within the parent. Setting it to false disables the flipping behavior. + */ + constrainToScrollParent: { + type: Boolean, + default: true, + }, /** * An array of options objects, with one object per dropdown item */ diff --git a/lib/KImg/index.vue b/lib/KImg/index.vue index 20b07acf9..1334a7bea 100644 --- a/lib/KImg/index.vue +++ b/lib/KImg/index.vue @@ -53,6 +53,8 @@ + + + \ No newline at end of file diff --git a/lib/KLogo/kolibri-logo.svg b/lib/KLogo/kolibri-logo.svg deleted file mode 100644 index f26d5bdfc..000000000 --- a/lib/KLogo/kolibri-logo.svg +++ /dev/null @@ -1,178 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/lib/KModal.vue b/lib/KModal.vue index 4e516195f..c22524c64 100644 --- a/lib/KModal.vue +++ b/lib/KModal.vue @@ -102,7 +102,7 @@