diff --git a/storybook/stories/components/DialogTemperedFiles.stories.js b/storybook/stories/components/DialogTemperedFiles.stories.js index c6915d707..137945766 100644 --- a/storybook/stories/components/DialogTemperedFiles.stories.js +++ b/storybook/stories/components/DialogTemperedFiles.stories.js @@ -51,6 +51,8 @@ export const TemperedFiles = { "adminProjetX/themes/new-theme/public/meta.bundle.js", "adminProjetX/themes/new-theme/public/module.bundle.js", ], + container_id: 'tempered_files_container', + content_action: '#', }, play: async () => { const dialog = document.querySelector(".dialog"); diff --git a/storybook/stories/components/RadioCard.stories.js b/storybook/stories/components/RadioCard.stories.js index e09f9b9b0..5b693ca46 100644 --- a/storybook/stories/components/RadioCard.stories.js +++ b/storybook/stories/components/RadioCard.stories.js @@ -58,6 +58,7 @@ export const Default = { update_value: "update", restore_value: "restore", }, + recommended: false, }, }; diff --git a/storybook/stories/components/RadioCardLocal.stories.js b/storybook/stories/components/RadioCardLocal.stories.js index 453a20ca7..cf401451f 100644 --- a/storybook/stories/components/RadioCardLocal.stories.js +++ b/storybook/stories/components/RadioCardLocal.stories.js @@ -37,6 +37,7 @@ export const Local = { releaseNote: "", form_options: { online_value: false, + online_recommended_value: false, local_value: false, }, form_fields: { @@ -53,10 +54,11 @@ export const Local = { zip: ["archive1.zip", "archive2.zip", "archive3.zip"], xml: ["archive1.xml", "archive2.xml", "archive3.xml"], }, - local_requirements: { + requirements: { requirements_ok: true, errors: [], warnings: [], }, + recommended: true, }, }; diff --git a/storybook/stories/components/RadioCardOnline.stories.js b/storybook/stories/components/RadioCardOnline.stories.js index e528a1f41..59fb463b5 100644 --- a/storybook/stories/components/RadioCardOnline.stories.js +++ b/storybook/stories/components/RadioCardOnline.stories.js @@ -32,6 +32,7 @@ export const Online = { disabledMessage: "", form_options: { online_value: false, + online_recommended_value: false, local_value: false, }, form_fields: { @@ -47,11 +48,33 @@ export const Online = { badge_status: "major", release_note: "https://github.com/PrestaShop/autoupgrade", version: "9.0.0", + recommended: false, + message: 'The maximum version of PrestaShop to which you can update your store, based on its PHP version.', }, - online_requirements: { + next_releases: { + online: { + badge_label: "Major version", + badge_status: "major", + release_note: "https://github.com/PrestaShop/autoupgrade", + version: "9.0.0", + recommended: false, + message: 'The maximum version of PrestaShop to which you can update your store, based on its PHP version.', + }, + online_recommended: { + badge_label: "Minor version", + badge_status: "minor", + release_note: "https://github.com/PrestaShop/autoupgrade", + version: "8.2.3", + recommended: true, + message: 'The recommended version of PrestaShop to which you can update your store, based on its PHP version.', + }, + }, + requirements: { requirements_ok: true, errors: [], warnings: [], }, + release_type: 'online', + form_option_online_value: 'online', }, }; diff --git a/storybook/stories/components/RadioCardOnlineRecommended.stories.js b/storybook/stories/components/RadioCardOnlineRecommended.stories.js new file mode 100644 index 000000000..df2bb3dd8 --- /dev/null +++ b/storybook/stories/components/RadioCardOnlineRecommended.stories.js @@ -0,0 +1,79 @@ +/** + * Copyright since 2007 PrestaShop SA and Contributors + * PrestaShop is an International Registered Trademark & Property of PrestaShop SA + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License version 3.0 + * that is bundled with this package in the file LICENSE.md. + * It is also available through the world-wide-web at this URL: + * https://opensource.org/licenses/AFL-3.0 + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@prestashop.com so we can send you a copy immediately. + * + * @author PrestaShop SA and Contributors + * @copyright Since 2007 PrestaShop SA and Contributors + * @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0 + */ + +import RadioCardOnline from "../../../views/templates/components/radio-card-online.html.twig"; + +export default { + component: RadioCardOnline, + title: "Components/Radio card", +}; + +export const OnlineRecommended = { + args: { + updateAssistantDocs: + "https://devdocs.prestashop-project.org/8/basics/keeping-up-to-date/use-autoupgrade-module/", + disabled: false, + disabledMessage: "", + form_options: { + online_value: false, + local_value: false, + }, + form_fields: { + channel: "online", + archive_zip: "online", + archive_xml: "online", + }, + current_values: { + channel: "online", + }, + next_release: { + badge_label: "Minor version", + badge_status: "minor", + release_note: "https://github.com/PrestaShop/autoupgrade", + version: "8.2.3", + recommended: true, + message: 'The recommended version of PrestaShop to which you can update your store, based on its PHP version.', + }, + next_releases: { + online: { + badge_label: "Major version", + badge_status: "major", + release_note: "https://github.com/PrestaShop/autoupgrade", + version: "9.0.0", + recommended: false, + message: 'The maximum version of PrestaShop to which you can update your store, based on its PHP version.', + }, + online_recommended: { + badge_label: "Minor version", + badge_status: "minor", + release_note: "https://github.com/PrestaShop/autoupgrade", + version: "8.2.3", + recommended: true, + message: 'The recommended version of PrestaShop to which you can update your store, based on its PHP version.', + }, + }, + requirements: { + requirements_ok: true, + errors: [], + warnings: [], + }, + release_type: 'online', + form_option_online_value: 'online', + }, +}; diff --git a/storybook/stories/pages/VersionChoice.stories.js b/storybook/stories/pages/VersionChoice.stories.js index 68ecd2c8f..c2cf3eb99 100644 --- a/storybook/stories/pages/VersionChoice.stories.js +++ b/storybook/stories/pages/VersionChoice.stories.js @@ -22,6 +22,7 @@ import { Online } from "../components/RadioCardOnline.stories"; import { Local } from "../components/RadioCardLocal.stories"; import { NoLocalArchive } from "../components/Alert.stories"; import { VersionChoice as Stepper } from "../components/Stepper.stories"; +import { OnlineRecommended } from "../components/RadioCardOnlineRecommended.stories"; export default { component: VersionChoicePage, @@ -45,12 +46,14 @@ export const VersionChoice = { stepper_parent_id: "stepper_content", radio_card_online_parent_id: "radio_card_online", radio_card_archive_parent_id: "radio_card_archive", + radio_card_online_recommended_parent_id: "radio_card_online_recommended", form_route_to_save: "update-step-version-choice-save-form", form_route_to_submit: "update-step-version-choice-submit-form", data_transparency_link: "https://www.prestashop-project.org/data-transparency", // Radio cards ...Online.args, + ...OnlineRecommended.args, ...Local.args, // Stepper ...Stepper.args,