Skip to content

Commit

Permalink
Merge branch 'develop' into revanced
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperDragonXD authored Sep 14, 2024
2 parents d3f789a + c4864d7 commit b89c124
Show file tree
Hide file tree
Showing 391 changed files with 6,130 additions and 1,359 deletions.
3 changes: 3 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: Link apps to existing icons
url: https://github.com/LawnchairLauncher/lawnicons/blob/develop/CONTRIBUTING.md#adding-an-icon-to-lawnicons
about: Learn more about linking an app to an existing icon and making a PR to contribute to Lawnicons.
- name: Icon Request
url: https://forms.gle/xt7sJhgWEasuo9TR9
about: Please request your icons in this form.
26 changes: 26 additions & 0 deletions .github/ISSUE_TEMPLATE/icon_rebrand.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Update an existing icon
description: Request changing an icon if it is outdated or applied incorrectly.
labels: ["icon update"]
body:
- type: textarea
id: outdated-icon-list
attributes:
label: Icons
description: |
**Please specify for each icon**
- the current application name in Lawnicons (search in [the appfilter.xml](https://github.com/LawnchairLauncher/lawnicons/blob/develop/app/assets/appfilter.xml));
- [the link to the icon](https://github.com/LawnchairLauncher/lawnicons/tree/develop/svgs) in Lawnicons;
- the new application name, if changed;
- the image of the new icon.
**Example**
Twitter, [twitter.svg](https://github.com/LawnchairLauncher/lawnicons/tree/develop/svgs/) → X, [the X logo](https://commons.wikimedia.org/wiki/File:X_logo_2023_original.svg)
placeholder: Tell us what should be changed and how
validations:
required: true
- type: textarea
id: additional-info
attributes:
label: Additional information
placeholder: Specify what else is worth considering. For example, the application has a new activity
12 changes: 4 additions & 8 deletions .github/icon_checklist.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,22 @@
Thanks for your contribution!

While waiting for a review from our team, you can do a self-review to ensure that your icons are suitable for Lawnicons.
While waiting for a review from our team, you can do a self-review to ensure that your icons are suitable for Lawnicons. We try to do the review within 7 days.

### Canvas and sizes
1. Canvas: `192×192px`.
2. Non-square icons: the long side of the icons should be `160px`.
3. Square icons: `154×154px`.

### Color, stroke width and rounding
1. Color: black `#000`.
1. Color: non-transparent black `#000`.
2. No fill. Base stroke width: `12px`. `14px`, `10px`, `8px` — depending on the shape of the icons. `6px` — for fine details.
3. Rounded ends and joins. 90° corners are rounded by `6-32px`.

### Naming
1. Names should match the official app name and contain no additional text.
2. If the first `3` characters of the app name contain letters not from the English alphabet, then add a localized (or transliterated) name via `~~`.
Example: `京东 ~~ JD`.
2. If the first `3` characters of the app name contain letters not from the English alphabet, then add a localized (or transliterated) name via `~~`. Example: `京东 ~~ JD`.
3. The names of the drawables should repeat the names of the apps if nothing prevents it.

### Quality
1. Ensure that icons are easily recognizable.
2. Align icons to [the visual center](https://www.google.com/search?sca_esv=1fcec3f5e0b15e20&q=what+is+visual+center+of+an+icon&tbm=isch&source=lnms) as much as possible within the guidelines.
2. Align icons to [the visual center](https://crazybitsstudios.com/another-way-of-aligning-elements-when-creating-icons) as much as possible within the guidelines. The visual center is where your icon looks and feels centered.
3. Avoid noticable black spots by reducing the stroke width or simplifying the icons.
4. Avoid close distances between strokes. The icons on the phone screen will be smaller, so the small distances between the strokes will stick together.
5. Avoid drastic changes in stroke widths. When the strokes next to each other differ in width by 4px or more, the icon will look sloppy.
7 changes: 2 additions & 5 deletions .github/workflows/build_debug_apk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,9 @@ jobs:
with:
distribution: 'zulu'
java-version: 21
- uses: gradle/actions/setup-gradle@v3
- uses: gradle/actions/setup-gradle@v4
with:
cache-encryption-key: Da25KUVSE5jbGds2zXmfXw==
gradle-home-cache-cleanup: true
- name: Write sign info
if: github.repository_owner == 'LawnchairLauncher'
run: |
Expand Down Expand Up @@ -52,9 +51,7 @@ jobs:
with:
distribution: 'zulu'
java-version: 21
- uses: gradle/actions/setup-gradle@v3
with:
gradle-home-cache-cleanup: true
- uses: gradle/actions/setup-gradle@v4
- run: ./gradlew spotlessCheck

send-notifications:
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/build_release_apk.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
# TODO: Add signing key and build app bundle
name: Build release APK

on:
workflow_dispatch:
push:
branches:
- main

jobs:
build-release-apk:
Expand All @@ -19,10 +17,9 @@ jobs:
with:
distribution: 'zulu'
java-version: 21
- uses: gradle/actions/setup-gradle@v3
- uses: gradle/actions/setup-gradle@v4
with:
cache-encryption-key: Da25KUVSE5jbGds2zXmfXw==
gradle-home-cache-cleanup: true
- name: Write sign info
if: github.repository_owner == 'LawnchairLauncher'
run: |
Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/crowdin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Crowdin Synchronization

on:
workflow_dispatch:

permissions:
contents: write
pull-requests: write

jobs:

synchronize-with-crowdin:
name: Synchronize with Crowdin
if: github.repository_owner == 'LawnchairLauncher'
runs-on: ubuntu-latest
steps:

- name: Checkout
uses: actions/checkout@v4

- name: Sync Translations
uses: crowdin/github-action@v2
with:
upload_translations: false
upload_sources: true
download_translations: true
localization_branch_name: i18n
create_pull_request: true
base_url: 'https://lawnchair.crowdin.com'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
32 changes: 32 additions & 0 deletions .github/workflows/crowdin_upload.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Crowdin Upload

on:
push:
branches:
- 'develop'
workflow_dispatch:

jobs:

synchronize-with-crowdin:
name: Upload strings to Crowdin
if: github.repository_owner == 'LawnchairLauncher'
runs-on: ubuntu-latest
steps:

- name: Checkout
uses: actions/checkout@v4

- name: Upload Strings
uses: crowdin/github-action@v2
with:
upload_translations: false
upload_sources: true
download_translations: false
localization_branch_name: i18n
create_pull_request: false
base_url: 'https://lawnchair.crowdin.com'
env:
GITHUB_TOKEN: ${{ secrets.LAWNCHAIR_BOT_TOKEN }}
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
20 changes: 20 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 23 additions & 15 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ For additional information on designing icons and samples, see [the Lawnicons Fi
Need help? [Join Lawnchair on Discord](https://discord.com/invite/3x8qNWxgGZ).

### TL;DR on icon design

> [!NOTE]
> Upload no more than 10 icons at a time, because reviewers only have time for small pull requests.
The canvas is `192×192px`. The content area for most icons is `160×160px`, meaning the long side of an icon should be `160px`. Square icons should be `154×154px`. No fill, the stroke width is `12px`. All shapes should be black `#000` with rounded ends and joins. Round 90° angles by `6-32px`. Avoid noticable black spots, close distances between strokes, and drastic changes in stroke widths. Simplify details, but don't lose recognizability. Provide original and localized names, so the icons can be found.

To avoid rework, save time and understand the limitations of the guidelines, it is worth reading reviews (e.g., [+8 icons, +1 link, +4 updates](https://github.com/LawnchairLauncher/lawnicons/pull/1865)) and creating 5-10 icons in the first contribution.
Expand All @@ -33,7 +37,7 @@ Square icons must fit the `154×154px` content area size. Icons that mostly fit
#### Color
All shapes must have non-transparent black color `#000000`.
#### Stroke widths
The stroke should be kept at `12px` in most cases. If an icon is too minimal or dense, you'll need other widths: `14px` for the most minimal, and `8px` for the densest. For fine details, you can use `6px`. For more clarification, please refer to [the visual balance section](https://github.com/x9136/lawnicons/blob/addate/CONTRIBUTING.md#maintaining-visual-balance) down below.
The stroke should be kept at `12px` in most cases. If an icon is too minimal or dense, you'll need other widths: `14px` for the most minimal, and `8px` for the densest. For fine details, you can use `6px`. For more clarification, please refer to [the visual balance section](https://github.com/LawnchairLauncher/lawnicons/blob/develop/CONTRIBUTING.md#maintaining-visual-balance) down below.
#### End caps
All shapes must have rounded caps and joins.
#### Corner radius
Expand Down Expand Up @@ -123,31 +127,35 @@ Correct
```

## Adding an icon to Lawnicons
Here's how to add an icon to Lawnicons:

### Prerequesties
* Your icon in the SVG format, adhering to the [above guidelines](#contributing-icons). The filename must use snake case (e.g. `files_by_google.svg`).
* The package and activity name of the app.
### Prerequisites
* A fork of the Lawnicons repository;
* Your icon in the SVG format, adhering to the [above guidelines](#contributing-icons). The filename must use snake case (e.g. `spck_editor.svg`).
* The package and activity name of the app;

### Via `icontool.py`
Please check the [icon tool guide](/docs/icontool_guide.md) for more information.
Please check [the icon tool guide](/docs/icontool_guide.md) for more information.

### Via manual process
1. Add the ready SVG to the `svgs` directory.
1. Add the ready SVG to the `svgs` directory. If you want to add a link to an existing SVG, you will need its name.

1. Add a new line to `app/assets/appfilter.xml` (in alphabetical order, by the `name` attribute), and map the new icon to a package name and app's activity. For example:
2. Add a new line to `app/assets/appfilter.xml` (in alphabetical order, by the `name` attribute), and map the new icon to a package name and app's activity.

**Example**
- the app name: `Spck Editor`;
- the svg (drawable) name: `spck_editor`;
- the package and activity of the app: `io.spck/io.spck.EditorActivity`.

**The new line**
```xml
<item component="ComponentInfo{com.google.android.apps.nbu.files/com.google.android.apps.nbu.files.home.HomeActivity}" drawable="files_by_google" name="Files by Google"/>
<item component="ComponentInfo{io.spck/io.spck.EditorActivity}" drawable="spck_editor" name="Spck Editor"/>
```

A general template is as follows:

**General template**
```xml
<item component="ComponentInfo{[PACKAGE_NAME]/[APP_ACIVITY_NAME]}" drawable="[DRAWABLE NAME]" name="[APP NAME]"/>
```

1. Done! You're ready to open a pull request. Please set `develop` as the base branch.
4. Done! You're ready to open a pull request. Please set `develop` as the base branch.

## Finding the package and activity name of an app

Expand All @@ -158,8 +166,8 @@ Please check the [icon tool guide](/docs/icontool_guide.md) for more information

### Using `adb`
1. Connect your Android device or emulator to your laptop/desktop PC that has `adb` installed (see [this tutorial](https://www.xda-developers.com/install-adb-windows-macos-linux/) for more information) and open the app whose details you want to inspect, e.g. Telegram.
1. Open a new Command Prompt or Terminal window and input `adb devices`.
1. Finally, type the below-given command to get the information about the currently open application.
2. Open a new Command Prompt or Terminal window and input `adb devices`.
3. Finally, type the below-given command to get the information about the currently open application.

**For Mac or Linux**:

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Need help? [Join us on Discord](https://discord.gg/3x8qNWxgGZ).
## Requesting icons
Please use **Lawnicons 2.10+**: `Open Lawnicons → Tap "Request icons" → Submit the response`.

You can also use [the icon request form](https://forms.gle/xt7sJhgWEasuo9TR9). If a previously added icon has a design change, create [an issue](https://github.com/LawnchairLauncher/lawnicons/issues).
You can also use [the icon request form](https://forms.gle/xt7sJhgWEasuo9TR9). If a previously added icon has a design change, create [an issue](https://github.com/LawnchairLauncher/lawnicons/issues/new?assignees=&labels=icon+update&projects=&template=icon_rebrand.yml).



Loading

0 comments on commit b89c124

Please sign in to comment.