This repository has been archived by the owner on Oct 17, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit a1c8c3b
Showing
84 changed files
with
3,652 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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,40 @@ | ||
name: Bug report | ||
description: Something is not working as expected. | ||
title: Description of the bug | ||
labels: bug | ||
|
||
body: | ||
- type: textarea | ||
attributes: | ||
label: Describe the bug | ||
description: >- | ||
A clear and concise description of what the bug is. | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
attributes: | ||
label: To Reproduce | ||
description: >- | ||
Steps to reproduce the behavior. | ||
placeholder: | | ||
1. Go to '...' | ||
2. Click on '....' | ||
3. Scroll down to '....' | ||
4. See error | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
attributes: | ||
label: Expected behavior | ||
description: >- | ||
A clear and concise description of what you expected to happen. | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
attributes: | ||
label: Additional context | ||
description: >- | ||
Add any other context about the problem here. |
This file contains 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,37 @@ | ||
name: Components request | ||
description: Suggest an idea for a new component | ||
title: Description of the component request | ||
labels: enhancement | ||
|
||
body: | ||
- type: textarea | ||
attributes: | ||
label: Why would you like to add a new component? | ||
placeholder: >- | ||
A clear and concise description of why the component should be added. | ||
validations: | ||
required: false | ||
|
||
- type: textarea | ||
attributes: | ||
label: Name the equivalents in GTUI. | ||
placeholder: >- | ||
A list of the equivalents in the GTUI library in SwiftGui (see dependencies). | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
attributes: | ||
label: Describe your idea for the implementation. | ||
placeholder: >- | ||
What could the implementation be like in Adwaita? | ||
validations: | ||
required: false | ||
|
||
- type: textarea | ||
attributes: | ||
label: Additional context | ||
placeholder: >- | ||
Add any other context about the component request here. | ||
validations: | ||
required: false |
This file contains 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,36 @@ | ||
name: Feature request | ||
description: Suggest an idea for this project | ||
title: Description of the feature request | ||
labels: enhancement | ||
|
||
body: | ||
- type: input | ||
attributes: | ||
label: Is your feature request related to a problem? Please describe. | ||
placeholder: A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] | ||
validations: | ||
required: false | ||
|
||
- type: textarea | ||
attributes: | ||
label: Describe the solution you'd like | ||
placeholder: >- | ||
A clear and concise description of what you want to happen. | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
attributes: | ||
label: Describe alternatives you've considered | ||
placeholder: >- | ||
A clear and concise description of any alternative solutions or features you've considered. | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
attributes: | ||
label: Additional context | ||
placeholder: >- | ||
Add any other context or screenshots about the feature request here. | ||
validations: | ||
required: true |
This file contains 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,14 @@ | ||
## Steps | ||
- [ ] Add your name or username and a link to your GitHub profile into the [Contributors.md][1] file. | ||
- [ ] Build the project on your machine. If it does not compile, fix the errors. | ||
- [ ] Describe the purpose and approach of your pull request below. | ||
- [ ] Submit the pull request. Thank you very much for your contribution! | ||
|
||
## Purpose | ||
_Describe the problem or feature._ | ||
_If there is a related issue, add the link._ | ||
|
||
## Approach | ||
_Describe how this pull request solves the problem or adds the feature._ | ||
|
||
[1]: /Contributors.md |
This file contains 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 @@ | ||
name: SwiftLint | ||
|
||
on: | ||
push: | ||
paths: | ||
- '.github/workflows/swiftlint.yml' | ||
- '.swiftlint.yml' | ||
- '**/*.swift' | ||
pull_request: | ||
paths: | ||
- '.github/workflows/swiftlint.yml' | ||
- '.swiftlint.yml' | ||
- '**/*.swift' | ||
workflow_dispatch: | ||
paths: | ||
- '.github/workflows/swiftlint.yml' | ||
- '.swiftlint.yml' | ||
- '**/*.swift' | ||
|
||
jobs: | ||
SwiftLint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: SwiftLint | ||
uses: norio-nomura/action-swiftlint@3.2.1 | ||
with: | ||
args: --strict | ||
env: | ||
WORKING_DIRECTORY: Source |
This file contains 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,11 @@ | ||
.DS_Store | ||
/.build | ||
/Packages | ||
/*.xcodeproj | ||
xcuserdata/ | ||
DerivedData/ | ||
.swiftpm/config/registries.json | ||
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata | ||
.netrc | ||
/Package.resolved | ||
.Ulysses-Group.plist |
This file contains 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,170 @@ | ||
# Opt-In Rules | ||
opt_in_rules: | ||
- anonymous_argument_in_multiline_closure | ||
- array_init | ||
- attributes | ||
- closure_body_length | ||
- closure_end_indentation | ||
- closure_spacing | ||
- collection_alignment | ||
- comma_inheritance | ||
- conditional_returns_on_newline | ||
- contains_over_filter_count | ||
- contains_over_filter_is_empty | ||
- contains_over_first_not_nil | ||
- contains_over_range_nil_comparison | ||
- convenience_type | ||
- discouraged_none_name | ||
- discouraged_object_literal | ||
- discouraged_optional_boolean | ||
- discouraged_optional_collection | ||
- empty_collection_literal | ||
- empty_count | ||
- empty_string | ||
- enum_case_associated_values_count | ||
- explicit_init | ||
- fallthrough | ||
- file_header | ||
- file_name | ||
- file_name_no_space | ||
- first_where | ||
- flatmap_over_map_reduce | ||
- force_unwrapping | ||
- function_default_parameter_at_end | ||
- identical_operands | ||
- implicit_return | ||
- implicitly_unwrapped_optional | ||
- joined_default_parameter | ||
- last_where | ||
- legacy_multiple | ||
- let_var_whitespace | ||
- literal_expression_end_indentation | ||
- local_doc_comment | ||
- lower_acl_than_parent | ||
- missing_docs | ||
- modifier_order | ||
- multiline_arguments | ||
- multiline_arguments_brackets | ||
- multiline_function_chains | ||
- multiline_literal_brackets | ||
- multiline_parameters | ||
- multiline_parameters_brackets | ||
- no_extension_access_modifier | ||
- no_grouping_extension | ||
- no_magic_numbers | ||
- number_separator | ||
- operator_usage_whitespace | ||
- optional_enum_case_matching | ||
- prefer_self_in_static_references | ||
- prefer_self_type_over_type_of_self | ||
- prefer_zero_over_explicit_init | ||
- prohibited_interface_builder | ||
- redundant_nil_coalescing | ||
- redundant_type_annotation | ||
- return_value_from_void_function | ||
- shorthand_optional_binding | ||
- sorted_first_last | ||
- sorted_imports | ||
- static_operator | ||
- strict_fileprivate | ||
- switch_case_on_newline | ||
- toggle_bool | ||
- trailing_closure | ||
- type_contents_order | ||
- unneeded_parentheses_in_closure_argument | ||
- yoda_condition | ||
|
||
# Disabled Rules | ||
disabled_rules: | ||
- block_based_kvo | ||
- class_delegate_protocol | ||
- dynamic_inline | ||
- is_disjoint | ||
- no_fallthrough_only | ||
- notification_center_detachment | ||
- ns_number_init_as_function_reference | ||
- nsobject_prefer_isequal | ||
- private_over_fileprivate | ||
- redundant_objc_attribute | ||
- self_in_property_initialization | ||
- todo | ||
- unavailable_condition | ||
- valid_ibinspectable | ||
- xctfail_message | ||
|
||
# Custom Rules | ||
custom_rules: | ||
github_issue: | ||
name: 'GitHub Issue' | ||
regex: '//.(TODO|FIXME):.(?!.*(https://github\.com/david-swift/Adwaita/issues/\d))' | ||
message: 'The related GitHub issue must be included in a TODO or FIXME.' | ||
severity: warning | ||
|
||
fatal_error: | ||
name: 'Fatal Error' | ||
regex: 'fatalError.*\(.*\)' | ||
message: 'Fatal error should not be used.' | ||
severity: error | ||
|
||
enum_case_parameter: | ||
name: 'Enum Case Parameter' | ||
regex: 'case [a-zA-Z0-9]*\([a-zA-Z0-9\.<>?,\n\t =]+\)' | ||
message: 'The associated values of an enum case should have parameters.' | ||
severity: warning | ||
|
||
tab: | ||
name: 'Whitespaces Instead of Tab' | ||
regex: '\t' | ||
message: 'Spaces should be used instead of tabs.' | ||
severity: warning | ||
|
||
string_literals: | ||
name: 'String Literals' | ||
regex: '(".*")|("""(.|\n)*""")' | ||
message: 'String literals should not be used. Disable this rule in String and LocalizedStringResource extensions.' | ||
match_kinds: | ||
- string | ||
severity: warning | ||
|
||
# Thanks to the creator of the SwiftLint rule | ||
# "empty_first_line" | ||
# https://github.com/coteditor/CotEditor/blob/main/.swiftlint.yml | ||
# in the GitHub repository | ||
# "CotEditor" | ||
# https://github.com/coteditor/CotEditor | ||
empty_first_line: | ||
name: 'Empty First Line' | ||
regex: '(^[ a-zA-Z ]*(?:protocol|extension|class|struct) (?!(?:var|let))[ a-zA-Z:]*\{\n *\S+)' | ||
message: 'There should be an empty line after a declaration' | ||
severity: error | ||
|
||
# Analyzer Rules | ||
analyzer_rules: | ||
- unused_declaration | ||
- unused_import | ||
|
||
# Options | ||
file_header: | ||
required_pattern: '(// swift-tools-version: .+)?//\n// .*.swift\n// Adwaita\n//\n// Created by .* on .*\.(\n// Edited by (.*,)+\.)*\n(\n// Thanks to .* for the .*:\n// ".*"\n// https://.* \(\d\d.\d\d.\d\d\))*//\n' | ||
missing_docs: | ||
warning: [internal, private] | ||
error: [open, public] | ||
excludes_extensions: false | ||
excludes_inherited_types: false | ||
type_contents_order: | ||
order: | ||
- case | ||
- type_alias | ||
- associated_type | ||
- type_property | ||
- instance_property | ||
- ib_inspectable | ||
- ib_outlet | ||
- subscript | ||
- initializer | ||
- deinitializer | ||
- subtype | ||
- type_method | ||
- view_life_cycle_method | ||
- ib_action | ||
- other_method |
This file contains 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,50 @@ | ||
# Contributing | ||
|
||
Thank you very much for taking the time for contributing to this project. | ||
|
||
## Report a Bug | ||
Just open a new issue on GitHub and describe the bug. It helps if your description is detailed. Thank you very much for your contribution! | ||
|
||
## Suggest a New Feature | ||
Just open a new issue on GitHub and describe the idea. Thank you very much for your contribution! | ||
|
||
### Suggest a New Component | ||
If you want to be able to access a component from Libadwaita or GTK that is currently not available in Adwaita, you can add it to [SwiftGui](https://github.com/JCWasmx86/SwiftGui). | ||
If you want to add an Adwaita interface for an already existing GTUI widget, open an issue. | ||
|
||
## Pull Requests | ||
I am happy for every pull request, you do not have to follow these guidelines. However, it might help you to understand the project structure and make it easier for me to merge your pull request. Thank you very much for your contribution! | ||
|
||
### 1. Fork & Clone this Project | ||
Start by clicking on the `Fork` button at the top of the page. Then, clone this repository to your computer. | ||
|
||
### 2. Open the Project | ||
Open the project folder in GNOME Builder, Xcode or another IDE. | ||
|
||
### 3. Understand the Project Structure | ||
- The `README.md` file contains a description of the app or package. | ||
- The `Contributors.md` file contains the names or user names of all the contributors with a link to their GitHub profile. | ||
- The `LICENSE.md` contains an GPL-3.0 license. | ||
- `CONTRIBUTING.md` is this file. | ||
- Directory `Icons` that contains PNG and PXD (Pixelmator Pro) files for the images used in the app and guides. | ||
- Directory `Documentation` that contains the documentation generated with [SourceDocs][1]. | ||
- `Sources` contains the source code of the project. | ||
- `Adwaita` contains the source code of the project. | ||
- `Model` is the directory with Adwaita's basis. | ||
- `Data Flow` contains property wrappers and protocols required for managing the updates of a view. | ||
- `Extensions` contains all the extensions of types that are not defined in this project. | ||
- `User Interface` contains protocols and structures that are the basis of presenting content to the user. | ||
- `View` contains structures that conform to the `View` protocol and provide an easier-to-use wrapper around a GTUI `NativeWidgetPeer` type. | ||
- `Window` contains structures that conform to the `Window` protocol and simplify the creation of different types of windows. | ||
- `Tests` contains an example application for testing `Adwaita`. | ||
|
||
### 4. Edit the Code | ||
Edit the code. If you add a new type, add documentation in the code. | ||
|
||
### 5. Commit to the Fork | ||
Commit and push the fork. | ||
|
||
### 6. Pull Request | ||
Open GitHub to submit a pull request. Thank you very much for your contribution! | ||
|
||
[1]: https://github.com/SourceDocs/SourceDocs |
This file contains 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,3 @@ | ||
# Contributors | ||
|
||
- [david-swift](https://github.com/david-swift) |
Oops, something went wrong.