Skip to content

Commit

Permalink
Merge branch 'wagtail:main' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
rdkamali authored Jan 22, 2024
2 parents 60786a2 + 8a5d228 commit 12adb76
Show file tree
Hide file tree
Showing 1,191 changed files with 37,995 additions and 48,961 deletions.
18 changes: 18 additions & 0 deletions .babelrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"sourceType": "unambiguous",
"presets": [
[
"@babel/preset-env",
{
"targets": {
"chrome": 100,
"safari": 15,
"firefox": 91
}
}
],
"@babel/preset-typescript",
"@babel/preset-react"
],
"plugins": []
}
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
paths:
- .venv
- run: pipenv run ruff check .
- run: pipenv run black --target-version py38 --check --diff .
- run: pipenv run ruff format --check .
- run: pipenv run semgrep --config .semgrep.yml --error .
- run: git ls-files '*.html' | xargs pipenv run djhtml --check
- run: pipenv run curlylint --parse-only wagtail
Expand Down
4 changes: 4 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,7 @@ indent_size = 2

[*.md]
trim_trailing_whitespace = false

# Make sure this file _doesn’t_ end with a final newline. It breaks rendering.
[wagtail/admin/templates/wagtailadmin/shared/icon.html]
insert_final_newline = false
3 changes: 2 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ module.exports = {
extends: [
'@wagtail/eslint-config-wagtail',
'plugin:@typescript-eslint/recommended',
'plugin:storybook/recommended',
],
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
Expand Down Expand Up @@ -44,7 +45,7 @@ module.exports = {
'react/jsx-filename-extension': ['error', { extensions: ['.js', '.tsx'] }],
'no-underscore-dangle': [
'error',
{ allow: ['__REDUX_DEVTOOLS_EXTENSION__'] },
{ allow: ['__REDUX_DEVTOOLS_EXTENSION__', '_tippy'] },
],
// this rule can be confusing as it forces some non-intuitive code for variable assignment
'prefer-destructuring': 'off',
Expand Down
2 changes: 2 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ af942a27e41b47e257b6cd46c01a13cd381fed04
01986cfa1702929352ac8b6d58ada6070da2c700
# Initial black reformatting (#7967)
d10f15e55806c6944827d801cd9c2d53f5da4186
# Initial ruff reformatting (#11220)
f8fc2c3a2052988f7b458e26f621e058d67a76c9
37 changes: 26 additions & 11 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,38 @@ Thank you for considering to help Wagtail.
We welcome all support, whether on bug reports, code, design, reviews, tests,
documentation, translations or just feature requests.

## Using the issue tracker
## Working on an issue

The [issue tracker](https://github.com/wagtail/wagtail/issues) is
the preferred channel for [bug reports](#bugs), [features requests](#features)
and [submitting pull requests](#pull-requests). Please don't use the issue tracker
for support - use [the 'wagtail' tag on Stack Overflow](https://stackoverflow.com/questions/tagged/wagtail) (preferred) or our [Wagtail support group](https://groups.google.com/forum/#!forum/wagtail).
👉 If an issue isn’t being worked on by anyone, go for it! **No need to ask "please assign me this issue".** Add a comment to claim the issue once you’re ready to start.

## New code
Please review the [contributing guidelines](https://docs.wagtail.org/en/latest/contributing/index.html).
You might like to start by checking issues with the [good first issue](https://github.com/wagtail/wagtail/labels/good%20first%20issue) label.

Please review the
[contributing guidelines](https://docs.wagtail.org/en/latest/contributing/index.html).
You might like to start by checking issues with the
[good first issue](https://github.com/wagtail/wagtail/labels/good%20first%20issue) label.
## Reporting bugs

To report bugs, use our [issue tracker](https://github.com/wagtail/wagtail/issues).

## Feature requests

Use our [issue tracker](https://github.com/wagtail/wagtail/issues) for feature requests, or go the [Wagtail Slack](https://github.com/wagtail/wagtail/wiki/Slack) or [Discussions](https://github.com/wagtail/wagtail/discussions) if you want to discuss an idea before requesting it.

## Support

Please don't use the issue tracker for support - use [the 'wagtail' tag on Stack Overflow](https://stackoverflow.com/questions/tagged/wagtail) (preferred) or the [#support channel](https://github.com/wagtail/wagtail/wiki/Slack#support) on the [Wagtail Slack](https://github.com/wagtail/wagtail/wiki/Slack).

## Code reviews

We welcome code reviews from everyone. There's always a list of pull requests tagged ['Needs review'](https://github.com/wagtail/wagtail/pulls?q=is%3Apr+is%3Aopen+label%3A%22Needs+review%22).
We welcome code reviews from everyone. There's always a list of pull requests tagged [status:Needs Review](https://github.com/wagtail/wagtail/pulls?q=is%3Apr+is%3Aopen+sort%3Aupdated-desc+label%3A%22status%3ANeeds+Review%22).

## Triaging issues

We welcome help with triaging issues and pull requests. You can help by:

- Adding more details or your own perspective to bug reports or feature requests.
- Attempting to reproduce issues tagged [status:Unconfirmed](https://github.com/wagtail/wagtail/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3Astatus%3AUnconfirmed) and sharing your findings.
- Reviewing or otherwise offering your feedback on pull requests.

View our [issue tracking guidelines](https://docs.wagtail.org/en/latest/contributing/issue_tracking.html) for more information.

## Translations

Expand Down
10 changes: 10 additions & 0 deletions .github/ISSUE_TEMPLATE/BUG_REPORT.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,13 @@ Any other relevant information. For example, why do you consider this a bug and
- Django version: Look in your requirements.txt, or run `pip show django | grep Version`.
- Wagtail version: Look at the bottom of the Settings menu in the Wagtail admin, or run `pip show wagtail | grep Version:`.
- Browser version: You can use https://www.whatsmybrowser.org/ to find this out.

### Working on this

<!--
Do you have thoughts on skills needed?
Are you keen to work on this yourself once the issue has been accepted?
Please let us know here.
-->

Anyone can contribute to this. View our [contributing guidelines](https://docs.wagtail.org/en/latest/contributing/index.html), add a comment to the issue once you’re ready to start.
10 changes: 10 additions & 0 deletions .github/ISSUE_TEMPLATE/DOCUMENTATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,13 @@ assignees: ''
<!--
If you're suggesting a very specific change to the documentation, feel free to directly submit a pull request.
-->

### Working on this

<!--
Do you have thoughts on skills needed?
Are you keen to work on this yourself once the issue has been accepted?
Please let us know here.
-->

Anyone can contribute to this. View our [contributing guidelines](https://docs.wagtail.org/en/latest/contributing/index.html), add a comment to the issue once you’re ready to start.
10 changes: 10 additions & 0 deletions .github/ISSUE_TEMPLATE/FEATURE_REQUEST.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,13 @@ assignees: ''
-->

(Write your answer here.)

### Working on this

<!--
Do you have thoughts on skills needed?
Are you keen to work on this yourself once the issue has been accepted?
Please let us know here.
-->

Anyone can contribute to this. View our [contributing guidelines](https://docs.wagtail.org/en/latest/contributing/index.html), add a comment to the issue once you’re ready to start.
38 changes: 19 additions & 19 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,17 @@ concurrency:
# - test runs with USE_EMAIL_USER_MODEL=yes and DISABLE_TIMEZONE=yes

# Current configuration:
# - django 3.2, python 3.8, postgres:12, parallel
# - django 3.2, python 3.9, mysql:8.0
# - django 4.1, python 3.10, sqlite
# - django 4.2, python 3.11, mysql:8.1, parallel
# - django 4.1, python 3.11, postgres:12, parallel, USE_EMAIL_USER_MODEL=yes
# - django 4.2, python 3.12, postgres:15, parallel, DISABLE_TIMEZONE=yes
# - django 4.2, python 3.8, postgres:12, parallel
# - django 4.2, python 3.9, mysql:8.0
# - django 4.2, python 3.10, sqlite
# - django 5.0, python 3.12, mysql:8.1, parallel
# - django 5.0, python 3.11, postgres:12, parallel, USE_EMAIL_USER_MODEL=yes
# - django 5.0, python 3.12, postgres:15, parallel, DISABLE_TIMEZONE=yes
# - django stable/5.0.x, python 3.10, postgres (allow failures)
# - django main, python 3.10, postgres:latest, parallel (allow failures)
# - elasticsearch 7, django 3.2, python 3.8, postgres:latest
# - opensearch 2, django 4.1, python 3.9, sqlite
# - elasticsearch 8, django 4.2, python 3.10, sqlite, USE_EMAIL_USER_MODEL=yes
# - elasticsearch 7, django 4.2, python 3.8, postgres:latest
# - opensearch 2, django 4.2, python 3.9, sqlite
# - elasticsearch 8, django 5.0, python 3.10, sqlite, USE_EMAIL_USER_MODEL=yes

# Some tests are run in parallel by passing --parallel to runtests.py.
# When running tests in parallel, some errors cannot be pickled and result in
Expand All @@ -48,7 +48,7 @@ jobs:
matrix:
include:
- python: '3.10'
django: 'Django>=4.1,<4.2'
django: 'Django>=4.2,<4.3'

steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -80,16 +80,16 @@ jobs:
matrix:
include:
- python: '3.8'
django: 'Django>=3.2,<3.3'
django: 'Django>=4.2,<4.3'
experimental: false
parallel: '--parallel'
- python: '3.11'
django: 'Django>=4.1,<4.2'
django: 'Django>=5.0,<5.1'
experimental: false
emailuser: emailuser
parallel: '--parallel'
- python: '3.12'
django: 'Django>=4.2,<4.3'
django: 'Django>=5.0,<5.1'
postgres: 'postgres:15'
notz: notz
experimental: false
Expand Down Expand Up @@ -153,11 +153,11 @@ jobs:
matrix:
include:
- python: '3.9'
django: 'Django>=3.2,<3.3'
experimental: false
- python: '3.11'
django: 'Django>=4.2,<4.3'
experimental: false
- python: '3.12'
django: 'Django>=5.0,<5.1'
experimental: false
parallel: '--parallel'
mysql: 'mysql:8.1'
services:
Expand Down Expand Up @@ -202,7 +202,7 @@ jobs:
matrix:
include:
- python: '3.10'
django: 'Django>=4.2,<4.3'
django: 'Django>=5.0,<5.1'
emailuser: emailuser
steps:
- name: Configure sysctl limits
Expand Down Expand Up @@ -251,7 +251,7 @@ jobs:
matrix:
include:
- python: '3.8'
django: 'Django>=3.2,<3.3'
django: 'Django>=4.2,<4.3'
experimental: false

services:
Expand Down Expand Up @@ -309,7 +309,7 @@ jobs:
matrix:
include:
- python: '3.9'
django: 'Django>=4.1,<4.2'
django: 'Django>=4.2,<4.3'
experimental: false

steps:
Expand Down
10 changes: 2 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,12 @@ default_language_version:
node: system
python: python3
repos:
- repo: https://github.com/psf/black
rev: 22.3.0
hooks:
- id: black
language_version: python3
args: ['--target-version', 'py38']

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: 'v0.0.290'
rev: 'v0.1.5'
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format

- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.3
Expand Down
21 changes: 15 additions & 6 deletions .stylelintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,13 @@ module.exports = {
],
// Would be valuable for strict BEM components but is too hard to enforce with legacy code.
'no-descending-specificity': null,
// Override stylelint-config-wagtail’s options to allow all float and clear values for now.
'declaration-property-value-allowed-list': {
// 'clear': ['both', 'none'],
// 'float': ['inline-start', 'inline-end', 'none', 'unset'],
'text-align': ['start', 'end', 'center'],
},
// Refined ordering to align with media mixin usage - see https://github.com/wagtail/stylelint-config-wagtail/issues/37
'order/order': [
'dollar-variables',
'custom-properties',
{ type: 'at-rule', hasBlock: false }, // @-rules that have no nesting.
'declarations',
],
// Some parts of declaration-strict-value commented out until we are in a position to enforce them.
'scale-unlimited/declaration-strict-value': [
[
Expand Down Expand Up @@ -79,5 +80,13 @@ module.exports = {
],
},
],
// Ignore rule until all existing selectors can be updated.
'scss/selector-no-union-class-name': null,
// Ignore rule until all existing classes can be updated to use BEM.
'selector-class-pattern': null,
// Allow more specificity until styles can be updated to match the more strict rules.
'selector-max-specificity': '0,6,3',
// Ignore rule until we confirmed we prefer shorthand properties for positioning.
'declaration-block-no-redundant-longhand-properties': null,
},
};
Loading

0 comments on commit 12adb76

Please sign in to comment.