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

Blend Mode Modifiers #2315

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Blend Mode Modifiers #2315

wants to merge 1 commit into from

Conversation

LukeFinch
Copy link
Contributor

Proof of concept to add more modifiers that calculate the effect of blend modes
Currently, I have only created the logic for add and subtract

They extend the behaviour of the mix blend mode, but a lot of the logic could be improved. I've taken a stab at improving some of the types, but this could be refactored further.

I believe in the current state this POC has caused some regressions to the typings of the MIX blend mode itself, which would need to be addressed before this is production-ready.

@changeset-bot
Copy link

changeset-bot bot commented Oct 9, 2023

⚠️ No Changeset found

Latest commit: 5775c9f

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions
Copy link
Contributor

github-actions bot commented Oct 9, 2023

PR Analysis

  • 🎯 Main theme: Adding new blend mode modifiers
  • 📝 PR summary: This PR introduces new blend mode modifiers to the existing color modifier logic. It adds new types for these modifiers and updates the existing logic to handle these new types. The PR also includes the logic for two new blend modes: 'add' and 'subtract'.
  • 📌 Type of PR: Enhancement
  • 🧪 Relevant tests added: No
  • ⏱️ Estimated effort to review [1-5]: 3, because the PR introduces new logic and modifies existing logic, which requires a careful review to ensure nothing is broken. However, the changes are well-structured and clear, making the review process straightforward.
  • 🔒 Security concerns: No security concerns found

PR Feedback

How to use

To invoke the PR-Agent, add a comment using one of the following commands:
/review [-i]: Request a review of your Pull Request. For an incremental review, which only considers changes since the last review, include the '-i' option.
/describe: Modify the PR title and description based on the contents of the PR.
/improve [--extended]: Suggest improvements to the code in the PR. Extended mode employs several calls, and provides a more thorough feedback.
/ask <QUESTION>: Pose a question about the PR.
/update_changelog: Update the changelog based on the PR's contents.

To edit any configuration parameter from configuration.toml, add --config_path=new_value
For example: /review --pr_reviewer.extra_instructions="focus on the file: ..."
To list the possible configuration parameters, use the /config command.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 9, 2023

Commit SHA:a0195ad95b37f42d2224540b4da9e42ec456cf66

Test coverage results 🧪

Code coverage diff between base branch:main and head branch: feat/modifiers 
Status File % Stmts % Branch % Funcs % Lines
🔴 total 70.96 (-0.11) 61.27 (-0.13) 69.13 (-0.16) 71.23 (-0.09)
🔴 src/types/Modifier.ts 50 (-50) 0 (-100) 0 (-100) 100 (0)
🔴 src/utils/modifyColor.ts 60.86 (-21.49) 50 (-30) 100 (0) 60.86 (-21.49)
✨ 🆕 src/utils/color/add.ts 0 100 0 0
✨ 🆕 src/utils/color/setLuminance.ts 0 100 0 0
✨ 🆕 src/utils/color/subtract.ts 0 100 0 0

@github-actions
Copy link
Contributor

github-actions bot commented Oct 9, 2023

Commit SHA:a0195ad95b37f42d2224540b4da9e42ec456cf66
Current PR reduces the test coverage percentage by 100 for some tests

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

Successfully merging this pull request may close these issues.

None yet

1 participant