10000 feat: Update dark mode switch to be compatible with Django 4.2 admin dark mode by fsbraun · Pull Request #7549 · django-cms/django-cms · GitHub
[go: up one dir, main page]

Skip to content

feat: Update dark mode switch to be compatible with Django 4.2 admin dark mode #7549

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

Merged
merged 91 commits into from
May 11, 2023

Conversation

fsbraun
Copy link
Member
@fsbraun fsbraun commented May 8, 2023

Description

Since version 4.2 Django's admin has its own dark mode toggle. While functionally similar, it uses a different naming convention. This PR adopts Django's naming convention

  • The color scheme is defined by the data-theme attribute of the html tag (before: data-color-scheme)
  • The toggle toggles between three states: light, dark, auto (before: two states - light and dark)
  • The toggle button shows the current setting (sun: light, moon: dark, black-white-circle: auto) as opposed the setting that would be reached if the toggle is clicked

Related resources

  • #...
  • #...

Checklist

  • I have opened this pull request against develop
  • I have added or modified the tests when changing logic
  • I have followed the conventional commits guidelines to add meaningful information into the changelog
  • I have read the contribution guidelines and I have joined #workgroup-pr-review on Slack to find a “pr review buddy” who is going to review my pull request.

Florian Delizy and others added 30 commits February 2, 2022 00:10
* [3.10.0rc1 release process] Bumped version to 3.10.0rc1
* [3.10.0rc1 release process] compilemessages
* [3.10.0rc1 release process] compiling new static files
* [3.10.0rc1 release process] updating latest docs
* Fix script typos (django-cms#7201)
* [refactor] Typos in release scripts
* This was correct.

Co-authored-by: Simon Krull <simondotunix@gmail.com>

* feat: Added concurrency option to github workflows (django-cms#7205)
* fix: Disable workflow concurrency to bring stability back to the CI (django-cms#7209)
* Upgrade Gulp and Nodejs (django-cms#7208)
* feat: upgrade sass and gulp sass so that it installs on a modern node.js
* fix: upgrade some packages and gulp config to 4.x series
* fix: add support for icons working as well
* Feat: get some tasks to work
* fix: port one more tasks even if it is still erroring
* wip: still broken config for webpack bundle
* fix: let the new tests run
* fix: issue with lint task
* fix: some more issues with loaders
* feat: get some tests passing atleast
* fix: the frontend tests pass now
* feat: generate new lock file
* feat: use gulp 4.x
* feat: make build use node16 as well
* feat: add .nvmrc for a consistent experience
* feat: Run workflows in concurrency groups (django-cms#7211)
* feat: Added concurrency config using unique workflow groups
* Remove whitespace to test cancellation
* Remove whitespace to test cancellation 2

Co-authored-by: Vinit Kumar <mail@vinitkumar.me>
Co-authored-by: Simon Krull <simondotunix@gmail.com>
* Fix script typos (django-cms#7201)

* [refactor] Typos in release scripts

* This was correct.

Co-authored-by: Simon Krull <simondotunix@gmail.com>

* feat: Added concurrency option to github workflows (django-cms#7205)

* fix: Disable workflow concurrency to bring stability back to the CI (django-cms#7209)

* Upgrade Gulp and Nodejs (django-cms#7208)

* feat: upgrade sass and gulp sass so that it installs on a modern node.js

* fix: upgrade some packages and gulp config to 4.x series

* fix: add support for icons working as well

* Feat: get some tasks to work

* fix: port one more tasks even if it is still erroring

* wip: still broken config for webpack bundle

* fix: let the new tests run

* fix: issue with lint task

* fix: some more issues with loaders

* feat: get some tests passing atleast

* fix: the frontend tests pass now

* feat: generate new lock file

* feat: use gulp 4.x

* feat: make build use node16 as well

* feat: add .nvmrc for a consistent experience

* feat: Run workflows in concurrency groups (django-cms#7211)

* feat: Added concurrency config using unique workflow groups

* Remove whitespace to test cancellation

* Remove whitespace to test cancellation 2

Co-authored-by: Vinit Kumar <mail@vinitkumar.me>

* fix: Toolbar bug in 3.10 (django-cms#7232)

Co-authored-by: fsbraun <fsbraun@gmx.de>

Co-authored-by: Mark Walker <theshow@gmail.com>
Co-authored-by: Simon Krull <simondotunix@gmail.com>
Co-authored-by: fsbraun <fsbraun@gmx.de>
* [3.10.0rc2 release process] Bumped version to 3.10.0rc2
* [3.10.0rc2 release process] compilemessages
* [3.10.0rc2 release process] compiling new static files
* [3.10.0rc2 release process] updating latest docs
…nt toolbar… (django-cms#7289)

* Fixes django-cms#7288 by also catching AttributeError, when the current toolbar object doesn't define get_draft_url()

* django-cms#7288: also catch AttributeError when `get_absolute_url()` isn't defined.
* Fix for django 2.2 in middleware [django-cms#7290]

* Address isort concern
* Update release script to make it compatible with BSD (macos) compatible

* Fix version number in bump commit
* [3.11.0 release process] Bumped version to 3.11.0

* [3.11.0 release process] compilemessages

* [3.11.0 release process] compiling new static files

* [3.11.0 release process] updating latest docs

* [3.11.0rc1 release process] Bumped version to 3.11.0rc1

* Added static files

* Removed static files of 0.3.11 release

* Manually added changes to the upgrade docs

* Adjusted upgrade note header
# Conflicts:
#	.github/workflows/frontend.yml
#	CHANGELOG.rst
#	docs/upgrade/3.10.0.rst
#	package-lock.json
#	package.json
fsbraun and others added 23 commits April 16, 2023 12:38
…form (django-cms#7486)

* Better link change list to change form
* Add filter for site
django-cms#7488)

* fix: replace ' by ′ in fr translation

no more "page d\u0027accueil"!

* Remove unnecessary escapes filter where translations

{% filter "escapejs" %} ... {% endfilter %} only belongs to situations where dat
10000
a is put into html attributes or js code.

Co-authored-by: Fabian Braun <fsbraun@gmx.de>
Added a new setting that allow to configure globally if the django-cms
redirects preserving the query parameters.
`REDIRECT_PRESERVE_QUERY_PARAMS`.
This feature is usefull for example:
1. marketing campains extra parameters,
2. social networks extra parameters like `fbclick`,
3. custom developed parameters, after that page has been moved, the
older URLs for that page should preserve the functionality.
Co-authored-by: Nihal <nihal.r@qburst.com>
This commit adds the REDIRECT_TO_LOWERCASE_SLUG option which will
cause the cms to redirect requests with an non-lowercase slug if
no page with that slug is found.

Implements django-cms#1324
* fix/merge_errors

* Update incomplete color scheme docs

* fix typos
* revert: test change done earlier

* feat: add django 4.2a1 to requirements and to the CI

* fix: typo in the test.yml file

* fix: update django to the stable

* feat: some more updates to get the CI running

* fix: two lint related issues

* fix: update compatibility matrix to include django 4.2 support
* Add deprecation warnings to cms.api

* Fix typos

---------

Co-authored-by: Vinit Kumar <vinit.kumar@kidskonnect.nl>
…7504)

* revert: test change done earlier

* feat: replace flake8 with ruff

* fix: code cleanup as per ruff recommendations

* fix: cleanup code

* fix: use flake-to-ruff to convert our config to ruff.toml file

* fix: one more bypass

* fix: review feedback

* fix: cleanup code for usage dict, list and unnecessary usage

Authored-by: Vinit Kumar <vinit.kumar@kidskonnect.nl>
Signed-off-by: Vinit Kumar <vinit.kumar@kidskonnect.nl>

* fix: broken ci tests

* fix: isort issues in the forms.py

* fix: explanation of the rules bypass

* fix: isort issues

* revert: changes to the testcases.py

* fix: use ruff to format imports

* fix: ignore isort for this file as it causes circular import issues

* Update cms/toolbar/toolbar.py

Co-authored-by: Fabian Braun <fsbraun@gmx.de>

* Update cms/api.py

Co-authored-by: Fabian Braun <fsbraun@gmx.de>

---------

Signed-off-by: Vinit Kumar <vinit.kumar@kidskonnect.nl>
Co-authored-by: Fabian Braun <fsbraun@gmx.de>
…develop

# Conflicts:
#	CHANGELOG.rst
#	cms/static/cms/js/dist/3.11.1/bundle.admin.base.min.js
#	cms/static/cms/js/dist/3.11.1/bundle.admin.pagetree.min.js
#	package-lock.json
Copy link
Member
@marksweb marksweb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0