@@ -64,52 +64,28 @@ public struct WMFActivityTabView: View {
6464
6565 if viewModel. customizeViewModel. isReadingInsightsOn {
6666 articlesReadModule ( proxy: proxy)
67+ . padding ( . horizontal, 16 )
6768 savedArticlesModule
69+ . padding ( . horizontal, 16 )
6870
6971 if !viewModel. articlesReadViewModel. topCategories. isEmpty {
7072 topCategoriesModule ( categories: viewModel. articlesReadViewModel. topCategories)
73+ . padding ( . horizontal, 16 )
7174 . accessibilityElement ( )
7275 . accessibilityLabel ( viewModel. localizedStrings. topCategories)
7376 . accessibilityValue ( viewModel. articlesReadViewModel. topCategories. joined ( separator: " , " ) )
7477 }
7578 }
76- }
77- . padding ( . horizontal, 16 )
78- . padding ( . bottom, 16 )
79- . listRowInsets ( EdgeInsets ( ) )
80- . background (
81- LinearGradient (
82- stops: [
83- Gradient . Stop ( color: Color ( uiColor: theme. paperBackground) , location: 0 ) ,
84- Gradient . Stop ( color: Color ( uiColor: theme. softEditorBlue) , location: 1 )
85- ] ,
86- startPoint: . top,
87- endPoint: . bottom
88- )
89- )
90- }
91- . listRowSeparator ( . hidden)
92- }
93-
94- if viewModel. customizeViewModel. isEditingInsightsOn {
95- Section ( header: YourImpactHeaderView ( title: viewModel. localizedStrings. yourImpact) ) {
96- VStack ( spacing: 16 ) {
9779
98- // TODO: Uncomment here for user impact data with stub UI
99- // if let mostViewedArticlesViewModel = viewModel.mostViewedArticlesViewModel {
100- // MostViewedArticlesView(viewModel: mostViewedArticlesViewModel)
101- // }
102- //
103- // if let contributionsViewModel = viewModel.contributionsViewModel {
104- // ContributionsView(viewModel: contributionsViewModel)
105- // }
106- //
107- // if viewModel.allTimeImpactViewModel != nil || viewModel.recentActivityViewModel != nil || viewModel.articleViewsViewModel != nil {
108- // CombinedImpactView(allTimeImpactViewModel: viewModel.allTimeImpactViewModel, recentActivityViewModel: viewModel.recentActivityViewModel, articleViewsViewModel: viewModel.articleViewsViewModel)
109- // }
110-
111- if let globalEditCount = viewModel. globalEditCount, globalEditCount > 0 {
80+ if let globalEditCount = viewModel. globalEditCount, globalEditCount > 0 , viewModel. customizeViewModel. isEditingInsightsOn {
81+ HStack {
82+ YourImpactHeaderView ( title: viewModel. localizedStrings. yourImpact)
83+ Spacer ( )
84+ }
85+ . padding ( . top, 12 )
86+
11287 totalEditsView ( amount: animatedGlobalEditCount)
88+ . padding ( . horizontal, 16 )
11389 . onAppear {
11490 if !hasShownGlobalEditsCard {
11591 hasShownGlobalEditsCard = true
@@ -128,7 +104,6 @@ public struct WMFActivityTabView: View {
128104 }
129105 }
130106 }
131- . padding ( . horizontal, 16 )
132107 . padding ( . bottom, 16 )
133108 . listRowInsets ( EdgeInsets ( ) )
134109 . background (
@@ -655,16 +630,12 @@ struct YourImpactHeaderView: View {
655630 }
656631
657632 var body : some View {
658- HStack {
659633 Text ( title)
660634 . font ( Font ( WMFFont . for ( . boldHeadline) ) )
661635 . foregroundColor ( Color ( uiColor: theme. text) )
662636 . textCase ( . none)
637+ . padding ( . horizontal, 16 )
663638 . accessibilityAddTraits ( . isHeader)
664- Spacer ( )
665- }
666- . padding ( . top, 12 )
667- . padding ( . bottom, 16 )
668639 }
669640}
670641
0 commit comments