Skip to content

Commit

Permalink
Merge pull request #351 from black7375/dev
Browse files Browse the repository at this point in the history
Ver 5.0.0 Feedback Thread
  • Loading branch information
black7375 authored Apr 26, 2022
2 parents 567cdfe + cb63a83 commit 0fd746b
Show file tree
Hide file tree
Showing 169 changed files with 25,239 additions and 8,850 deletions.
6 changes: 6 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,11 @@ assignees: ''
- GTK Theme Name (Linux only): <!-- For example: Adwaita, Adwaita-Dark, Breath, Breath-Dark. Run `gsettings get org.gnome.desktop.interface gtk-theme` to output this -->
- [ ] Other: (e.g. [Photon Colors](https://addons.mozilla.org/en-US/firefox/addon/photon-colors/), [Google Chrome Dark](https://addons.mozilla.org/en-US/firefox/addon/google-chrome-dark/), [Fairytale Of Nature](https://addons.mozilla.org/en-US/firefox/addon/fairytale-of-nature/))

**`user.js` setup**

```javascript
// Your setting
```

**Additional context**
<!-- Add any other context about the problem here. -->
28 changes: 27 additions & 1 deletion .github/workflows/format.yml → .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Formatting
name: CI

# This action works with pull requests and pushes
on:
Expand All @@ -14,6 +14,32 @@ on:
- userContent.css

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Node cache
id: node-cache
uses: actions/cache@v2
with:
path: node_modules
key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-node-
- name: Package Install
if: steps.node-cache.outputs.cache-hit != 'true'
run: yarn install

- name: Build
run: yarn build

- name: Test
run: yarn test

prettier:
runs-on: ubuntu-latest

Expand Down
11 changes: 11 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,14 @@

# User.js
user.js

# Prettier error exeption
src/utils/_each.scss
# [error] src/utils/_each.scss: SyntaxError: CssSyntaxError: At-rule without name (28:7)
# [error] 26 | }
# [error] 27 | }
# [error] > 28 | @#{$name} #{"#{$blocks}"} {
# [error] | ^
# [error] 29 | @content;
# [error] 30 | }
# [error] 31 | }
237 changes: 35 additions & 202 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,11 @@
**Table of Contents**

- [Introduce](#introduce)
- [Code of Conduct](#code-of-conduct)
- [We Develop with Github](#we-develop-with-github)
- [Environment](#environment)
- [Your First Contribution](#your-first-contribution)
- [Contribution Targets](#contribution-targets)
- [Project Structure](#project-structure)
- [Icon files](#icon-files)
- [Meta Info files](#meta-info-files)
- [Restrictions](#restrictions)
- [Rules](#rules)
- [Version](#version)
- [Branch](#branch)
- [Issue](#issue)
- [Coding style](#coding-style)
- [Commit](#commit)
- [Commit Message](#commit-message)
- [Pull request](#pull-request)
- [License](#license)
* [Code of Conduct](#code-of-conduct)
* [We Develop with Github](#we-develop-with-github)
* [Your First Contribution](#your-first-contribution)
* [Contribution Targets](#contribution-targets)
- [License](#license)
- [References](#references)

<!-- markdown-toc end -->
Expand All @@ -30,71 +17,43 @@

I'm really glad you're reading this, because we need volunteer developers to help this project come to fruition.

This document is intended to help, not burden you.

You can use it as a reference for various guidelines and information, and PR comfortably.

Please note we have a code of conduct, please follow it in all your interactions with the project.

### Code of Conduct

Refer to [CODE\_OF\_CONDUCT.md](https://github.com/black7375/Firefox-UI-Fix/blob/master/CODE_OF_CONDUCT.md).
Refer to [CODE\_OF\_CONDUCT.md](./CODE_OF_CONDUCT.md).

### We Develop with Github

We use [github](https://github.com/black7375/Firefox-UI-Fix) to host code, to track [issues](https://github.com/black7375/Firefox-UI-Fix/issues) and feature requests, as well as accept [pull requests](https://github.com/black7375/Firefox-UI-Fix/pulls).

After feedback has been given we expect responses within two weeks. After two weeks we may close the issue and pull request if it isn't showing any activity.

### Environment

You can configure it as follows:
```shell
## clone repository
git clone https://github.com/black7375/Firefox-UI-Fix.git
cd ./Firefox-UI-Fix

## checkout branch
git checkout <BRANCH_NAME>
```

### Your First Contribution

**Working on your first Pull Request?** You can learn how from this *free* series [How to Contribute to an Open Source Project on GitHub](https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github)
**Working on your first Pull Request?**

The following documents may be helpful:
- [Roadmap](https://github.com/black7375/Firefox-UI-Fix/issues/2)
- [Each Versions Plan](https://github.com/black7375/Firefox-UI-Fix/milestones)
- [Wiki:Compatibility Issues Solution](https://github.com/black7375/Firefox-UI-Fix/wiki/Compatibility-Issues-Solution)
- [Wiki:Tips](https://github.com/black7375/Firefox-UI-Fix/wiki/Tips)
You can learn how from this *free* series [How to Contribute to an Open Source Project on GitHub](https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github)

Live Debugging:
- [Tutorial: How to create and live-debug userChrome.css](https://www.reddit.com/r/FirefoxCSS/comments/73dvty/tutorial_how_to_create_and_livedebug_userchromecss/)
- [Browser Toolbox](https://developer.mozilla.org/en-US/docs/Tools/Browser_Toolbox)
- [Style Editor](https://developer.mozilla.org/en-US/docs/Tools/Style_Editor)

Firefox Source Code:
- [Github](https://github.com/mozilla/gecko-dev)
- [Searchfox](https://searchfox.org/)
- [Firefox Source Docs](https://firefox-source-docs.mozilla.org/)

Test for None mac users:
- [Docker-OSX](https://github.com/sickcodes/Docker-OSX)
And, Please refer to the [development documentation](./docs/).

### Contribution Targets

We love your input! We want to make contributing to this project as easy and transparent as possible, whether it's:

**Promotions**
- Introduce project
- Video (Recommend!!, We need it)
- Blog
- SNS
- Reddit, Hackernews..etc
- Sample
- [Producthunt](https://www.producthunt.com/posts/firefox-ui-fix-proton)([#43](https://github.com/black7375/Firefox-UI-Fix/issues/43))
- [Youtube](https://www.youtube.com/watch?v=ECta0icNMgY)
**Codes**
- New Features.
- Bug fixes.
- Improved compatibility or accessibility.
- Refactoring.

**Docs**
- Fix typos, alignments.
- Correct awkward sentences.
- Improve document readability.
**Graphic Resources**
- Icons ([#213](https://github.com/black7375/Firefox-UI-Fix/issues/213), We need the help of a designer!!)
- Social preview image ([sample](https://github.com/topics/firefox-theme))

**Issues**
- Report a bug.
Expand All @@ -103,148 +62,22 @@ We love your input! We want to make contributing to this project as easy and tra
- Help other users issue.
- Proposing others..

**Codes**
- New Features.
- Bug fixes.
- Improved compatibility or accessibility.
- Refactoring.

### Project Structure

```
root
|- .gitattributes: Exclude at `Download Zip`
|- .github: Issue/PR Template, Github Actions
|- .prettierignore: Exclude coding style
|- .prettierrc.json: Coding style
|- icons/: Icons, illustrations
|- install.ps1: Install script write in powersehll
|- install.sh: Install script write in bash
|- LEPTON: Meta infos (branch, version)
|- user.js: about:config settings
|- userChrome.css: CSS for Browser UI
|- userContent.css: CSS for Web pages
```

#### Icon files

Most of them are made in SVG.

Except for illustrations, there must be an `fill="context-fill" fill-opacity="context-fill-opacity"` property to dynamically determine color and transparency.

Icons are mainly [FirefoxUX/photon-icons](https://github.com/FirefoxUX/photon-icons)
or [microsoft/fluentui-system-icons](https://github.com/microsoft/fluentui-system-icons).

#### Meta Info files

It comes from [install.sh](https://github.com/black7375/Firefox-UI-Fix/blob/01ae88bf2c4710e1f364d9eb2901ca2b722cefe7/install.sh#L442).

**`LEPTON` file format**

If this file exist in same directory as the `userChrome.css` file,
it is recognized as the "Lepton" installation directory.

```ini
[Info]
Branch=master | photon-style | proton-style
Ver=<git tag> | <git hash> | [NULL]
```

**`lepton.ini` file Format**

In `lepton.ini`, various information is stored during the installation process.\
This file is recreated every time the installer is created.

```ini
[Profile Name]
Type=Local | Release | Git
Branch=master | photon-style | proton-style
Ver=<git tag> | <git hash> | [NULL]
Path=<Full PATH>
```

**Update Policy according to `Type`**
- Local(unknown): force latest commit update
- Release(<git tag>): force latest tag update
- Git<git hash>: latest commit update

### Restrictions

- Cross Platform
- Different compatibility issues occur in Win7, Win8, Win10, KDE, Gnome, Mac, etc.
- Consider compatibility as much as possible, but use [dedicated media queries](https://github.com/mozilla/gecko-dev/blob/d6188c9ce02efeea309e7177fc14c9eb2f09db37/servo/components/style/gecko/media_features.rs#L906-L930) in special cases
- CSS Loading Order
- User CSS(`userChrome.css`, `userContent.css`) is usually loaded first.
- In many cases, overriding should be prevented with [`important!`](https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity#the_!important_exception)(Anti-pattern in general web), and side effects should also be considered.
- DOM structure cannot be modified
- It is possible with JS, but there are security and configuration issues, so we should make the most of CSS.
- [`::before`](https://developer.mozilla.org/en-US/docs/Web/CSS/::before) and [`::after`](https://developer.mozilla.org/en-US/docs/Web/CSS/::after) can indirectly add CSS elements.
- [Shadow DOM](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_shadow_DOM)
- Firefox actively uses shadow dom internally
- To modify, it is often a roundabout approach or impossible to inherit
- [XUL](https://en.wikipedia.org/wiki/XUL)
- Sometimes written and bound in C++ for performance, like a treeview of bookmarks.
- The proper document does not exist, so we have to read the source code and work
- Available CSS features are also restricted.
- Side Effects
- Only CSS modifications can cause bugs that are hard to think of in the general web, such as the [context menu not appearing](https://github.com/black7375/Firefox-UI-Fix/issues/114).

## Rules

### Version

Milestone, The versioning scheme we use is [SemVer](https://semver.org/). (Maintainer decides, do not pull request.)

We will release the feature as soon as it is complete, but the cycle should be 2-4 weeks.
Rapid releases.

It comes from [#109](https://github.com/black7375/Firefox-UI-Fix/issues/109#issuecomment-873313945).

### Branch

Stable: Only bugfix, Documentation.
- `master`: Common bugfix, documentation.
- `photon-style`: Bugfix, documentation specified in `photon-style`.
- `proton-sryle`: Bugfix, documentation specified in `proton-style`.

Development: New Features.
- `dev`: Common new features.
- `photon-style-dev`: New features specified in `photon-style`.
- `proton-style-dev`: New features specified in `proton-style`.

### Issue

- **Versions:**
- Make sure you’re on the latest version.
- Try older versions.
- Try switching up dependency versions.
- **Search:** Search the project’s [issues](https://github.com/black7375/Firefox-UI-Fix/issues) to make sure it's not a known issue.

### Coding style

- **Indent:** 2 spaces for indentation rather than tabs.
- **Columns:** Fit `80`~`100` columns as much as possible. (Auto formatting is using 120 to avoid the worst case)

### Commit

- **Meaningfully:**: It doesn't make meaningless commits.
- **One per task:** It's difficult to distinguish when various tasks are mixed.
- **Often:** Codes may corrupt during large changes.

### Commit Message

For intuitive recognition, I [put a **prefix**](https://github.com/black7375/Firefox-UI-Fix/commits/master).
- `Add:` Add feature or enhanced.
- `Fix:` Bug fix or change default values.
- `Clean:` Refactoring.
- `Doc:` Update docs.

### Pull request
**Docs**
- Fix typos, alignments.
- Correct awkward sentences.
- Improve document readability.

- **Branch:** Check the [Branch](#branch) section and PR to the correct branch.
- **Issue:** We recommend that you open the issue first to discuss the changes with the owner of this repository.
**Promotions**
- Introduce project
- Video (Recommend!!, We need it)
- Blog
- SNS
- Reddit, Hackernews..etc
- Sample
- [Producthunt](https://www.producthunt.com/posts/firefox-ui-fix-proton)([#43](https://github.com/black7375/Firefox-UI-Fix/issues/43))
- [Youtube](https://www.youtube.com/watch?v=ECta0icNMgY)

### License
## License

**Any contributions you make will be under the MPL 2.0 Software License**

Expand Down
Loading

0 comments on commit 0fd746b

Please sign in to comment.