From 883ceb8a95978e3ee22257e78f96c75b68b7bbb7 Mon Sep 17 00:00:00 2001 From: Christian Bedon Date: Fri, 8 Sep 2023 15:24:01 -0500 Subject: [PATCH 1/3] feat: education module within impact dashboard --- src/assets/images/leaf_heart.svg | 9 + .../ImpactDashboard/EducationModule.vue | 75 ++++++ .../ImpactDashboard/EducationPost.vue | 121 +++++++++ .../ImpactDashboard/ImpactDashboardPage.vue | 18 +- .../ImpactDashboard/RecommendedLoanSlide.vue | 233 ------------------ .../ImpactDashboard/RecommendedLoansList.vue | 75 ------ 6 files changed, 219 insertions(+), 312 deletions(-) create mode 100644 src/assets/images/leaf_heart.svg create mode 100644 src/pages/Portfolio/ImpactDashboard/EducationModule.vue create mode 100644 src/pages/Portfolio/ImpactDashboard/EducationPost.vue delete mode 100644 src/pages/Portfolio/ImpactDashboard/RecommendedLoanSlide.vue delete mode 100644 src/pages/Portfolio/ImpactDashboard/RecommendedLoansList.vue diff --git a/src/assets/images/leaf_heart.svg b/src/assets/images/leaf_heart.svg new file mode 100644 index 0000000000..d4f89b872c --- /dev/null +++ b/src/assets/images/leaf_heart.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/src/pages/Portfolio/ImpactDashboard/EducationModule.vue b/src/pages/Portfolio/ImpactDashboard/EducationModule.vue new file mode 100644 index 0000000000..73c304fd1f --- /dev/null +++ b/src/pages/Portfolio/ImpactDashboard/EducationModule.vue @@ -0,0 +1,75 @@ + + + diff --git a/src/pages/Portfolio/ImpactDashboard/EducationPost.vue b/src/pages/Portfolio/ImpactDashboard/EducationPost.vue new file mode 100644 index 0000000000..56203da1cf --- /dev/null +++ b/src/pages/Portfolio/ImpactDashboard/EducationPost.vue @@ -0,0 +1,121 @@ + + + + + diff --git a/src/pages/Portfolio/ImpactDashboard/ImpactDashboardPage.vue b/src/pages/Portfolio/ImpactDashboard/ImpactDashboardPage.vue index 57c9da687e..a15980ade3 100644 --- a/src/pages/Portfolio/ImpactDashboard/ImpactDashboardPage.vue +++ b/src/pages/Portfolio/ImpactDashboard/ImpactDashboardPage.vue @@ -8,11 +8,11 @@
+ - + -
@@ -35,8 +35,8 @@ import DistributionGraphs from './DistributionGraphs'; import KivaCreditStats from './KivaCreditStats'; import LendingInsights from './LendingInsights'; import RecentLoansList from './RecentLoansList'; -import RecommendedLoansList from './RecommendedLoansList'; import YourTeams from './YourTeams'; +import EducationModule from './EducationModule'; export default { name: 'ImpactDashboardPage', @@ -45,17 +45,22 @@ export default { AccountOverview, AccountUpdates, DistributionGraphs, + EducationModule, KivaCreditStats, KvGrid, KvPageContainer, LendingInsights, RecentLoansList, - RecommendedLoansList, TheMyKivaSecondaryMenu, ThePortfolioTertiaryMenu, WwwPage, YourTeams, }, + data() { + return { + showEdModule: true + }; + }, apollo: { preFetch(config, client) { return client.query({ @@ -70,6 +75,11 @@ export default { }); }, }, + methods: { + hideModule(payload) { + this.showEdModule = payload; + } + }, mounted() { // Impact Dashboard page redesign experiment MARS-344 MARS-348 trackExperimentVersion( diff --git a/src/pages/Portfolio/ImpactDashboard/RecommendedLoanSlide.vue b/src/pages/Portfolio/ImpactDashboard/RecommendedLoanSlide.vue deleted file mode 100644 index 46f1ba4db6..0000000000 --- a/src/pages/Portfolio/ImpactDashboard/RecommendedLoanSlide.vue +++ /dev/null @@ -1,233 +0,0 @@ - - - - - diff --git a/src/pages/Portfolio/ImpactDashboard/RecommendedLoansList.vue b/src/pages/Portfolio/ImpactDashboard/RecommendedLoansList.vue deleted file mode 100644 index 1098f5bce6..0000000000 --- a/src/pages/Portfolio/ImpactDashboard/RecommendedLoansList.vue +++ /dev/null @@ -1,75 +0,0 @@ - - - From 3c7422407ba1a1de96e751e915929d0238aff505 Mon Sep 17 00:00:00 2001 From: Christian Bedon Date: Fri, 8 Sep 2023 17:42:29 -0500 Subject: [PATCH 2/3] fix: small design changes --- src/pages/Portfolio/ImpactDashboard/EducationPost.vue | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/pages/Portfolio/ImpactDashboard/EducationPost.vue b/src/pages/Portfolio/ImpactDashboard/EducationPost.vue index 56203da1cf..8b0b6530d0 100644 --- a/src/pages/Portfolio/ImpactDashboard/EducationPost.vue +++ b/src/pages/Portfolio/ImpactDashboard/EducationPost.vue @@ -11,6 +11,7 @@ :width="344" :contentful-src="imageUrl" class="card-container-image" + :source-sizes="sourceSizes" fallback-format="jpg" /> @@ -23,7 +24,7 @@ {{ headline }} -

+

{{ summary }}

@@ -54,13 +55,13 @@ export default { return { sourceSizes: [ { - width: 278, - height: 209, + width: 344, + height: 239, media: 'min-width: 734px', }, { - width: 344, - height: 239, + width: 278, + height: 209, media: 'min-width: 0px', }, ] From 62fdd0a1e700d430e7a033b678cd1fcc63ea9d51 Mon Sep 17 00:00:00 2001 From: Christian Bedon Date: Mon, 11 Sep 2023 13:18:52 -0500 Subject: [PATCH 3/3] fix: loading logic --- src/pages/Portfolio/ImpactDashboard/EducationModule.vue | 5 +++-- src/pages/Portfolio/ImpactDashboard/EducationPost.vue | 6 +++--- src/pages/Portfolio/ImpactDashboard/ImpactDashboardPage.vue | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/pages/Portfolio/ImpactDashboard/EducationModule.vue b/src/pages/Portfolio/ImpactDashboard/EducationModule.vue index 73c304fd1f..92720b13e7 100644 --- a/src/pages/Portfolio/ImpactDashboard/EducationModule.vue +++ b/src/pages/Portfolio/ImpactDashboard/EducationModule.vue @@ -14,7 +14,7 @@

- +
@@ -60,8 +60,9 @@ export default { customFields: 'metadata.tags.sys.id[in]=impact-page|order=-fields.originalPublishDate' }, }).then(({ data }) => { + this.loading = false; this.post = data?.contentful?.blogPosts?.items?.[0]?.fields ?? null; - this.$emit('hide-module', this.post !== null); + this.$emit('hide-module', this.post === null); }).finally(() => { this.loadingPromise = null; }); diff --git a/src/pages/Portfolio/ImpactDashboard/EducationPost.vue b/src/pages/Portfolio/ImpactDashboard/EducationPost.vue index 8b0b6530d0..191b02e2f8 100644 --- a/src/pages/Portfolio/ImpactDashboard/EducationPost.vue +++ b/src/pages/Portfolio/ImpactDashboard/EducationPost.vue @@ -1,7 +1,7 @@