-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: align image, logo and kolibri (#5531)
- Loading branch information
Showing
74 changed files
with
150 additions
and
138 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
@layer kol-component { | ||
:host { | ||
display: inline-block; | ||
} | ||
img { | ||
max-height: 100%; | ||
max-width: 100%; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
@import url(../style.css); | ||
@layer kol-component { | ||
:host { | ||
display: block; | ||
display: inline-block; | ||
} | ||
|
||
text { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+51.3 KB
(300%)
...s/themes/bmf/snapshots/theme-bmf/snapshot-for-card-selection-firefox-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+132 KB
(3700%)
...ages/themes/bmf/snapshots/theme-bmf/snapshot-for-image-basic-firefox-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+2.73 KB
(130%)
packages/themes/bmf/snapshots/theme-bmf/snapshot-for-logo-basic-firefox-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+10 KB
(190%)
packages/themes/bmf/snapshots/theme-bmf/snapshot-for-nav-active-firefox-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+34.1 KB
(160%)
...s/bmf/snapshots/theme-bmf/snapshot-for-table-with-pagination-firefox-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+48.6 KB
(220%)
...themes/bzst/snapshots/theme-bzst/snapshot-for-card-selection-firefox-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+132 KB
(3700%)
...es/themes/bzst/snapshots/theme-bzst/snapshot-for-image-basic-firefox-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+2.83 KB
(130%)
...ges/themes/bzst/snapshots/theme-bzst/snapshot-for-logo-basic-firefox-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+9.05 KB
(190%)
...ges/themes/bzst/snapshots/theme-bzst/snapshot-for-nav-active-firefox-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+36.1 KB
(170%)
...bzst/snapshots/theme-bzst/snapshot-for-table-with-pagination-firefox-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+51.1 KB
(310%)
.../default/snapshots/theme-default/snapshot-for-card-selection-firefox-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+132 KB
(3700%)
...mes/default/snapshots/theme-default/snapshot-for-image-basic-firefox-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+2.73 KB
(130%)
...emes/default/snapshots/theme-default/snapshot-for-logo-basic-firefox-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+10 KB
(200%)
...emes/default/snapshots/theme-default/snapshot-for-nav-active-firefox-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+35.5 KB
(170%)
...t/snapshots/theme-default/snapshot-for-table-with-pagination-firefox-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+40.5 KB
(200%)
...hemes/ecl/snapshots/theme-ecl_ec/snapshot-for-card-selection-firefox-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+132 KB
(3700%)
...s/themes/ecl/snapshots/theme-ecl_ec/snapshot-for-image-basic-firefox-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+2.83 KB
(130%)
...es/themes/ecl/snapshots/theme-ecl_ec/snapshot-for-logo-basic-firefox-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+14.7 KB
(200%)
...es/themes/ecl/snapshots/theme-ecl_ec/snapshot-for-nav-active-firefox-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+36.2 KB
(170%)
...cl/snapshots/theme-ecl_ec/snapshot-for-table-with-pagination-firefox-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+40.5 KB
(200%)
...hemes/ecl/snapshots/theme-ecl_eu/snapshot-for-card-selection-firefox-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+132 KB
(3700%)
...s/themes/ecl/snapshots/theme-ecl_eu/snapshot-for-image-basic-firefox-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+2.83 KB
(130%)
...es/themes/ecl/snapshots/theme-ecl_eu/snapshot-for-logo-basic-firefox-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+14.6 KB
(200%)
...es/themes/ecl/snapshots/theme-ecl_eu/snapshot-for-nav-active-firefox-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+39.5 KB
(170%)
...cl/snapshots/theme-ecl_eu/snapshot-for-table-with-pagination-firefox-darwin.png
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+50 KB
(250%)
.../itzbund/snapshots/theme-itzbund/snapshot-for-card-selection-firefox-darwin.png
Oops, something went wrong.
Binary file modified
BIN
+132 KB
(3700%)
...mes/itzbund/snapshots/theme-itzbund/snapshot-for-image-basic-firefox-darwin.png
Oops, something went wrong.
Binary file modified
BIN
+2.83 KB
(130%)
...emes/itzbund/snapshots/theme-itzbund/snapshot-for-logo-basic-firefox-darwin.png
Oops, something went wrong.
Binary file modified
BIN
+9.99 KB
(200%)
...emes/itzbund/snapshots/theme-itzbund/snapshot-for-nav-active-firefox-darwin.png
Oops, something went wrong.
Binary file modified
BIN
+34.4 KB
(160%)
...d/snapshots/theme-itzbund/snapshot-for-table-with-pagination-firefox-darwin.png
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+51.1 KB
(300%)
...s/themes/mfm/snapshots/theme-mfm/snapshot-for-card-selection-firefox-darwin.png
Oops, something went wrong.
Binary file modified
BIN
+132 KB
(3700%)
...ages/themes/mfm/snapshots/theme-mfm/snapshot-for-image-basic-firefox-darwin.png
Oops, something went wrong.
Binary file modified
BIN
+2.73 KB
(130%)
packages/themes/mfm/snapshots/theme-mfm/snapshot-for-logo-basic-firefox-darwin.png
Oops, something went wrong.
Binary file modified
BIN
+9.73 KB
(190%)
packages/themes/mfm/snapshots/theme-mfm/snapshot-for-nav-active-firefox-darwin.png
Oops, something went wrong.
Binary file modified
BIN
+36.7 KB
(170%)
...s/mfm/snapshots/theme-mfm/snapshot-for-table-with-pagination-firefox-darwin.png
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+57.5 KB
(330%)
...themes/zoll/snapshots/theme-mapz/snapshot-for-card-selection-firefox-darwin.png
Oops, something went wrong.
Binary file modified
BIN
-31.8 KB
(92%)
.../themes/zoll/snapshots/theme-mapz/snapshot-for-handout-basic-firefox-darwin.png
Oops, something went wrong.
Binary file modified
BIN
+132 KB
(3700%)
...es/themes/zoll/snapshots/theme-mapz/snapshot-for-image-basic-firefox-darwin.png
Oops, something went wrong.
Binary file modified
BIN
+2.64 KB
(130%)
...ges/themes/zoll/snapshots/theme-mapz/snapshot-for-logo-basic-firefox-darwin.png
Oops, something went wrong.
Binary file modified
BIN
+10.9 KB
(200%)
...ges/themes/zoll/snapshots/theme-mapz/snapshot-for-nav-active-firefox-darwin.png
Oops, something went wrong.
Binary file modified
BIN
+34.7 KB
(160%)
...zoll/snapshots/theme-mapz/snapshot-for-table-with-pagination-firefox-darwin.png
Oops, something went wrong.
Binary file modified
BIN
+34.1 KB
(180%)
...emes/zoll/snapshots/theme-zollv2/snapshot-for-card-selection-firefox-darwin.png
Oops, something went wrong.
Binary file modified
BIN
+132 KB
(3700%)
.../themes/zoll/snapshots/theme-zollv2/snapshot-for-image-basic-firefox-darwin.png
Oops, something went wrong.
Binary file modified
BIN
+2.64 KB
(130%)
...s/themes/zoll/snapshots/theme-zollv2/snapshot-for-logo-basic-firefox-darwin.png
Oops, something went wrong.
Binary file modified
BIN
+11.7 KB
(190%)
...s/themes/zoll/snapshots/theme-zollv2/snapshot-for-nav-active-firefox-darwin.png
Oops, something went wrong.
Binary file modified
BIN
+34.8 KB
(170%)
...ll/snapshots/theme-zollv2/snapshot-for-table-with-pagination-firefox-darwin.png
Oops, something went wrong.
Binary file modified
BIN
+33.9 KB
(180%)
...emes/zoll/snapshots/theme-zollv3/snapshot-for-card-selection-firefox-darwin.png
Oops, something went wrong.
Binary file modified
BIN
+132 KB
(3700%)
.../themes/zoll/snapshots/theme-zollv3/snapshot-for-image-basic-firefox-darwin.png
Oops, something went wrong.
Binary file modified
BIN
+2.64 KB
(130%)
...s/themes/zoll/snapshots/theme-zollv3/snapshot-for-logo-basic-firefox-darwin.png
Oops, something went wrong.
Binary file modified
BIN
+11.7 KB
(190%)
...s/themes/zoll/snapshots/theme-zollv3/snapshot-for-nav-active-firefox-darwin.png
Oops, something went wrong.
Binary file modified
BIN
+35.3 KB
(160%)
...ll/snapshots/theme-zollv3/snapshot-for-table-with-pagination-firefox-darwin.png
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,58 @@ | ||
# KoliBri - Visual Tests | ||
|
||
## Motivation | ||
|
||
The `KoliBri` Visual Tests provide a way to add visual regression testing to **theme** modules. | ||
It takes screenshots of every component defined in the [React Sample App](https://github.com/public-ui/kolibri/tree/develop/packages/samples/react) with the theme applied and compares them to their references. | ||
|
||
## Installation | ||
|
||
You can install the `KoliBri` Visual Tests with `npm`, `pnpm` or `yarn`: | ||
|
||
```bash | ||
npm i -D @public-ui/visual-tests | ||
pnpm i -D @public-ui/visual-tests | ||
yarn add -D @public-ui/visual-tests | ||
``` | ||
|
||
## Usage | ||
|
||
Add the following npm scripts to the theme's `package.json`: | ||
|
||
```json | ||
{ | ||
"name": "{{kebab name}}", | ||
"version": "0.0.0", | ||
"description": "{{description}}", | ||
"author": { | ||
"name": "{{author}}", | ||
"email": "{{email}}" | ||
}, | ||
"license": "EUPL-1.2", | ||
"private": false, | ||
"scripts": { | ||
"test": "THEME_MODULE=src/index THEME_EXPORT=THEME_NAME kolibri-visual-test", | ||
"test-update": "THEME_MODULE=src/index THEME_EXPORT=THEME_NAME kolibri-visual-test --update-snapshots" | ||
} | ||
"build": "unbuild", | ||
"depcheck": "depcheck", | ||
"format": "prettier --check src", | ||
"lint": "eslint src", | ||
"prepack": "unbuild", | ||
"test": "THEME_MODULE=src/index THEME_EXPORT={{capital name}} kolibri-visual-test", | ||
"test-update": "THEME_MODULE=src/index THEME_EXPORT={{capital name}} kolibri-visual-test --update-snapshots theme-snapshots.spec.js", | ||
"unused": "knip" | ||
}, | ||
"devDependencies": { | ||
"@public-ui/components": "2.0.0-rc.7", | ||
"@public-ui/schema": "2.0.0-rc.7", | ||
"@public-ui/visual-tests": "2.0.0-rc.7", | ||
"@typescript-eslint/eslint-plugin": "6.8.0", | ||
"@typescript-eslint/parser": "6.8.0", | ||
"depcheck": "1.4.7", | ||
"eslint": "8.51.0", | ||
"eslint-config-prettier": "9.0.0", | ||
"eslint-plugin-html": "7.1.0", | ||
"eslint-plugin-jsdoc": "46.8.2", | ||
"eslint-plugin-json": "3.1.0", | ||
"eslint-plugin-no-loops": "0.3.0", | ||
"knip": "2.35.0", | ||
"npm-check-updates": "16.14.6", | ||
"prettier": "3.0.3", | ||
"unbuild": "1.2.1" | ||
}, | ||
"peerDependencies": { | ||
"@public-ui/components": "2.0.0-rc.7" | ||
}, | ||
"sideEffects": false, | ||
"type": "module", | ||
"exports": { | ||
".": { | ||
"types": "./dist/index.d.ts", | ||
"import": "./dist/index.mjs", | ||
"require": "./dist/index.cjs" | ||
} | ||
}, | ||
"main": "./dist/index.cjs", | ||
"module": "./dist/index.mjs", | ||
"types": "./dist/index.d.ts", | ||
"files": [ | ||
"assets", | ||
"dist" | ||
] | ||
} | ||
``` | ||
|
||
- `THEME_MODULE` defines the relative path to the TypeScript module containing the the theme definitions. Without file extension. | ||
- `THEME_EXPERT` defines the name of the export within the the module. (e.g., `export const THEME_NAME = {/**/};`) Defaults to `default`. | ||
|
||
Run the tests with `npm test`. The first time, this will create a new folder `snapshots` which is supposed to be committed to the repository. | ||
In the following runs, new screenshots will be compared to this reference. | ||
|
||
To update the reference screenshots call `npm run test-update`. | ||
|
||
It's recommended to add the `test-results` folder to the `.gitignore` file: | ||
|
||
```bash | ||
/test-results/ | ||
``` | ||
|
||
It's also recommended to automatically run the tests before packing/publishing the module: | ||
|
||
```json | ||
{ | ||
"scripts": { | ||
"prepack": "npm test" | ||
} | ||
} | ||
``` |
Oops, something went wrong.