Skip to content

Commit

Permalink
Merge pull request #1343 from dpc-sdp/release/2.17.2
Browse files Browse the repository at this point in the history
Release/2.17.2
  • Loading branch information
waitingallday authored Oct 3, 2024
2 parents 85706e9 + f671dea commit dfef973
Show file tree
Hide file tree
Showing 26 changed files with 116 additions and 64 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## v2.17.2

[compare changes](https://github.com/dpc-sdp/ripple-framework/compare/2.17.1...v2.17.2)


### 🩹 Fixes

- **@dpc-sdp/ripple-ui-core:** 🐛 fix regression in unflagged mode ([f90da6469](https://github.com/dpc-sdp/ripple-framework/commit/f90da6469))

### ❤️ Contributors

- Jason Smith <[email protected]>

## v2.17.1

[compare changes](https://github.com/dpc-sdp/ripple-framework/compare/2.17.0...v2.17.1)
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "2.17.1",
"version": "2.17.2",
"npmClient": "pnpm",
"exact": true,
"command": {
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-config-ripple/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@dpc-sdp/eslint-config-ripple",
"description": "ESLint config for Ripple projects",
"version": "2.17.1",
"version": "2.17.2",
"license": "Apache-2.0",
"repository": "https://github.com/dpc-sdp/ripple-framework",
"main": "index.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/nuxt-ripple-analytics/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@dpc-sdp/nuxt-ripple-analytics",
"description": "Nuxt module for handling event tracking.",
"version": "2.17.1",
"version": "2.17.2",
"license": "Apache-2.0",
"main": "./nuxt.config.ts",
"repository": "https://github.com/dpc-sdp/ripple-framework",
Expand Down
2 changes: 1 addition & 1 deletion packages/nuxt-ripple-cli/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@dpc-sdp/nuxt-ripple-cli",
"description": "A CLI for simplifying common setup and scaffolding tasks",
"version": "2.17.1",
"version": "2.17.2",
"license": "Apache-2.0",
"repository": "https://github.com/dpc-sdp/ripple-framework",
"main": "./dist/index.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/nuxt-ripple-preview/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@dpc-sdp/nuxt-ripple-preview",
"description": "Adds support for drupal preview links in Ripple frontend sites",
"version": "2.17.1",
"version": "2.17.2",
"license": "Apache-2.0",
"main": "./nuxt.config.ts",
"repository": "https://github.com/dpc-sdp/ripple-framework",
Expand Down
2 changes: 1 addition & 1 deletion packages/nuxt-ripple/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@dpc-sdp/nuxt-ripple",
"description": "Nuxt module for integrating Ripple and Tide",
"version": "2.17.1",
"version": "2.17.2",
"license": "Apache-2.0",
"main": "./nuxt.config.ts",
"repository": "https://github.com/dpc-sdp/ripple-framework",
Expand Down
2 changes: 1 addition & 1 deletion packages/ripple-sdp-core/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@dpc-sdp/ripple-sdp-core",
"description": "SDP core content types",
"version": "2.17.1",
"version": "2.17.2",
"license": "Apache-2.0",
"repository": "https://github.com/dpc-sdp/ripple-framework",
"main": "./nuxt.config.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/ripple-storybook/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "ripple-storybook",
"description": "Ripple Storybook instance",
"version": "2.17.1",
"version": "2.17.2",
"license": "Apache-2.0",
"private": true,
"repository": "https://github.com/dpc-sdp/ripple-framework",
Expand Down
2 changes: 1 addition & 1 deletion packages/ripple-test-utils/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@dpc-sdp/ripple-test-utils",
"description": "Test utils for Ripple sites",
"version": "2.17.1",
"version": "2.17.2",
"license": "Apache-2.0",
"type": "module",
"main": "./dist/config/index.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/ripple-tide-api/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@dpc-sdp/ripple-tide-api",
"description": "Ripple API endpoints for Tide Drupal backend",
"version": "2.17.1",
"version": "2.17.2",
"license": "Apache-2.0",
"repository": "https://github.com/dpc-sdp/ripple-framework",
"main": "./dist/index.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/ripple-tide-event/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@dpc-sdp/ripple-tide-event",
"description": "Ripple mappings and components for Tide Event Content type",
"version": "2.17.1",
"version": "2.17.2",
"license": "Apache-2.0",
"main": "./nuxt.config.ts",
"repository": "https://github.com/dpc-sdp/ripple-framework",
Expand Down
2 changes: 1 addition & 1 deletion packages/ripple-tide-grant/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@dpc-sdp/ripple-tide-grant",
"description": "Ripple mappings and components for Tide Grant Content type",
"version": "2.17.1",
"version": "2.17.2",
"license": "Apache-2.0",
"repository": "https://github.com/dpc-sdp/ripple-framework",
"main": "./nuxt.config.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/ripple-tide-landing-page/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@dpc-sdp/ripple-tide-landing-page",
"description": "Ripple mappings and components for Tide landing-page Content type",
"version": "2.17.1",
"version": "2.17.2",
"license": "Apache-2.0",
"repository": "https://github.com/dpc-sdp/ripple-framework",
"main": "./nuxt.config.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/ripple-tide-media/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@dpc-sdp/ripple-tide-media",
"description": "Ripple mappings and components for Tide media",
"version": "2.17.1",
"version": "2.17.2",
"license": "Apache-2.0",
"repository": "https://github.com/dpc-sdp/ripple-framework",
"main": "./nuxt.config.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/ripple-tide-news/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@dpc-sdp/ripple-tide-news",
"description": "Ripple mappings and components for Tide News content type",
"version": "2.17.1",
"version": "2.17.2",
"license": "Apache-2.0",
"repository": "https://github.com/dpc-sdp/ripple-framework",
"main": "./nuxt.config.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/ripple-tide-publication/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@dpc-sdp/ripple-tide-publication",
"description": "Ripple mappings and components for Tide Publication Content type",
"version": "2.17.1",
"version": "2.17.2",
"license": "Apache-2.0",
"repository": "https://github.com/dpc-sdp/ripple-framework",
"main": "./nuxt.config.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/ripple-tide-search/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@dpc-sdp/ripple-tide-search",
"description": "Ripple search UI and services for connecting to Tide search",
"version": "2.17.1",
"version": "2.17.2",
"license": "Apache-2.0",
"repository": "https://github.com/dpc-sdp/ripple-framework",
"main": "./nuxt.config.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/ripple-tide-topic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"./mapping": "./mapping/index.ts",
"./types": "./types.ts"
},
"version": "2.17.1",
"version": "2.17.2",
"dependencies": {
"@dpc-sdp/nuxt-ripple": "workspace:*",
"@dpc-sdp/ripple-tide-api": "workspace:*",
Expand Down
2 changes: 1 addition & 1 deletion packages/ripple-tide-webform/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@dpc-sdp/ripple-tide-webform",
"description": "Ripple mappings and components for Tide webforms",
"version": "2.17.1",
"version": "2.17.2",
"license": "Apache-2.0",
"repository": "https://github.com/dpc-sdp/ripple-framework",
"main": "./nuxt.config.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/ripple-ui-core/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@dpc-sdp/ripple-ui-core",
"description": "Ripple UI Core component library",
"version": "2.17.1",
"version": "2.17.2",
"license": "Apache-2.0",
"repository": "https://github.com/dpc-sdp/ripple-framework",
"files": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,25 @@ This is a more real world example, but this time it's too deep. The ideal number
{SingleTemplate.bind()}
</Story>
</Canvas>

## Example / Collapse inner links

<Canvas>
<Story
name='Example/Collapse inner links'
play={a11yStoryCheck}
args={{
items: [
{ text: 'Home', url: '/' },
{ text: 'About the VIC Government', url: '#' },
{ text: 'The state government', url: '#' },
{ text: 'Victoria is the state', url: '#' },
{ text: 'VIC government data', url: '#' },
{ text: "Using Victoria's data", url: '#' }
],
collapse: true
}}
>
{SingleTemplate.bind()}
</Story>
</Canvas>
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,14 @@ interface Props {
items: IRplBreadcrumbsItem[]
besideQuickExit?: boolean
displayBeforeCollapse?: number
collapse?: boolean
}
const props = withDefaults(defineProps<Props>(), {
items: () => [],
besideQuickExit: false,
displayBeforeCollapse: 3
displayBeforeCollapse: 3,
collapse: false
})
const emit = defineEmits<{
Expand Down Expand Up @@ -50,14 +52,17 @@ const handleClick = (item, index) => {
)
}
const initialCollapseInnerLinks =
props.collapse || breadcrumbsCollapseInnerLinks!
const collapseInnerLinks = ref()
collapseInnerLinks.value =
props.items.length > breadcrumbsCollapseInnerLinks!
? props.displayBeforeCollapse
: 0
collapseInnerLinks.value = initialCollapseInnerLinks
? props.displayBeforeCollapse
: 0
const firstItem = (index: number) => index === 0
const lastItem = (index: number) => index === props.items.length - 1
const secondLastItem = (index: number) => index === props.items.length - 2
const toggleCollapsed = () => {
collapseInnerLinks.value = 0
Expand All @@ -77,47 +82,59 @@ const toggleCollapsed = () => {
v-if="items.length > 0"
:class="[
'rpl-breadcrumbs__items',
'rpl-type-p-small',
{ 'rpl-type-p-small': initialCollapseInnerLinks },
{ 'rpl-type-p': !initialCollapseInnerLinks },
{ 'rpl-breadcrumbs__items--collapsed': collapseInnerLinks }
]"
>
<li
v-for="(item, index) of items"
:key="index"
:class="[
'rpl-breadcrumbs__item',
{ 'rpl-breadcrumbs__item--parent': index === items.length - 1 },
{
'rpl-breadcrumbs__item--first':
firstItem(index) && collapseInnerLinks
},
{
'rpl-breadcrumbs__item--collapsed':
!firstItem(index) && !lastItem(index) && collapseInnerLinks
}
]"
>
<RplTextLink
:url="item.url"
:theme="false"
class="rpl-breadcrumbs__item-link"
@click="() => handleClick(item, index)"
>{{ item.text }}</RplTextLink
>
<span
v-if="firstItem(index) && collapseInnerLinks"
class="rpl-breadcrumbs__collapse-link"
<template v-for="(item, index) of items" :key="index">
<li
v-if="!initialCollapseInnerLinks || !lastItem(index)"
:class="[
'rpl-breadcrumbs__item',
{
'rpl-breadcrumbs__item--parent': index === items.length - 2
},
{
'rpl-breadcrumbs__item--first':
firstItem(index) && collapseInnerLinks
},
{
'rpl-breadcrumbs__item--collapsed':
!firstItem(index) &&
!secondLastItem(index) &&
collapseInnerLinks
}
]"
>
<button
class="rpl-text-link rpl-u-focusable-inline rpl-breadcrumbs__collapse-link-trigger"
type="button"
aria-label="Expand hidden breadcrumbs"
@click.prevent="() => toggleCollapsed()"
<RplTextLink
v-if="!lastItem(index) || collapseInnerLinks"
:url="item.url"
:theme="false"
class="rpl-breadcrumbs__item-link"
@click="() => handleClick(item, index)"
>{{ item.text }}</RplTextLink
>
<span
v-if="firstItem(index) && collapseInnerLinks"
class="rpl-breadcrumbs__collapse-link"
>
<button
class="rpl-text-link rpl-u-focusable-inline rpl-breadcrumbs__collapse-link-trigger"
type="button"
aria-label="Expand hidden breadcrumbs"
@click.prevent="() => toggleCollapsed()"
>
&hellip;
</button>
</span>
<span
v-if="!initialCollapseInnerLinks && lastItem(index)"
class="rpl-breadcrumbs__item--current"
>{{ item.text }}</span
>
&hellip;
</button>
</span>
</li>
</li>
</template>
</ol>
</nav>
</template>
Expand Down
2 changes: 1 addition & 1 deletion packages/ripple-ui-forms/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@dpc-sdp/ripple-ui-forms",
"description": "A form component library built with Formkit",
"version": "2.17.1",
"version": "2.17.2",
"license": "Apache-2.0",
"repository": "https://github.com/dpc-sdp/ripple-framework",
"main": "./dist/rpl-forms.umd.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/ripple-ui-maps/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@dpc-sdp/ripple-ui-maps",
"description": "Ripple UI Core component library",
"version": "2.17.1",
"version": "2.17.2",
"license": "Apache-2.0",
"repository": "https://github.com/dpc-sdp/ripple-framework",
"files": [
Expand Down
2 changes: 1 addition & 1 deletion packages/stylelint-config-ripple/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@dpc-sdp/stylelint-config-ripple",
"description": "ESLint config for Ripple projects",
"version": "2.17.1",
"version": "2.17.2",
"license": "Apache-2.0",
"repository": "https://github.com/dpc-sdp/ripple-framework",
"main": "index.js",
Expand Down

0 comments on commit dfef973

Please sign in to comment.