From 5997bb081f0c57f2a83283a93da5edf186c5d26d Mon Sep 17 00:00:00 2001 From: Pierre Recontact Date: Sun, 6 Dec 2020 22:38:02 +0100 Subject: [PATCH 1/2] chore(REC-740): refacto chapter card --- front/components/ArticleCard/ArticleCard.vue | 2 +- front/components/ChapterCard/ChapterCard.vue | 130 ++---------------- .../ChapterCard/Paragraphs/Paragraphs.spec.js | 30 ++++ .../ChapterCard/Paragraphs/Paragraphs.vue | 129 +++++++++++++++++ .../__snapshots__/Paragraphs.spec.js.snap | 33 +++++ .../{ => Paragraphs}/paragraph-link-utils.js | 0 .../paragraph-link-utils.spec.js | 0 .../__snapshots__/ChapterCard.spec.js.snap | 27 +--- 8 files changed, 203 insertions(+), 148 deletions(-) create mode 100644 front/components/ChapterCard/Paragraphs/Paragraphs.spec.js create mode 100644 front/components/ChapterCard/Paragraphs/Paragraphs.vue create mode 100644 front/components/ChapterCard/Paragraphs/__snapshots__/Paragraphs.spec.js.snap rename front/components/ChapterCard/{ => Paragraphs}/paragraph-link-utils.js (100%) rename front/components/ChapterCard/{ => Paragraphs}/paragraph-link-utils.spec.js (100%) diff --git a/front/components/ArticleCard/ArticleCard.vue b/front/components/ArticleCard/ArticleCard.vue index cf5e75cc..6e07ff40 100644 --- a/front/components/ArticleCard/ArticleCard.vue +++ b/front/components/ArticleCard/ArticleCard.vue @@ -51,7 +51,7 @@ target="_blank" rel="noreferrer" class="article__dropbox article__footer__button"> - {{ $t("viewGallery") }} + {{ $t("viewGallery") }} diff --git a/front/components/ChapterCard/ChapterCard.vue b/front/components/ChapterCard/ChapterCard.vue index b503cae1..e35ad429 100644 --- a/front/components/ChapterCard/ChapterCard.vue +++ b/front/components/ChapterCard/ChapterCard.vue @@ -19,86 +19,35 @@ rel="noreferrer" class="chapter__image"> - +`; diff --git a/front/components/ChapterCard/paragraph-link-utils.js b/front/components/ChapterCard/Paragraphs/paragraph-link-utils.js similarity index 100% rename from front/components/ChapterCard/paragraph-link-utils.js rename to front/components/ChapterCard/Paragraphs/paragraph-link-utils.js diff --git a/front/components/ChapterCard/paragraph-link-utils.spec.js b/front/components/ChapterCard/Paragraphs/paragraph-link-utils.spec.js similarity index 100% rename from front/components/ChapterCard/paragraph-link-utils.spec.js rename to front/components/ChapterCard/Paragraphs/paragraph-link-utils.spec.js diff --git a/front/components/ChapterCard/__snapshots__/ChapterCard.spec.js.snap b/front/components/ChapterCard/__snapshots__/ChapterCard.spec.js.snap index 53a3d5dd..8a0486b7 100644 --- a/front/components/ChapterCard/__snapshots__/ChapterCard.spec.js.snap +++ b/front/components/ChapterCard/__snapshots__/ChapterCard.spec.js.snap @@ -11,31 +11,6 @@ exports[`Component | ChapterCard.vue template should match snapshot 1`] = `

An image showing Title of the first paragraph
- + `; From 942e91fa193560e9170dd3b200454f62237b8813 Mon Sep 17 00:00:00 2001 From: Pierre Recontact Date: Sun, 6 Dec 2020 22:59:07 +0100 Subject: [PATCH 2/2] feat(embedded): do not load embedded video by default --- front/components/ChapterCard/ChapterCard.vue | 8 +++---- .../ChapterCard/Paragraphs/Paragraphs.spec.js | 10 +++++++-- .../ChapterCard/Paragraphs/Paragraphs.vue | 22 +++++++++++++++++-- .../__snapshots__/Paragraphs.spec.js.snap | 2 +- 4 files changed, 33 insertions(+), 9 deletions(-) diff --git a/front/components/ChapterCard/ChapterCard.vue b/front/components/ChapterCard/ChapterCard.vue index e35ad429..05decbcd 100644 --- a/front/components/ChapterCard/ChapterCard.vue +++ b/front/components/ChapterCard/ChapterCard.vue @@ -20,16 +20,16 @@ class="chapter__image"> diff --git a/front/components/ChapterCard/Paragraphs/__snapshots__/Paragraphs.spec.js.snap b/front/components/ChapterCard/Paragraphs/__snapshots__/Paragraphs.spec.js.snap index 8528356f..8028a641 100644 --- a/front/components/ChapterCard/Paragraphs/__snapshots__/Paragraphs.spec.js.snap +++ b/front/components/ChapterCard/Paragraphs/__snapshots__/Paragraphs.spec.js.snap @@ -24,7 +24,7 @@ exports[`Component | Paragraphs.vue template should match snapshot with text 1`] `; -exports[`Component | Paragraphs.vue template should match snapshot with video 1`] = ` +exports[`Component | Paragraphs.vue template should match snapshot with video on click on loading button 1`] = `