Skip to content

Commit

Permalink
Re-add url field (#493)
Browse files Browse the repository at this point in the history
  • Loading branch information
Haberkamp authored Feb 5, 2025
1 parent 3428dfc commit 4e96d91
Show file tree
Hide file tree
Showing 21 changed files with 979 additions and 11 deletions.
5 changes: 5 additions & 0 deletions .changeset/curvy-lizards-allow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@shopware-ag/meteor-component-library": patch
---

Allow toggling the http protocol in mt-url-field using the keyboard
5 changes: 5 additions & 0 deletions .changeset/empty-points-applaud.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@shopware-ag/meteor-component-library": minor
---

Add mt-url-field
5 changes: 5 additions & 0 deletions .changeset/good-turkeys-develop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@shopware-ag/meteor-component-library": patch
---

Disable mt-url-field when inheritance is linked
5 changes: 5 additions & 0 deletions .changeset/nervous-cows-search.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@shopware-ag/meteor-component-library": patch
---

Stop emitting update:modelValue event when component gets created
5 changes: 5 additions & 0 deletions .changeset/orange-taxis-wait.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@shopware-ag/meteor-component-library": patch
---

Do not change the http protocol in mt-url-field when clicking the protocol button and the input field is inherited
5 changes: 5 additions & 0 deletions .changeset/red-colts-sin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@shopware-ag/meteor-component-library": patch
---

Allow mt-url-field to be required
5 changes: 5 additions & 0 deletions .changeset/small-pants-serve.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@shopware-ag/meteor-component-library": patch
---

emit update:modelValue every time the user types into the mt-url-field
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
import { userEvent, within } from "@storybook/test";
import meta, { type MtUrlFieldMeta, type MtUrlFieldStory } from "./mt-url-field.stories";

export default {
...meta,
title: "Interaction Tests/Form/mt-url-field",
} as MtUrlFieldMeta;

export const VisualTestFocused: MtUrlFieldStory = {
name: "Focused",
args: {
modelValue: "https://example.com",
},
async play({ canvasElement }) {
const canvas = within(canvasElement);

await userEvent.click(canvas.getByRole("textbox"));
},
};

export const VisualTestHttps: MtUrlFieldStory = {
name: "shows HTTPS mode",
args: {
modelValue: "https://example.com",
},
};

export const VisualTestHttp: MtUrlFieldStory = {
name: "shows HTTP mode",
args: {
modelValue: "http://example.com",
},
};

export const VisualTestDisabled: MtUrlFieldStory = {
name: "Disabled",
args: {
modelValue: "https://example.com",
disabled: true,
},
};

export const VisualTestLinkedInheritance: MtUrlFieldStory = {
name: "Linked inheritance",
args: {
modelValue: "https://example.com",
isInheritanceField: true,
isInherited: true,
},
};

export const VisualTestUnlinkedInheritance: MtUrlFieldStory = {
name: "Linked inheritance",
args: {
modelValue: "https://example.com",
isInheritanceField: true,
isInherited: false,
},
};

export const VisualTestSuffix: MtUrlFieldStory = {
name: "With suffix",
args: {
modelValue: "https://example.com",
suffix: "suffix",
},
};

export const VisualTestError: MtUrlFieldStory = {
name: "Error",
args: {
modelValue: "https://example.com",
error: {
detail: "This is an error",
},
},
};

export const VisualTestSmall: MtUrlFieldStory = {
name: "Small",
args: {
modelValue: "https://example.com",
size: "small",
},
};
Loading

0 comments on commit 4e96d91

Please sign in to comment.