-
Notifications
You must be signed in to change notification settings - Fork 1
Various fixes #398
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Various fixes #398
Changes from 11 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
c12af84
🗑️ feat(search): remove quarter selection menu
shp7724 70dca11
♻️ refactor: extract CircleBadge to shared UI components
shp7724 90fe4ad
🎨 style: apply cyan tint to toolbar buttons and sheet controls
shp7724 9c07ef4
🎨 style: apply cyan tint to timetable settings
shp7724 593e3ac
♻️ refactor(search): remove auto-focus search input
shp7724 d76ef46
♻️ refactor: extract display grid metrics calculation
shp7724 21f0a04
🧪 test: add display grid metrics calculation tests
shp7724 9154189
🎨 style: refine timetable grid dividers and add background color
shp7724 b1050b8
✨ feat(themes): add local theme caching for widgets
shp7724 c60779c
♻️ refactor: split TimetableZStack into TimetableView and TimetableWi…
shp7724 2dba4ff
✨ feat: add automatic widget reload on data changes
shp7724 ba3b275
🔧 chore(ci): centralize Xcode version configuration
shp7724 87950e7
♻️ refactor: extract UserDefaults keys to interface modules for widge…
shp7724 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
...les/Feature/Friends/Resources/Assets.xcassets/timetable.background.colorset/Contents.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| { | ||
| "colors" : [ | ||
| { | ||
| "color" : { | ||
| "color-space" : "srgb", | ||
| "components" : { | ||
| "alpha" : "1.000", | ||
| "blue" : "1.000", | ||
| "green" : "1.000", | ||
| "red" : "1.000" | ||
| } | ||
| }, | ||
| "idiom" : "universal" | ||
| }, | ||
| { | ||
| "appearances" : [ | ||
| { | ||
| "appearance" : "luminosity", | ||
| "value" : "dark" | ||
| } | ||
| ], | ||
| "color" : { | ||
| "color-space" : "display-p3", | ||
| "components" : { | ||
| "alpha" : "1.000", | ||
| "blue" : "0x18", | ||
| "green" : "0x18", | ||
| "red" : "0x18" | ||
| } | ||
| }, | ||
| "idiom" : "universal" | ||
| } | ||
| ], | ||
| "info" : { | ||
| "author" : "xcode", | ||
| "version" : 1 | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
SNUTT/Modules/Feature/Themes/Sources/Composition/LiveDependencies.swift
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| // | ||
| // LiveDependencies.swift | ||
| // SNUTT | ||
| // | ||
| // Copyright © 2025 wafflestudio.com. All rights reserved. | ||
| // | ||
|
|
||
| import Dependencies | ||
| import ThemesInterface | ||
|
|
||
| extension ThemeLocalRepositoryKey: @retroactive DependencyKey { | ||
| public static let liveValue: any ThemeLocalRepository = ThemeUserDefaultsRepository() | ||
| } |
33 changes: 33 additions & 0 deletions
33
SNUTT/Modules/Feature/Themes/Sources/Infra/ThemeUserDefaultsRepository.swift
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| // | ||
| // ThemeUserDefaultsRepository.swift | ||
| // SNUTT | ||
| // | ||
| // Copyright © 2025 wafflestudio.com. All rights reserved. | ||
| // | ||
|
|
||
| import Dependencies | ||
| import DependenciesUtility | ||
| import Foundation | ||
| import ThemesInterface | ||
|
|
||
| struct ThemeUserDefaultsRepository: ThemeLocalRepository { | ||
| @Dependency(\.userDefaults) private var userDefaults | ||
| @Dependency(\.widgetReloader) private var widgetReloader | ||
|
|
||
| func loadAvailableThemes() -> [Theme] { | ||
| guard let data = userDefaults.data(forKey: Keys.availableThemes.rawValue), | ||
| let themes = try? JSONDecoder().decode([Theme].self, from: data) | ||
| else { return [] } | ||
| return themes | ||
| } | ||
|
|
||
| func storeAvailableThemes(_ themes: [Theme]) { | ||
| guard let data = try? JSONEncoder().encode(themes) else { return } | ||
| userDefaults.set(data, forKey: Keys.availableThemes.rawValue) | ||
| widgetReloader.reloadAll() | ||
| } | ||
|
|
||
| private enum Keys: String { | ||
| case availableThemes | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
SNUTT/Modules/Feature/ThemesInterface/Sources/ThemeLocalRepository.swift
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| // | ||
| // ThemeLocalRepository.swift | ||
| // SNUTT | ||
| // | ||
| // Copyright © 2025 wafflestudio.com. All rights reserved. | ||
| // | ||
|
|
||
| import Dependencies | ||
| import Spyable | ||
|
|
||
| @Spyable | ||
| public protocol ThemeLocalRepository: Sendable { | ||
| func loadAvailableThemes() -> [Theme] | ||
| func storeAvailableThemes(_ themes: [Theme]) | ||
| } | ||
|
|
||
| public enum ThemeLocalRepositoryKey: TestDependencyKey { | ||
| public static let testValue: any ThemeLocalRepository = { | ||
| let spy = ThemeLocalRepositorySpy() | ||
| spy.loadAvailableThemesReturnValue = [.snutt, .fall, .modern] | ||
| return spy | ||
| }() | ||
| } | ||
|
|
||
| extension DependencyValues { | ||
| public var themeLocalRepository: any ThemeLocalRepository { | ||
| get { self[ThemeLocalRepositoryKey.self] } | ||
| set { self[ThemeLocalRepositoryKey.self] = newValue } | ||
| } | ||
| } |
38 changes: 38 additions & 0 deletions
38
...s/Feature/Timetable/Resources/Assets.xcassets/timetable.background.colorset/Contents.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| { | ||
| "colors" : [ | ||
| { | ||
| "color" : { | ||
| "color-space" : "srgb", | ||
| "components" : { | ||
| "alpha" : "1.000", | ||
| "blue" : "1.000", | ||
| "green" : "1.000", | ||
| "red" : "1.000" | ||
| } | ||
| }, | ||
| "idiom" : "universal" | ||
| }, | ||
| { | ||
| "appearances" : [ | ||
| { | ||
| "appearance" : "luminosity", | ||
| "value" : "dark" | ||
| } | ||
| ], | ||
| "color" : { | ||
| "color-space" : "display-p3", | ||
| "components" : { | ||
| "alpha" : "1.000", | ||
| "blue" : "0x18", | ||
| "green" : "0x18", | ||
| "red" : "0x18" | ||
| } | ||
| }, | ||
| "idiom" : "universal" | ||
| } | ||
| ], | ||
| "info" : { | ||
| "author" : "xcode", | ||
| "version" : 1 | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UserDefaults 저장 시마다
widgetReloader.reloadAll()로 전체 위젯 타임라인을 리로드하고 있습니다. 저장이 빈번할 수 있는 경로라면, (1) 특정 kind만 리로드하거나, (2) 변경을 debounce/throttle하는 방식으로 리로드 비용/레이트리밋 리스크를 줄이는 것을 권장합니다.