diff --git a/.github/workflows/notify_team_new_comment.yml b/.github/workflows/notify_team_new_comment.yml index cbab1b869..f3ceae972 100644 --- a/.github/workflows/notify_team_new_comment.yml +++ b/.github/workflows/notify_team_new_comment.yml @@ -27,7 +27,7 @@ jobs: env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK - uses: slackapi/slack-github-action@v1.26.0 + uses: slackapi/slack-github-action@v1.27.0 with: payload: | { diff --git a/.github/workflows/update_changelog.yml b/.github/workflows/update_changelog.yml index 992ca0ec7..046789715 100644 --- a/.github/workflows/update_changelog.yml +++ b/.github/workflows/update_changelog.yml @@ -59,7 +59,7 @@ jobs: with open("CHANGELOG.md", "w") as f: f.write(new_changelog) - - uses: tibdex/github-app-token@v1 + - uses: tibdex/github-app-token@v2 id: generate-token with: app_id: ${{ secrets.LE_BOT_APP_ID }} diff --git a/.gitignore b/.gitignore index b81f07174..9e4bc7763 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,4 @@ docs/jsdocs.js # IDE .idea kolibri-design-system.iml +docs/pages/playground.vue diff --git a/CHANGELOG.md b/CHANGELOG.md index cd16ccf30..82b09598a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,209 @@ Changelog is rather internal in nature. See release notes for the public overvie +- [#815] + - **Description:** removed the deprecated dropshadows + - **Products impact:** none + - **Addresses:** #725 + - **Components:** - + - **Breaking:** no + - **Impacts a11y:** no + - **Guidance:** - + +[#815]: https://github.com/learningequality/kolibri-design-system/pull/815 + + + +- [#822] + - **Description:** Bump KDS version to 5.0.0-rc9. + - **Products impact:** -. + - **Addresses:** -. + - **Components:** -. + - **Breaking:** -. + - **Impacts a11y:** -. + - **Guidance:** -. + +[#822]: https://github.com/learningequality/kolibri-design-system/pull/822 + + + +- [#820] + - **Description:** Fixes KCard area not taking available width + - **Products impact:** bugfix + - **Addresses:** A bug discovered in https://github.com/learningequality/studio/pull/4803 + - **Components:** `KCard` + - **Breaking:** no + - **Impacts a11y:** no + - **Guidance:** - + +[#820]: https://github.com/learningequality/kolibri-design-system/pull/820 + + + +- [#769] + - **Description:** Bump tippy.js from 4.2.1 to 4.3.5 + - **Products impact:** Dev Dependency upgrade + - **Addresses:** - + - **Components:** - + - **Breaking:** - + - **Impacts a11y:** - + - **Guidance:** - + +[#769]: https://github.com/learningequality/kolibri-design-system/pull/769 + + + +- [#811] + - **Description:** Bump elliptic from 6.5.7 to 6.6.0 + - **Products impact:** Dev Dependency upgrade + - **Addresses:** - + - **Components:** - + - **Breaking:** - + - **Impacts a11y:** - + - **Guidance:** - + +[#811]: https://github.com/learningequality/kolibri-design-system/pull/811 + + + +- [#796] + - **Description:** Adds an option to override `KCardGrid` base layouts partially or completely via the new prop `layoutOverride` + - **Products impact:** new API + - **Addresses:** Allows advanced grids customization + - **Components:** `KCardGrid` + - **Breaking:** no + - **Impacts a11y:** no + - **Guidance:** - + +[#796]: https://github.com/learningequality/kolibri-design-system/pull/796 + +- [#796] + - **Description:** Adds loading skeletons to `KCardGrid` and a way to configure them via the new prop `skeletonsConfig` + - **Products impact:** new API + - **Addresses:** Ensures smooth loading experience + - **Components:** `KCardGrid` + - **Breaking:** no + - **Impacts a11y:** no + - **Guidance:** - + +[#796]: https://github.com/learningequality/kolibri-design-system/pull/796 + + + +- [#810] + - **Description:** Bump KDS version to 5.0.0-rc8. + - **Products impact:** -. + - **Addresses:** -. + - **Components:** -. + - **Breaking:** -. + - **Impacts a11y:** -. + - **Guidance:** -. + +[#810]: https://github.com/learningequality/kolibri-design-system/pull/810 + + + +- [#808] + - **Description:** Adds ariaLabelledBy prop to KSwitch. + - **Products impact:** Improved accessibility. + - **Addresses:** -[KSwitch]: Add ariaLabelledBy prop #806 + - **Components:** KSwitch + - **Breaking:** - + - **Impacts a11y:** - + - **Guidance:**- + +[#808]: https://github.com/learningequality/kolibri-design-system/pull/808 + + + +- [#799] + - **Description:** copy FocusTrap from kolibri into KFocusTrap in the KDS and use it in the KModal + - **Products impact:** - + - **Addresses:** #746 + - **Components:** KModal , KFocuaTrap + - **Breaking:** no + - **Impacts a11y:** - + - **Guidance:** - + +[#799]: https://github.com/learningequality/kolibri-design-system/pull/799 + + + +- [#807] + - **Description:** Bump serve-static from 1.15.0 to 1.16.0 + - **Products impact:** Dev Dependency upgrade + - **Addresses:** - + - **Components:** - + - **Breaking:** - + - **Impacts a11y:** - + - **Guidance:** - + +[#807]: https://github.com/learningequality/kolibri-design-system/pull/807 + + + +- [#771] + - **Description:** Bump slackapi/slack-github-action from 1.26.0 to 1.27.0 + - **Products impact:** Dev Dependency upgrade + - **Addresses:** - + - **Components:** - + - **Breaking:** - + - **Impacts a11y:** - + - **Guidance:** - + +[#771]: https://github.com/learningequality/kolibri-design-system/pull/771 + + + +- [#770] + - **Description:** Bump tibdex/github-app-token from 1 to 2 + - **Products impact:** Dev Dependency upgrade + - **Addresses:** - + - **Components:** - + - **Breaking:** - + - **Impacts a11y:** - + - **Guidance:** - + +[#770]: https://github.com/learningequality/kolibri-design-system/pull/770 + + + +- [#777] + - **Description:** Bump express from 4.19.2 to 4.20.0 + - **Products impact:** Dev Dependency upgrade + - **Addresses:** - + - **Components:** - + - **Breaking:** - + - **Impacts a11y:** - + - **Guidance:** - + +[#777]: https://github.com/learningequality/kolibri-design-system/pull/777 + + + +- [#803] + - **Description:** Adds the option to get back to the unsorted state after sorting a KTable column, making it flow to be unsorted->ascending -> descending -> unsorted. + - Products impact: updated API + - Addresses: https://github.com/learningequality/kolibri-design-system/issues/797 + - Components: KTable + - Breaking: no + - Impacts : Adds flexibility in how users can interact with the table, especially when sorting is not desired or needs to be reset. + + + +- [#800] + - **Description:** Merges v4.6.0 into develop + - **Products impact:** -. + - **Addresses:** -. + - **Components:** -. + - **Breaking:** - + - **Impacts a11y:** - + - **Guidance:** -. + +[#800]: https://github.com/learningequality/kolibri-design-system/pull/800 + + + - [#798] - **Description:** Adds custom computed property `computedAriaLabel` that dynamically sets the `ariaLabel` for `KIconButton` based on the `tooltip` prop when `ariaLabel` is not provided. - **Products impact:** none @@ -710,8 +913,41 @@ Changelog is rather internal in nature. See release notes for the public overvie +- [#791] + - **Description:** Bump KDS version to 4.6.0. + - **Products impact:** -. + - **Addresses:** -. + - **Components:** -. + - **Breaking:** -. + - **Impacts a11y:** -. + - **Guidance:** -. + +[#791]: https://github.com/learningequality/kolibri-design-system/pull/791 + +- [#782] + - **Description:** Update Theme Tokens to the latest specs to comply material design specifications. + - **Products impact:** Updated API. + - **Addresses:** https://github.com/learningequality/kolibri-design-system/issues/775. + - **Components:** -. + - **Breaking:** yes. + - **Impacts a11y:** no. + - **Guidance:** Please update all `v_*` theme tokens using the mapping posted in https://github.com/learningequality/kolibri-design-system/issues/775. + +[#782]: https://github.com/learningequality/kolibri-design-system/pull/782 + +- [#786] + - **Description:** Bump KDS version to 4.5.1. + - **Products impact:** -. + - **Addresses:** -. + - **Components:** -. + - **Breaking:** -. + - **Impacts a11y:** -. + - **Guidance:** -. + +[#786]: https://github.com/learningequality/kolibri-design-system/pull/786 + - [#784] - - **Description:** Adds `labelDir` prop to control rtl direction of label. + - **Description:** Add `labelDir` prop to control rtl direction of label. - **Products impact:** new API. - **Addresses:** https://github.com/learningequality/studio/issues/4728. - **Components:** KCheckbox, KRadioButton. diff --git a/docs/assets/main.scss b/docs/assets/main.scss index 60f0408ae..a4c9f877b 100644 --- a/docs/assets/main.scss +++ b/docs/assets/main.scss @@ -16,7 +16,6 @@ code { padding-left: 0.25em; font-family: 'Source Code Pro', monospace; font-weight: 400; - white-space: nowrap; background-color: #918caf24; border-radius: 0.25em; } diff --git a/docs/common/DocsShow.vue b/docs/common/DocsShow.vue index fc55d7f75..8155abe26 100644 --- a/docs/common/DocsShow.vue +++ b/docs/common/DocsShow.vue @@ -35,7 +35,7 @@ return { display: this.block ? 'block' : 'inline-block', padding: this.padding ? '8px 24px' : null, - backgroundColor: this.dark ? this.$themePalette.grey.v_500 : undefined, + backgroundColor: this.dark ? this.$themePalette.grey.v_700 : undefined, }; }, }, diff --git a/docs/pages-components/DocsKCard.vue b/docs/pages-components/DocsKCard.vue index 3e452e7c3..f734ee51d 100644 --- a/docs/pages-components/DocsKCard.vue +++ b/docs/pages-components/DocsKCard.vue @@ -45,14 +45,14 @@
@@ -97,30 +97,30 @@
You can apply darken utilities $darken1
, $darken2
, and $darken3
to palette colors and tokens to achieve their darker shades. They are available on every Vue component.
base
$darken1
$darken2
$darken3
- A color scale – sometimes called a color ramp – is an evenly-spaced ramp of shades for a particular color hue. In the Kolibri Design System, we follow v_200
, v_400
, v_600
, … v_1000
, v_1100
:
+ A color scale – sometimes called a color ramp – is an evenly-spaced ramp of shades for a particular color hue. In the Kolibri Design System, we follow v_100
, v_200
, v_300
, v_400
, v_500
, v_600
:
- … -
-
Due to the inconsistent way that humans perceive color and light, computing these scales is
- For conditions which partially block or interrupt the user experience, use a warning icon with palette.orange.v_400
and informative language of the consequences under the current condition.
+ For conditions which partially block or interrupt the user experience, use a warning icon with palette.orange.v_200
and informative language of the consequences under the current condition.
It manages the layout, including the thumbnail image, title, and other content. It offers several base layouts and many customization options. Cards like the examples shown can be created, and many others.
KCard
has two orientations: horizontal and vertical. It is also possible to configure whether a thumbnail area is displayed, its size and alignment. By combining orientation
, thumbnailDisplay
and thumbnailAlign
props, the following card layouts can be achieved to organize diverse kinds of content:
aboveTitle
, belowTitle
, and footer
slots to add content to a card. KCard
will organize these areas according to its When KCard
is set to display the thumbnail, the thumbnail area acts as a placeholder if the image is missing, fails to load, or is still loading. In such cases, a light gray background is shown in place of the image.
Use the thumbnailPlaceholder
slot to add a placeholder element, such as an icon, to this area. Provide a placeholder element even if a thumbnail image is available. This serves as a progressive loading experience where the placeholder element is displayed until the image is loaded, and is particularly important on slower networks.
Use the thumbnailPlaceholder
slot to add a placeholder element, such as an icon, to this area. Provide a placeholder element even if a thumbnail image is available. It serves as fallback content if the image fails to load unexpectedly.
ariaLabel
is applied to the bookmark icon button in the following example so that screenreaders can communicate its purpose. In production, more work would be needed to indicate the bookmark's toggled state. Always assess on a case-by-case basis.
KCard
's responsibility.
Displays a grid of cards
KCardGrid
provides base layouts for the most common grids in our ecosystem, as well as advanced configuration via useKCardGrid
(TBD), allowing customization or complete override of the base layouts.
KCardGrid
provides base layouts for the most common grids in our ecosystem, as well as customization or complete override of the base layouts.
Together with KCard
, it ensures accessible navigation within card lists, such as announcing only their titles when using the tab key to avoid overwhelming screen reader outputs.
Also follow
Base layouts can be customized or even completely overriden. Refer to useKCardGrid
(TBD).
Base layouts can be customized or even completely overriden via the layoutOverride
prop. layoutOverride
takes an array of objects { breakpoints, cardsPerRow, columnGap, rowGap }
, where:
breakpoints
is an array of 0-7
values corresponding to the cardsPerRow
overrides the number of cards per row for the specified breakpoints.columnGap
/rowGap
overrides grid column/row gaps for the specified breakpoints.For example:
+ +Here, the base 1-2-3
layout is overriden partially. Column and row gaps are decreased to 20px
on breakpoints 0-1
, and the number of cards per row is increased to 4 on breakpoints 4-7
.
Setting height on cards is discouraged. Instead, manage height bottom-up, for example by setting height on card sections, using text truncation, or other ways to limit its inner content. Such approaches ensure content tolerance, prevent from unexpected overflows or excessive height, and keep vertical alignment of card sections consistent on a grid row. This is especially important when dealing with unknown lenghts or amounts of content displayed in cards. Consider:
-Grid configuration can be combined with KCard
's settings to further improve responsive experience. A common pattern is switching KCard
's horizontal orientation to vertical for smaller screens to organize content more effectively in limited space:
KCard
slots content. In the following example, some metadata pills are hidden on smaller screens:
When cards are loading, KCardGrid
displays skeleton cards...(TBD)
While data is loading, KCardGrid
shows loading skeleton cards. Use the loading
prop to toggle the loading state. Note that KCardGrid
internal optimizations may affect how closely the visual loading experience matches the loading
value:
Use the buttons in the example below to preview.
+ +By default, the number of loading skeletons corresponds to the number of cards in a single grid row if it were full. This behavior can be overridden via the count
attribute (below), however do not override it unless indicated in the designs.
Use the skeletonsConfig
prop to configure skeleton cards to match the expected visual output of loaded cards on all screen sizes. Preview the layout and height of cards with loaded data and adjust skeletonsConfig
accordingly.
skeletonsConfig
takes an array of objects { breakpoints, count, height, orientation, thumbnailDisplay, thumbnailAlign }
, where:
breakpoints
is an array of 0-7
values corresponding to the count
sets the number of skeleton cards for the specified breakpoints. See height
sets the height of skeleton cards for the specified breakpoints.orientation
sets the orientation of skeleton cards for the specified breakpoints. Corresponds to thumbnailDisplay
sets the thumbnail display of skeleton cards for the specified breakpoints. Corresponds to thumbnailAlign
sets the thumbnail alignment of skeleton cards for the specified breakpoints. Corresponds to For easier development, enable the debug
prop to display the current breakpoint in the top left corner of the grid. Use the button in the example below to preview the debug mode.
Here, the height of loading skeleton cards is 400px
with vertical orientation on breakpoints 0-3
, and 220px
with horizontal orientation on breakpoints 4-7
. This makes skeleton cards resemble loaded cards at all breakpoints, creating a smooth transition for users during data loading. Note the bottom-up approach where we begin with a base setup for all breakpoints and gradually override on higher breakpoints. This simplifies the configuration object.
To get a sense of what skeleton layouts can be achieved, reload this page and the KCard
page to preview the loading state in all examples.
+ The KFocusTrap
component ensures that keyboard focus is trapped within a specific region of the page.
+
+ When the disabled
prop is set to true
, focus trapping is disabled, allowing normal tab behavior. The focus trap moves the focus between the first and last elements in the slot content.
+