Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/public-ui/kolibri into 6…
Browse files Browse the repository at this point in the history
…254_create-tests-for-untested-components

Refs: #6254
  • Loading branch information
anicyne committed May 14, 2024
2 parents 2bff389 + 3bbabbb commit db9e57f
Show file tree
Hide file tree
Showing 78 changed files with 4,533 additions and 8,211 deletions.
31 changes: 15 additions & 16 deletions .github/workflows/auto-dependency-updater.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: Auto dependency updater

env:
issue: 6350
version: v2

on:
schedule:
- cron: '0 2 * * *'
Expand All @@ -13,9 +17,8 @@ jobs:
with:
fetch-depth: 0
persist-credentials: false
ref: 'develop'

# - uses: pnpm/action-setup@v3
# - uses: pnpm/action-setup@v4
# with:
# run_install: false
# version: 8
Expand All @@ -25,48 +28,44 @@ jobs:
# node-version: 20

# https://github.com/pnpm/action-setup#use-cache-to-reduce-installation-time
- name: Install Node.js
uses: actions/setup-node@v4
- uses: actions/setup-node@v4
with:
# cache: pnpm
node-version: 20
- uses: pnpm/action-setup@v3
name: Install pnpm
- uses: pnpm/action-setup@v4
id: pnpm-install
with:
version: 8
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
run: echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store # -${{ hashFiles('**/pnpm-lock.yaml') }}
key: ${{ runner.os }}-pnpm-store
restore-keys: |
${{ runner.os }}-pnpm-store
- name: Create new branch
run: git checkout -b chore-v2/auto-update-deps
- name: Create update branch
run: git checkout -b ${{env.issue}}-${{env.version}}/auto-update-deps
- name: Install
run: pnpm i --workspace-root
- name: Update dependencies
run: pnpm run update
run: pnpm ncu:minor
- name: Reinstall dependencies
run: pnpm i
run: pnpm i --no-frozen-lockfile
- name: Commit changed files
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add **/package.json pnpm-lock.yaml
git status
git commit -m "chore: update dependencies and lock file"
HUSKY=0 git commit -m "chore: update dependencies and lock file"
- uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: chore-v2/auto-update-deps
branch: ${{env.issue}}-${{env.version}}/auto-update-deps
force: true
4 changes: 2 additions & 2 deletions .github/workflows/auto-file-generator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
persist-credentials: false
ref: 'develop'

# - uses: pnpm/action-setup@v3
# - uses: pnpm/action-setup@v4
# with:
# run_install: false
# version: 8
Expand All @@ -30,7 +30,7 @@ jobs:
with:
# cache: pnpm
node-version: 20
- uses: pnpm/action-setup@v3
- uses: pnpm/action-setup@v4
name: Install pnpm
id: pnpm-install
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
fetch-depth: 0
persist-credentials: false

# - uses: pnpm/action-setup@v3
# - uses: pnpm/action-setup@v4
# with:
# run_install: false
# version: 8
Expand All @@ -34,7 +34,7 @@ jobs:
# cache: pnpm
node-version: 20
- name: Install pnpm
uses: pnpm/action-setup@v3
uses: pnpm/action-setup@v4
id: pnpm-install
with:
version: 8
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cla.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: 'CLA Assistant'
if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request_target'
# Beta Release
uses: contributor-assistant/github-action@v2.3.2
uses: contributor-assistant/github-action@v2.4.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# the below token should have repo scope and must be manually added by you in the repository's secret
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/draft-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
with:
node-version: 20
- name: Install pnpm
uses: pnpm/action-setup@v3
uses: pnpm/action-setup@v4
id: pnpm-install
with:
version: 8
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
registry-url: '${{env.registry}}'
scope: '@public-ui'
- name: Install pnpm
uses: pnpm/action-setup@v3
uses: pnpm/action-setup@v4
id: pnpm-install
with:
version: 8
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
with:
node-version: 20
- name: Install pnpm
uses: pnpm/action-setup@v3
uses: pnpm/action-setup@v4
id: pnpm-install
with:
version: 8
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-snapshots.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
node-version: 20

- name: Install pnpm
uses: pnpm/action-setup@v3
uses: pnpm/action-setup@v4
id: pnpm-install
with:
version: 8
Expand Down
5 changes: 4 additions & 1 deletion packages/components/src/components/input-date/component.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { JSX } from '@stencil/core';
import { type MsgPropType, propagateFocus, showExpertSlot } from '../../schema';
import { type MsgPropType, propagateFocus, showExpertSlot, deprecatedHint } from '../../schema';
import { Component, Element, Fragment, h, Host, Method, Prop, State, Watch } from '@stencil/core';

import { nonce } from '../../utils/dev.utils';
Expand Down Expand Up @@ -422,6 +422,9 @@ export class KolInputDate implements InputDateAPI {

@Watch('_value')
public validateValue(value?: Iso8601 | Date | null): void {
if (value instanceof Date) {
deprecatedHint('Date type will be removed in v3. Use `Iso8601` instead.');
}
this.controller.validateValueEx(value, (v) => {
if (v === '' && this.ref) {
this.ref.value = '';
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/components/nav/component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ export class KolNav implements NavAPI {
_disabled={!collapsible}
_icons={'codicon codicon-' + (expanded ? 'remove' : 'add')}
_hideLabel
_label={`Untermenü zu ${link._label} ${expanded ? 'schließen' : 'öffnen'}`}
_label={`${expanded ? translate('kol-nav-label-close', { placeholders: { label: link._label } }) : translate('kol-nav-label-open', { placeholders: { label: link._label } })}`}
_on={{ onClick: () => this.handleToggleExpansionClick(link._children) }}
></KolButtonWcTag>
);
Expand Down
6 changes: 2 additions & 4 deletions packages/components/src/components/split-button/component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ import type {
ButtonTypePropType,
ButtonVariantPropType,
CustomClassPropType,
DisabledPropType,
HideLabelPropType,
IconsPropType,
LabelPropType,
NamePropType,
Expand Down Expand Up @@ -145,14 +143,14 @@ export class KolSplitButton implements SplitButtonProps /*, SplitButtonAPI*/ {
/**
* Makes the element not focusable and ignore all events.
*/
@Prop() public _disabled?: DisabledPropType = false;
@Prop() public _disabled?: boolean = false;

/**
* Hides the caption by default and displays the caption text with a tooltip when the
* interactive element is focused or the mouse is over it.
* @TODO: Change type back to `HideLabelPropType` after Stencil#4663 has been resolved.
*/
@Prop() public _hideLabel?: HideLabelPropType = false;
@Prop() public _hideLabel?: boolean = false;

/**
* Defines the icon classnames (e.g. `_icons="fa-solid fa-user"`).
Expand Down
2 changes: 2 additions & 0 deletions packages/components/src/locales/de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,6 @@ export default {
'error-list-message': 'Bitte korrigieren Sie folgende Fehler:',
version: 'Versionsnummer',
'table-visible-range': 'Einträge {{start}} bis {{end}} von {{total}}',
'nav-label-open': 'Untermenü zu {{label}} öffnen',
'nav-label-close': 'Untermenü zu {{label}} schließen',
};
2 changes: 2 additions & 0 deletions packages/components/src/locales/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,6 @@ export default {
'error-list-message': 'Please correct the following errors',
version: 'Version number',
'table-visible-range': 'Entries {{start}} to {{end}} of {{total}}',
'nav-label-open': 'Submenu for {{label}} open',
'nav-label-close': 'Submenu for {{label}} close',
};
22 changes: 11 additions & 11 deletions packages/components/src/schema/utils/a11y.tipps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@ export const a11yHint = (msg: string, options?: HintOptions): void => {
}
};

// const deprecatedCache: Set<string> = new Set();
// export const deprecatedHint = (msg: string, options?: HintOptions): void => {
// if (deprecatedCache.has(msg) === false || !!options?.force) {
// deprecatedCache.add(msg);
// Log.warn(([msg] as unknown[]).concat(options?.details || []), {
// classifier: `🔥 deprecated`,
// forceLog: !!options?.force,
// overwriteStyle: '; background-color: #f00',
// });
// }
// };
const deprecatedCache: Set<string> = new Set();
export const deprecatedHint = (msg: string, options?: HintOptions): void => {
if (deprecatedCache.has(msg) === false || !!options?.force) {
deprecatedCache.add(msg);
Log.warn(([msg] as unknown[]).concat(options?.details || []), {
classifier: `🔥 deprecated`,
forceLog: !!options?.force,
overwriteStyle: '; background-color: #f00',
});
}
};

const devCache: Set<string> = new Set();
export const devHint = (msg: string, options?: HintOptions): void => {
Expand Down
4 changes: 2 additions & 2 deletions packages/samples/react/src/react.main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { setTagNameTransformer } from '@public-ui/react';

import { bootstrap } from '@public-ui/components';
import { defineCustomElements } from '@public-ui/components/dist/loader';
import { BMF, BStW, DEFAULT, ECL_EC, ECL_EU, ITZBund } from '@public-ui/themes';
import { BMF, DEFAULT, ECL_EC, ECL_EU, ITZBund } from '@public-ui/themes';

import { App } from './App';

Expand All @@ -29,7 +29,7 @@ const getThemes = async () => {
}

/* List of regular sample app themes */
return [BMF, BStW, DEFAULT, ECL_EC, ECL_EU, ITZBund] as Theme[];
return [BMF, DEFAULT, ECL_EC, ECL_EU, ITZBund] as Theme[];
};

void (async () => {
Expand Down
8 changes: 2 additions & 6 deletions packages/samples/react/src/shares/theme.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { SelectOption } from '@public-ui/components';

export const THEMES = ['bmf', 'bstw', 'default', 'ecl-ec', 'ecl-eu', 'itzbund'] as const;
export const THEMES = ['bmf', 'default', 'ecl-ec', 'ecl-eu', 'itzbund', 'unstyled'] as const;
export type Theme = (typeof THEMES)[number];
export type ThemeAndUnstyled = Theme | 'unstyled';

const drafts: ThemeAndUnstyled[] = ['bstw', 'ecl-ec', 'ecl-eu', 'itzbund'];
const drafts: ThemeAndUnstyled[] = ['ecl-ec', 'ecl-eu', 'itzbund'];

export const isDraftTheme = (theme: ThemeAndUnstyled) => drafts.includes(theme);

Expand All @@ -26,10 +26,6 @@ export const THEME_OPTIONS: SelectOption<ThemeAndUnstyled>[] = [
label: 'Bundesministerium der Finanzen (Tested)',
value: 'bmf',
},
{
label: 'BStW (Draft)',
value: 'bstw',
},
{
label: 'Default (Tested)',
value: 'default',
Expand Down
2 changes: 2 additions & 0 deletions packages/themes/bmf/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
"format": "prettier --check src",
"lint": "tsc --noemit && eslint src",
"prepack": "pnpm build",
"start": "npm-run-all --parallel dev serve",
"serve": "cross-env THEME_MODULE=\"`pwd`/dist\" THEME_EXPORT=BMF npm --prefix \"node_modules/@public-ui/sample-react/\" start",
"test": "THEME_MODULE=dist THEME_EXPORT=BMF kolibri-visual-test",
"test-update": "THEME_MODULE=dist THEME_EXPORT=BMF kolibri-visual-test --update-snapshots theme-snapshots.spec.js",
"pretest": "pnpm build",
Expand Down
13 changes: 0 additions & 13 deletions packages/themes/bstw/.eslintrc.cjs

This file was deleted.

0 comments on commit db9e57f

Please sign in to comment.