Skip to content

Commit a3a4465

Browse files
committed
Add contributor docs, GPL license, and UI fixes
Add project governance and onboarding materials (CONTRIBUTING.md, CODE_OF_CONDUCT.md, SECURITY.md) and add GPL-3.0 LICENSE. Update README with badges, privacy manifesto and developer setup details. Update .gitignore to ignore test results and log files. Fix runtime/test issues by propagating themeManager via .environmentObject to navigation destinations in CalendarView and InsightsView, and harden SettingsUITests by waiting/scrolling for the Accent Color element to reduce flakiness.
1 parent d19eafb commit a3a4465

9 files changed

Lines changed: 853 additions & 54 deletions

File tree

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,8 @@ Pods/
5252
## Git stuff
5353
.git/
5454

55+
## Test results
5556
TestResults.xcresult/
57+
58+
## Logs
59+
*.log

CODE_OF_CONDUCT.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6+
7+
## Our Standards
8+
9+
Examples of behavior that contributes to creating a positive environment include:
10+
11+
* Using welcoming and inclusive language
12+
* Being respectful of differing viewpoints and experiences
13+
* Gracefully accepting constructive criticism
14+
* Focusing on what is best for the community
15+
* Showing empathy towards other community members
16+
17+
Examples of unacceptable behavior by participants include:
18+
19+
* The use of sexualized language or imagery and unwelcome sexual attention or advances
20+
* Trolling, insulting/derogatory comments, and personal or political attacks
21+
* Public or private harassment
22+
* Publishing others' private information, such as a physical or electronic address, without explicit permission
23+
* Other conduct which could reasonably be considered inappropriate in a professional setting
24+
25+
## Our Responsibilities
26+
27+
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
28+
29+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
30+
31+
## Scope
32+
33+
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
34+
35+
## Enforcement
36+
37+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team will maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
38+
39+
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
40+
41+
## Attribution
42+
43+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.1, available at https://www.contributor-covenant.org/version/2.1/code_of_conduct.html.
44+
45+
[homepage]: https://www.contributor-covenant.org

CONTRIBUTING.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Contributing to CycleOne
2+
3+
First off, thank you for considering contributing to CycleOne! It's people like you that make CycleOne such a great tool.
4+
5+
## How Can I Contribute?
6+
7+
### Reporting Bugs
8+
- Use the **GitHub Issue Tracker**.
9+
- Describe the bug and steps to reproduce.
10+
- Include your iOS version and device model.
11+
12+
### Suggesting Enhancements
13+
- Open an issue to discuss the enhancement first.
14+
- Explain why this feature would be useful to most users.
15+
16+
### Pull Requests
17+
1. Fork the repo and create your branch from `main`.
18+
2. If you've added code that should be tested, add tests.
19+
3. Ensure the test suite passes (`make check`).
20+
4. Make sure your code lints (`make format`).
21+
5. Issue that pull request!
22+
23+
## Coding Standard
24+
- We follow the [Ray Wenderlich Swift Style Guide](https://github.com/raywenderlich/swift-style-guide).
25+
- Use `make format` before committing.
26+
27+
## Privacy Policy
28+
- CycleOne is strictly **local-only**.
29+
- Any contribution that adds networking, cloud sync, or third-party tracking will be rejected unless there is an extremely compelling, privacy-preserving reason.
30+
31+
---
32+
By contributing, you agree that your contributions will be licensed under its GPL-3.0 License.

CycleOne/Views/Calendar/CalendarView.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ struct CalendarView: View {
5959
.navigationBarTitleDisplayMode(.inline)
6060
.navigationDestination(for: Date.self) { date in
6161
LogView(date: date, context: context)
62+
.environmentObject(themeManager)
6263
}
6364

6465
if !hasSeenOnboarding {

CycleOne/Views/Insights/InsightsView.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ struct InsightsView: View {
122122
destination: CycleHistoryList(
123123
cycles: viewModel.recentCycles
124124
)
125+
.environmentObject(themeManager)
125126
) {
126127
HStack {
127128
Image(

CycleOneUITests/Tests/SettingsUITests.swift

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,20 @@ final class SettingsUITests: XCTestCase {
2121
XCTAssertTrue(settingsTab.waitForExistence(timeout: 5))
2222
settingsTab.tap()
2323

24+
// Wait for list to load
25+
_ = settingsTab.waitForExistence(timeout: 2)
26+
2427
// Verify Appearance section and Accent Color picker exist
2528
let accentColor = app.staticTexts["AccentColorTitle"]
26-
if !accentColor.waitForExistence(timeout: 5) {
29+
30+
// Scroll until visible if needed
31+
var retryCount = 0
32+
while !accentColor.exists, retryCount < 5 {
33+
app.swipeUp()
34+
retryCount += 1
35+
}
36+
37+
if !accentColor.waitForExistence(timeout: 10) {
2738
print("UI Hierarchy: \(app.debugDescription)")
2839
XCTFail("Expected accent color picker in Settings. Title not found.")
2940
}

0 commit comments

Comments
 (0)