Skip to content

Commit 1641d45

Browse files
committed
Mark PolyfillColorPanel as deprecated and will be removed in v2.0.0
1 parent bf29fe4 commit 1641d45

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77
## [Unreleased]
88
### Added
99
### Changed
10+
- Mark PolyfillColorPanel as deprecated and will be removed in v2.0.0 (@marteinn)
1011
- Exclude development files from release build (@marteinn)
1112
- Add package description (@marteinn)
1213
- Add project urls in setup (@marteinn)

wagtail_color_panel/edit_handlers.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import warnings
2+
13
from wagtail.admin.panels import FieldPanel
24

35
from wagtail_color_panel.widgets import ColorInputWidget, PolyfillColorInputWidget
@@ -13,6 +15,24 @@ def get_form_options(self):
1315

1416

1517
class PolyfillColorPanel(FieldPanel):
18+
"""
19+
DEPRECATED: This panel uses the Spectrum library for IE11 compatibility.
20+
Since IE11 is no longer supported by Microsoft (as of June 2022) and this
21+
package requires Wagtail 6.3+ (which dropped IE11 support), please use
22+
NativeColorPanel instead.
23+
24+
This panel will be removed in version 2.0.0.
25+
"""
26+
27+
def __init__(self, *args, **kwargs):
28+
warnings.warn(
29+
"PolyfillColorPanel is deprecated and will be removed in "
30+
"wagtail-color-panel 2.0.0. Use NativeColorPanel instead.",
31+
DeprecationWarning,
32+
stacklevel=2,
33+
)
34+
super().__init__(*args, **kwargs)
35+
1636
def get_form_options(self):
1737
opts = super().get_form_options()
1838
opts["widgets"] = {

0 commit comments

Comments
 (0)