From 420c0a14879250577003e74b7d834a1dcc770443 Mon Sep 17 00:00:00 2001 From: Euigyom Kim Date: Sun, 21 Apr 2024 08:38:53 +0900 Subject: [PATCH 1/2] Fix scrolling issue in emoji picker --- .../Editor/Components/CustomEmojisView.swift | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/Packages/StatusKit/Sources/StatusKit/Editor/Components/CustomEmojisView.swift b/Packages/StatusKit/Sources/StatusKit/Editor/Components/CustomEmojisView.swift index 5ac2ee668..f70db084f 100644 --- a/Packages/StatusKit/Sources/StatusKit/Editor/Components/CustomEmojisView.swift +++ b/Packages/StatusKit/Sources/StatusKit/Editor/Components/CustomEmojisView.swift @@ -8,16 +8,16 @@ extension StatusEditor { @MainActor struct CustomEmojisView: View { @Environment(\.dismiss) private var dismiss - + @Environment(Theme.self) private var theme - + var viewModel: ViewModel - + var body: some View { NavigationStack { ScrollView { - ForEach(viewModel.customEmojiContainer) { container in - LazyVGrid(columns: [GridItem(.adaptive(minimum: 40, maximum: 40))], spacing: 9) { + LazyVGrid(columns: [GridItem(.adaptive(minimum: 40, maximum: 40))], spacing: 9) { + ForEach(viewModel.customEmojiContainer) { container in Section { ForEach(container.emojis) { emoji in LazyImage(url: emoji.url) { state in @@ -39,15 +39,11 @@ extension StatusEditor { viewModel.insertStatusText(text: " :\(emoji.shortcode): ") } } + .padding(.horizontal, 8) } header: { - HStack { - Text(container.categoryName) - .font(.scaledFootnote) - Spacer() - } + Text(container.categoryName) } } - .padding(.horizontal, 8) } } .toolbar { From b4efe43be945cfedf7c0e301da72330d0f651645 Mon Sep 17 00:00:00 2001 From: Euigyom Kim Date: Sun, 21 Apr 2024 08:49:21 +0900 Subject: [PATCH 2/2] Fix design on emoji section header --- .../StatusKit/Editor/Components/CustomEmojisView.swift | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Packages/StatusKit/Sources/StatusKit/Editor/Components/CustomEmojisView.swift b/Packages/StatusKit/Sources/StatusKit/Editor/Components/CustomEmojisView.swift index f70db084f..4f654b9b1 100644 --- a/Packages/StatusKit/Sources/StatusKit/Editor/Components/CustomEmojisView.swift +++ b/Packages/StatusKit/Sources/StatusKit/Editor/Components/CustomEmojisView.swift @@ -39,9 +39,14 @@ extension StatusEditor { viewModel.insertStatusText(text: " :\(emoji.shortcode): ") } } - .padding(.horizontal, 8) + .padding(.horizontal, 16) } header: { Text(container.categoryName) + .font(.scaledHeadline) + .bold() + .foregroundStyle(Color.secondary) + .frame(maxWidth: .infinity, alignment: .leading) + .padding(.horizontal, 16) } } }