-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into refactor/293-restruct…
…ure-child-components
- Loading branch information
Showing
36 changed files
with
263 additions
and
59 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
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"sit-onyx": minor | ||
--- | ||
|
||
feat: implement OnyxColorSchemeMenuItem |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"sit-onyx": patch | ||
--- | ||
|
||
fix(OnyxMenuItem): make whole button/anchor clickable |
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,5 +1,13 @@ | ||
# alpha-test-app | ||
|
||
## 0.1.0-alpha.159 | ||
|
||
### Patch Changes | ||
|
||
- Updated dependencies [90f9f86] | ||
- Updated dependencies [90f9f86] | ||
- [email protected] | ||
|
||
## 0.1.0-alpha.158 | ||
|
||
### Patch Changes | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,13 @@ | ||
# playground | ||
|
||
## 0.0.1-alpha.101 | ||
|
||
### Patch Changes | ||
|
||
- Updated dependencies [90f9f86] | ||
- Updated dependencies [90f9f86] | ||
- [email protected] | ||
|
||
## 0.0.1-alpha.100 | ||
|
||
### Patch Changes | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,13 @@ | ||
# @sit-onyx/chartjs-plugin | ||
|
||
## 1.0.0-alpha.118 | ||
|
||
### Patch Changes | ||
|
||
- Updated dependencies [90f9f86] | ||
- Updated dependencies [90f9f86] | ||
- [email protected] | ||
|
||
## 1.0.0-alpha.117 | ||
|
||
### Patch Changes | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,13 @@ | ||
# @sit-onyx/nuxt | ||
|
||
## 1.0.0-alpha.44 | ||
|
||
### Patch Changes | ||
|
||
- Updated dependencies [90f9f86] | ||
- Updated dependencies [90f9f86] | ||
- [email protected] | ||
|
||
## 1.0.0-alpha.43 | ||
|
||
### Patch Changes | ||
|
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 added
BIN
+16.2 KB
...ts/components/OnyxColorSchemeMenuItem/Color-scheme-menu-item-chromium-linux.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 added
BIN
+21.1 KB
...ots/components/OnyxColorSchemeMenuItem/Color-scheme-menu-item-firefox-linux.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 added
BIN
+14 KB
...hots/components/OnyxColorSchemeMenuItem/Color-scheme-menu-item-webkit-linux.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
55 changes: 55 additions & 0 deletions
55
.../src/components/OnyxNavBar/modules/OnyxColorSchemeMenuItem/OnyxColorSchemeMenuItem.ct.tsx
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 |
---|---|---|
@@ -0,0 +1,55 @@ | ||
import { expect, test } from "../../../../playwright/a11y"; | ||
import { executeMatrixScreenshotTest } from "../../../../playwright/screenshots"; | ||
import type { ColorSchemeValue } from "../OnyxColorSchemeDialog/types"; | ||
import OnyxColorSchemeMenuItem from "./OnyxColorSchemeMenuItem.vue"; | ||
|
||
test.describe("Screenshot tests", () => { | ||
executeMatrixScreenshotTest({ | ||
name: "Color scheme menu item", | ||
columns: ["default"], | ||
rows: ["default", "hover"], | ||
// TODO: remove when contrast issues are fixed in https://github.com/SchwarzIT/onyx/issues/410 | ||
disabledAccessibilityRules: ["color-contrast"], | ||
component: () => ( | ||
<ul style={{ listStyle: "none", padding: 0 }}> | ||
<OnyxColorSchemeMenuItem modelValue="auto" /> | ||
</ul> | ||
), | ||
beforeScreenshot: async (component, page, column, row) => { | ||
if (row === "hover") await component.getByText("Appearance: Auto").hover(); | ||
}, | ||
}); | ||
}); | ||
|
||
test("should behave correctly", async ({ page, mount }) => { | ||
const modelValueEvents: ColorSchemeValue[] = []; | ||
|
||
// ARRANGE | ||
const component = await mount(OnyxColorSchemeMenuItem, { | ||
props: { | ||
modelValue: "auto", | ||
}, | ||
on: { | ||
"update:modelValue": (value: ColorSchemeValue) => modelValueEvents.push(value), | ||
}, | ||
}); | ||
|
||
// ASSERT | ||
await expect(component).toContainText("Appearance: Auto"); | ||
|
||
// ACT | ||
await component.click(); | ||
|
||
// ASSERT | ||
const dialog = page.getByRole("dialog"); | ||
await expect(dialog).toBeVisible(); | ||
|
||
// ACT | ||
await dialog.getByRole("heading", { name: "Light" }).click(); | ||
await dialog.getByRole("button", { name: "Apply" }).click(); | ||
await component.update({ props: { modelValue: "light" } }); | ||
|
||
// ASSERT | ||
await expect(modelValueEvents).toStrictEqual(["light"]); | ||
await expect(component).toContainText("Appearance: Light"); | ||
}); |
30 changes: 30 additions & 0 deletions
30
.../components/OnyxNavBar/modules/OnyxColorSchemeMenuItem/OnyxColorSchemeMenuItem.stories.ts
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { defineStorybookActionsAndVModels } from "@sit-onyx/storybook-utils"; | ||
import type { Meta, StoryObj } from "@storybook/vue3"; | ||
import OnyxColorSchemeMenuItem from "./OnyxColorSchemeMenuItem.vue"; | ||
|
||
/** | ||
* Pre-built menu item for the `OnyxUserMenu` that can be used inside the nav bar to | ||
* display the current color scheme to the user and allow changing it by displaying a `OnyxColorSchemeDialog`. | ||
*/ | ||
const meta: Meta<typeof OnyxColorSchemeMenuItem> = { | ||
title: "Navigation/modules/ColorSchemeMenuItem", | ||
...defineStorybookActionsAndVModels({ | ||
component: OnyxColorSchemeMenuItem, | ||
events: ["update:modelValue"], | ||
decorators: [ | ||
(story) => ({ | ||
components: { story }, | ||
template: `<div style="max-width: 16rem;"> <story /> </div>`, | ||
}), | ||
], | ||
}), | ||
}; | ||
|
||
export default meta; | ||
type Story = StoryObj<typeof OnyxColorSchemeMenuItem>; | ||
|
||
export const Default = { | ||
args: { | ||
modelValue: "auto", | ||
}, | ||
} satisfies Story; |
Oops, something went wrong.