Skip to content
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

✨ Complete new README + Docs #515

Merged
merged 28 commits into from
Jul 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
6933c4b
✨ Add basic `readme.md` redesign
SenpaiHunters Jul 12, 2024
e6a3ac7
Merge branch 'MrKai77:develop' into develop
SenpaiHunters Jul 17, 2024
3f7455f
✨ Fresh `README.md` updates
SenpaiHunters Jul 17, 2024
df34e55
🐞 Hopefully fix video bug
SenpaiHunters Jul 17, 2024
ca24ff9
🐞 Fix video bug
SenpaiHunters Jul 17, 2024
d578809
✨ Some minor readme fixes
SenpaiHunters Jul 17, 2024
4d4ff56
Merge branch 'MrKai77:develop' into develop
SenpaiHunters Jul 18, 2024
27f9518
✨ Add docs and improve issue formats
SenpaiHunters Jul 18, 2024
c2360c1
🐞 Fix grammatical error
SenpaiHunters Jul 18, 2024
67d4b4e
Merge branch 'MrKai77:develop' into develop
SenpaiHunters Jul 18, 2024
6c3e6fc
✨ Add `Contributors.md` + minor changes
SenpaiHunters Jul 18, 2024
de52e5e
🐞 Use hyperlinks for mentions
SenpaiHunters Jul 18, 2024
6bf1a76
🐞 Fix grammatical errors
SenpaiHunters Jul 18, 2024
17581c1
✨ Some final touches
SenpaiHunters Jul 18, 2024
fb5ab95
📄 Update Code Of Conduct
SenpaiHunters Jul 18, 2024
85aae21
🙈 Minor readme updates
SenpaiHunters Jul 18, 2024
604d109
Merge branch 'MrKai77:develop' into develop
SenpaiHunters Jul 19, 2024
a042372
✨ Code updates
SenpaiHunters Jul 19, 2024
9e21189
📝 Add extra Korean localised string
SenpaiHunters Jul 19, 2024
79b8ba0
⌛`CONTRIBUTING.md` updates
SenpaiHunters Jul 19, 2024
e3cde79
📄 Formatting
SenpaiHunters Jul 19, 2024
fd4e015
✨ Finalised `readme` updates Co-authored-by: Kai <[email protected]>
SenpaiHunters Jul 19, 2024
99a98c3
🐞 Padding and readme fixes
SenpaiHunters Jul 19, 2024
3ca9a3a
📄 Update `Classic.png`
SenpaiHunters Jul 19, 2024
10fc0e1
📝 Update contributors list
SenpaiHunters Jul 19, 2024
9afeaeb
🙏 Hopeful last `readme` update
SenpaiHunters Jul 19, 2024
057ce45
🐞 Fix grammatical errors
SenpaiHunters Jul 19, 2024
9509980
🐞 Remove blue line by wrapping in `h6`
SenpaiHunters Jul 19, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ body:

- type: input
attributes:
label: MacOS Version
label: macOS Version
description: Apple Logo -> About This Mac
placeholder: |
[ex. Ventura 13.1]
Expand Down Expand Up @@ -77,6 +77,8 @@ body:
required: true
- label: This is a single bug (multiple bugs should be reported individually)
required: true
- label: I can help with fixing or developing this issue (tick if you can help).
required: false

- type: markdown
attributes:
Expand Down
2 changes: 2 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ body:
required: true
- label: This is a single feature request (multiple feature requests should be reported individually)
required: true
- label: I can help with the improvement or development of this feature (tick if you can help)
required: false

- type: markdown
attributes:
Expand Down
42 changes: 42 additions & 0 deletions .github/ISSUE_TEMPLATE/localisation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Loop Localisation
description: Edit, request or localise Loop in your language.
title: "🌐 [Title here]"
labels: ["Localization"]
body:
- type: textarea
attributes:
label: What language do you intend to add or change?
description: Provide a clear and concise description of your added or changed language. Clearly indicate if you need a localized file provided or if you can do this on your own.
validations:
required: true

- type: textarea
attributes:
label: Additional Context
description: Provide any additional information about this localisation request.
validations:
required: false

- type: textarea
attributes:
label: Missed localisation
description: Fill this out if you were unable to localize certain parts of the file
validations:
required: false

- type: checkboxes
attributes:
label: Final Checks
options:
- label: My localisation request is written in English
required: true
- label: My localisation request title is descriptive
required: true
- label: This is a single localisation request (multiple localisation request should be requested individually)
required: true
- label: I need a localised file for my language (tick this if needed)
required: false

- type: markdown
attributes:
value: Thank you for taking the time to report this localisation request!
2 changes: 2 additions & 0 deletions .github/ISSUE_TEMPLATE/suggest-icon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,6 @@ body:
label: Final Checks
options:
- label: My suggestion is written in English
required: true
- label: I am submitting an icon (this is not for icon requests)
required: true
45 changes: 45 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we, as contributors and maintainers, pledge to make 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.

## Our Standards

Examples of behavior that contribute to creating a positive environment include:

- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

- The use of sexualized language or imagery and unwelcome sexual attention or advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a professional setting

## Our Responsibilities

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.

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 with this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.

## Scope

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.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [@MrKai77](https://github.com/MrKai77), [@SenpaiHunters](https://github.com/SenpaiHunters), or [@Soft-Bred](https://github.com/Soft-Bred). 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 is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.

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.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org), version 1.4, available at [Contributor Covenant Version 1.4, code of conduct](https://www.contributor-covenant.org/version/1/4/code-of-conduct.html).

For answers to common questions about this code of conduct, see [Contributor Covenant FAQ](https://www.contributor-covenant.org/faq).
215 changes: 215 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,215 @@
# Contributing to Loop

Welcome to Loop. If you're here, you may be interested in contributing to this awesome project. Well, let's get to it!

If at any time you need help, contact us on [Discord](https://discord.gg/2CZ2N6PKjq) or create an issue on GitHub.

## Areas of focus

You can improve Loop by doing some of the following:

1. Add your language to Loop, or if you see someone make a grammatical error or mistake, help fix it!
2. Have an idea that you can proactively add, or see an area where some code can be changed? Submit an issue and explain what you wish to do, and if it's greenlit, push your changes into a PR!
3. Got an icon? We LOVE icons, especially good ones! Make a great icon the team likes, and it *may* be included for everyone to use.
4. Got a bug to report? Head over to the issues tab; here, you'll be walked through what you need!

# Local development

## Issues

First, we need to get a scope of what you're changing, adding, improving, or wanting.

1. Create an issue and clearly articulate your issue, change, or improvement you want to make.
2. Wait for a response from a maintainer; if it's accepted, you're off to the races!

Now, you need to make these changes. HOW?

Well, it's very easy: fork the repo, push your changes to the fork, and submit a PR!

## Forking

To fork, you can go to Loop, and see the "Fork" button at the top of your screen, click that, and change nothing. Once forked, you'll see

```sh
Loop
forked from MrKai77/Loop
```

## Cloning your fork

Now, you've forked our repo. What next? Don't stress. First, go to where you want to code and execute some quick command lines! Here's how to do it!

```sh
cd downloads # Or the directory where you wish to clone Loop
git clone https://github.com/{your-name}/Loop.git
# Remember to replace {your-name} with your actual GitHub username!
# For example: https://github.com/MrKai77/Loop.git
cd Loop
open Loop.xcodeproj
```

Once you've got your fork, it'll auto-open in Xcode!

## What code? Xcode

Now, let's tackle Xcode. If you followed the method above, you should be automatically opened into Xcode. Once in Xcode, you'll need to change the cert!

### Before You Begin

*Skip this section if you already have an Apple Developer account.*

0. Enroll your account in the Developer Program at [developer.apple.com](https://developer.apple.com/). A free account works just fine; you don't need a paid one.
1. Install Xcode.
2. Add your Developer account to Xcode. To do this, click `Xcode → Preferences` in the menu bar, and in the window that opens, click `Accounts`. You can add your account there.
3. After adding your account, it will appear in the list of Apple IDs on the left side of the screen. Select your account.
4. At the bottom of the screen, click `Manage Certificates...`.
5. On the bottom left, click the **+** icon and select `Apple Development`.
6. When a new item labeled `Apple Development Certificates` appears in the list, press `Done` to close the account manager.

### Signing Loop

1. Wait until all dependencies are resolved. This should take a couple of minutes at most.
2. In the file browser on the left, click `Loop` at the very top. It's the icon with the App Store logo.
3. In the pane that opens on the right, click `Signing & Capabilities` at the top.
4. Under `Signing`, change the `Team` dropdown to your ID.
5. Under `Signing → macOS`, change the `Signing Certificate` to `Development`.

### Building

Now that you've signed Loop with your developer account, it's time to build! First, validate if the current build works <kbd>⌘</kbd> + <kbd>R</kbd> (this command will run Loop). If the build was successful, you should see an alert that Loop requires Accessibility permissions; if you change any code related to Loop's movement or core code, you will need to enable this. For cases of simple code changes, this is not needed. You can run both Loop (the one you already have) and the Loop developmental version you are running at the same time!

**HOWEVER**, it must be made aware that Loop **MAY** fail to build if you run it again. How do we fix this? Clear the build cache, press <kbd>⌘</kbd> + <kbd>⇧</kbd> + <kbd>K</kbd>; you **MAY** need to do this every time you hit the run command. It has to do with some leftover user cache that makes Loop fail to build. We've tried to fix it to no avail.

**IF YOUR BUILD FAILS** You've got a few options:

1. Review the issue, if it's giving `Luminare cannot be found` remove Luminare from the Frameworks list, and readd it.
2. If there is a `Command CodeSign failed with a nonzero exit code` issue, follow the above steps and clear your build cache.
3. If it's a code issue, review your code and adjust accordingly.

Now, you're on your own. We hope you'll make some nice Swift code. On each build you attempt, [SwiftFormat](https://github.com/nicklockwood/SwiftFormat) will run. **DO NOT** turn this off. When you submit your PR, this will run another check to validate you have the correct formatting. If the format is wrong, your request will be rejected.

**IMPORTANT:** You MUST have [SwiftFormat](https://github.com/nicklockwood/SwiftFormat) installed via `brew`. If you know how to use brew, then it's as simple as

```sh
brew install SwiftFormat
```

If you are unfamiliar with `brew`, [brew](https://brew.sh) is a macOS package manager which you can use to install apps (`--casks`) or command line tools (CLTs) called `formulae`.

First, install brew and follow the onscreen instructions (**NOTE: DO NOT INSTALL `brew` WITH SUDO**).

```sh
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
```

Then, after you've installed brew, you can now install any command line tool or app. So, install `SwiftFormat` next, and you'll then be able to build Loop.

Now, some **important** notes. All of the code you write **MUST** include comprehensive comments. An example of this would be

```swift
/// Determines if two colors are similar based on a threshold.
/// - Parameters:
/// - color: The color to compare with the receiver.
/// - threshold: The maximum allowed difference between color components.
/// - Returns: A Boolean value indicating whether the two colors are similar.
func isSimilar(to color: NSColor, threshold: CGFloat = 0.1) -> Bool {
// Convert both colors to the RGB color space for comparison.
guard let color1 = usingColorSpace(.deviceRGB),
let color2 = color.usingColorSpace(.deviceRGB) else { return false }
// Compare the red, green, and blue components of both colors.
return abs(color1.redComponent - color2.redComponent) < threshold &&
abs(color1.greenComponent - color2.greenComponent) < threshold &&
abs(color1.blueComponent - color2.blueComponent) < threshold
}
```

Code lines such as the following will not be accepted

```diff
- // func check
+ // Checks for similar colors and returns a Boolean
```

## How to PR?

You have a few ways of pushing your changes from Xcode into GitHub. You should see an 'integrate' option at the top of the code editor. You can push via that, via CLI, or even open VSCode and push through that.

Recommended:

```sh
# Add your changes to git staging
git add .

# Commit your changes with a meaningful message
git commit -m "Your detailed commit message"
# If you're committing, you must use the following emojis at the start:
# 🐞 Bug fixes must include a bug emoji.
# ✨ Added features must include a star emoji.
# 🌐 Localization must include a globe emoji.
# An example of this would be:
# git commit -m "✨ Add wallpaper theming"

# Push your changes to your fork
git push origin develop

# Then, go to GitHub, navigate to your fork, and you'll see a button to 'Create pull request'.
# Click it, fill in the details, and submit your PR.
# IF your PR needs changes, you MUST push it as a draft PR.
```

# Icons

## Before we get started

We love icons, just look at how many we already have! We love talented designers, and we love people who express their creativity for Loop.

But as Loop grows and the app quality improves, some previous icons may be removed, making room for new icons. Do not feel disheartened, as you've shaped Loop. If your icon is selected, you will still have a section in our readme with your name and previous icon(s).

## How do I submit my icon?

If you read the local development section, you'll see where this is going!

### Create an issue

Once you're in your issue, drop in your icons you've made for Loop and the team will review each and every icon. You can upload a single `.icns` file, or a `.png`. Upload this into the given box, if the icon is submitted you'll see some feedback and your name added to the readme. If it gets rejected, then you may get some feedback in the areas we wish to focus on. If your icon has been dismissed, remember, this isn't your only chance. Come back more invigorated and show us your best! You don't need to be a professional designer, you just need to capture the feel of Loop in your design.

Now, for the Issue section, this is **NOT** for you to request an icon. Here, it is only for sharing an icon you, a friend, or someone else has made, or to link it to an external post (say, Twitter) to a user who's made this icon. If you're requesting an icon in this section, your issue will be closed.

# Localisation

We wish to localise (localize) Loop in every language possible!

We use `Localizable.xcstrings` to localise Loop, meaning it's very simple to localise Loop in any language you want.

If you need some help, images are provided at the bottom for context.

## How to localise?

By now, you'll be familiar. Submit a `localisation` issue, fill out which language you wish to add, change, improve, and complete any required checkboxes.

Once assigned, and after committing to the localised language, you may request the catalogue for localisation or proceed to do it manually.

### Asking for a catalogue

1. In your issue, just ask [@MrKai77](https://github.com/MrKai77) or [@SenpaiHunters](https://github.com/SenpaiHunters) for your required language in your issue, and they'll be able to provide you with the needed file.
2. Next, you need Xcode installed. Once installed, open the language file, named, `[locale].xloc`.
3. Once you've got it, now head over to the right-hand side and begin translating Loop to your language!

TIP: If you're unable to fully localise the file, just leave the unlocalised strings, and add notes to your issue on what's missed so others can localise it further.

### I don't need help

1. Fork and clone Loop (how to do given above).
2. Open Loop and the `Localizable.strings` file.
3. Add your language using the `+` button at the bottom.
4. Fill in your language.

- Incomplete translations? Leave a note in your issue to further help other localisers.

5. Also fill in `InfoPlist.strings` that will be auto-generated.
6. Finally, push your changes to your branch and format the name such as `🌐 [add/change] name`, e.g., `🌐 Add Korean localisation` or `🌐 Update English (United Kingdom)`.

## Images

![Localise Xcode example](/assets/docs/localise.png)
![Localise plist Xcode example](/assets/docs/localise_plist.png)
Loading
Loading