Skip to content

Commit

Permalink
fix: storybook pages + components errors
Browse files Browse the repository at this point in the history
  • Loading branch information
tblivet committed Dec 5, 2024
1 parent 22f01a1 commit bf88e4b
Show file tree
Hide file tree
Showing 9 changed files with 41 additions and 19 deletions.
9 changes: 0 additions & 9 deletions storybook/stories/components/Dialog.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,6 @@ export const Default = {
dialogSize: "lg",
psBaseUri: "/",
dialogDanger: false,

assets_base_path: "",
},
};

document.addEventListener("DOMContentLoaded", () => {
const dialogs = document.querySelectorAll(".dialog");
dialogs.forEach((dialog) => {
dialog.style.display = "block";
dialog.classList.add("in");
});
});
6 changes: 5 additions & 1 deletion storybook/stories/components/DialogBackup.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ export default {
export const Backup = {
args: {
...Dialog.args,
dialogSize: "md",
dialogSize: "sm",
},
play: async () => {
const dialog = document.querySelector('.dialog');
dialog.showModal();
},
};
6 changes: 5 additions & 1 deletion storybook/stories/components/DialogBackupAll.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ export default {
export const BackupWithImg = {
args: {
...Dialog.args,
dialogSize: "md",
dialogSize: "sm",
},
play: async () => {
const dialog = document.querySelector('.dialog');
dialog.showModal();
},
};
6 changes: 5 additions & 1 deletion storybook/stories/components/DialogBackupDelete.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,11 @@ export const BackupDelete = {
...Dialog.args,
title: "Delete backup",
message: "You are about to delete the <b>autoupgrade_save_8.1.6</b> backup made on <b>15/07/2024 8:00</b>. As it's your only backup, you will be redirected to the module's home page.",
dialogSize: "lg",
dialogSize: "md",
dialogDanger: true,
},
play: async () => {
const dialog = document.querySelector('.dialog');
dialog.showModal();
},
};
6 changes: 5 additions & 1 deletion storybook/stories/components/DialogErrorReport.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@ export const ErrorReport = {
dialogId: "errorDialog",
title: "Send error report?",
message: "",
dialogSize: "md",
dialogSize: "sm",
dataPrivacyLink: "#"
},
play: async () => {
const dialog = document.querySelector('.dialog');
dialog.showModal();
},
};
7 changes: 6 additions & 1 deletion storybook/stories/components/DialogUpdate.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,12 @@ export default {
export const Update = {
args: {
...Dialog.args,
dialogSize: "lg",
dialogSize: "md",
noBackUp: false,
form_route_to_confirm: "/",
},
play: async () => {
const dialog = document.querySelector('.dialog');
dialog.showModal();
},
};
6 changes: 6 additions & 0 deletions storybook/stories/components/LogsProgress.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ import LogsProgress from "../../../views/templates/components/logs-summary.html.
export default {
component: LogsProgress,
title: "Components/Logs progress",
play: async ({ args }) => {
const textSlots = document.querySelectorAll("[data-slot-component='text']");
textSlots.forEach((slot) => {
slot.textContent = args.progressStatus;
});
}
};

export const Default = {
Expand Down
8 changes: 6 additions & 2 deletions storybook/stories/pages/Backup.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,12 @@ export const Backup = {
},
},

form_route_to_save: "update-step-update-options-save-option",
form_route_to_submit: "update-step-update-options-submit-form",
form_route_to_save: "update-step-backup-save-option",
form_route_to_submit: "update-step-backup-submit-backup",
form_route_to_confirm_update: "update-step-backup-confirm-update",
form_route_to_confirm_backup: "update-step-backup-confirm-backup",
form_route_to_submit_update: "update-step-backup-submit-update",
form_route_to_submit_backup: "update-step-update-options-submit-form",

step_parent_id: "ua_container",
// Stepper
Expand Down
6 changes: 3 additions & 3 deletions views/templates/steps/restore.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
{% endblock %}

{% block content %}
{% include "@ModuleAutoUpgrade/components/logs-progress.html.twig" %}

{% include "@ModuleAutoUpgrade/components/logs.html.twig" %}
{% include "@ModuleAutoUpgrade/components/progress-tracker.html.twig" with {
successRoute: 'restore-step-post-restore'
} %}
{% endblock %}

{% block buttons_inner %}
Expand Down

0 comments on commit bf88e4b

Please sign in to comment.