Skip to content
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

Extract watermark into plugin #1663

Merged
merged 3 commits into from
Aug 8, 2024

Conversation

SlicedSilver
Copy link
Contributor

Type of PR: enhancement

PR checklist:

  • Includes tests
  • Documentation update

Overview of change:

  • Removes the watermark feature from the core library and instead implements it as a built-in Pane Primitive (a.k.a plugin). This allows the watermark feature to be tree-shaken if not used.
  • Two new plugins included with the library build: TextWatermark and ImageWatermark
  • TextWatermark extends the behaviour of the old watermark feature by supporting multiple lines of text
  • ImageWatermark adds the ability to easily add an image watermark.
  • Both plugins work with the new Pane Primitive.

@SlicedSilver SlicedSilver added enhancement Feature requests, and general improvements. breaking change Changes the API in a non backwards compatible way. polish Very minor behavior improvement that users will enjoy. plugin This feature request should/could be implemented as a Plugin. labels Jul 30, 2024
@SlicedSilver SlicedSilver added this to the 5.0 milestone Jul 30, 2024
@SlicedSilver SlicedSilver self-assigned this Jul 30, 2024
Copy link

size-limit report 📦

Path Size
ESM 43.07 KB (+1.44% 🔺)
ESM createChart 41.76 KB (-1.12% 🔽)
ESM createChartEx 40.49 KB (-0.99% 🔽)
Standalone-ESM 0 B (-100% 🔽)
Standalone 44.53 KB (+1.46% 🔺)
ESM Standalone 44.53 KB (+100% 🔺)
Plugin: Text Watermark 1.79 KB (+100% 🔺)
Plugin: Image Watermark 1.7 KB (+100% 🔺)

@SlicedSilver
Copy link
Contributor Author

size-limit report 📦

Path Size
ESM 43.07 KB (+1.44% 🔺)
ESM createChart 41.76 KB (-1.12% 🔽)
ESM createChartEx 40.49 KB (-0.99% 🔽)
Standalone-ESM 0 B (-100% 🔽)
Standalone 44.53 KB (+1.46% 🔺)
ESM Standalone 44.53 KB (+100% 🔺)
Plugin: Text Watermark 1.79 KB (+100% 🔺)
Plugin: Image Watermark 1.7 KB (+100% 🔺)

FYI: I renamed Standalone-ESM to ESM Standalone

@SlicedSilver SlicedSilver changed the base branch from v5-candidate to pane-primitives July 30, 2024 21:24
@SlicedSilver SlicedSilver marked this pull request as ready for review July 30, 2024 21:24
@edew edew self-requested a review July 31, 2024 09:26
@SlicedSilver SlicedSilver merged commit a4aa582 into pane-primitives Aug 8, 2024
22 of 33 checks passed
@SlicedSilver SlicedSilver deleted the extract-watermark-into-plugin branch August 8, 2024 09:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change Changes the API in a non backwards compatible way. enhancement Feature requests, and general improvements. plugin This feature request should/could be implemented as a Plugin. polish Very minor behavior improvement that users will enjoy.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants