Skip to content

refactor: reduce code duplication - #136

Merged
kirillzyusko merged 1 commit into
mainfrom
refacotr/reduce-code-duplication
Jun 1, 2026
Merged

kirillzyusko merged 1 commit into
mainfrom
refacotr/reduce-code-duplication

Conversation

@kirillzyusko

@kirillzyusko kirillzyusko commented May 22, 2026 •

Copy link
Copy Markdown
Owner

📜 Description

Reduced code duplication.

💡 Motivation and Context

The original changes that added if-branching were here: #87

In this PR I created separate function that moves an element between containers.

Even though we have bigger code size and more lines such separation helps to improve code readability, so let's sacrifice microcode optimizations in sake of readability 🤞

📢 Changelog

JS

  • added moveElementTo helper function that switches implementation to new/old API depending whether browser support it or not;

🤔 How Has This Been Tested?

Tested via e2e tests.

📸 Screenshots (if appropriate):

No visual changes.

📝 Checklist

  • CI successfully passed
  • I added new mocks and corresponding unit-tests if library API was changed

@kirillzyusko kirillzyusko self-assigned this May 22, 2026
@kirillzyusko kirillzyusko added 🌐 web Web specific refactor You changed the code but it didn't affect functionality labels May 22, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📊 Package size report

Current size Target Size Difference
33523 bytes 33456 bytes 67 bytes 📈

@kirillzyusko
kirillzyusko marked this pull request as ready for review June 1, 2026 14:39
@kirillzyusko
kirillzyusko merged commit 4a8bd74 into main Jun 1, 2026
13 of 14 checks passed
@kirillzyusko
kirillzyusko deleted the refacotr/reduce-code-duplication branch June 1, 2026 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor You changed the code but it didn't affect functionality 🌐 web Web specific

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant