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

frontend: Refactor confetti and Yace modules #236

Merged
merged 4 commits into from
Jan 9, 2024
Merged

frontend: Refactor confetti and Yace modules #236

merged 4 commits into from
Jan 9, 2024

Conversation

juliaogris
Copy link
Member

@juliaogris juliaogris commented Jan 7, 2024

Rename YaceEditor to Editor as it is increasingly becoming customized and
tailored to evy. Pull out confetti Easter egg into its own module and remove
dependency on separate CSS file. In last commit re-work confetti Easter egg
for readability.

Related evylang/todo#41

We are leaving the reference to the original YaceEditor in there but we have
modified the original source a fair bit and the intention is for this file to
become _the_ evy editor, so rename to `Editor`.
Move confetti easter egg to its own module - this is only a code moving
commit, we will clean-up the code in a follow-up commit.
Make confetti.js self-contained by removing the dependency on a separate CSS
file.  This is done by embedding the CSS in the JS file as style object.
Refactor confetti module for readability and finding my JS style. The JS used
in Evy is optimized for readability for Go developers so we'll take it easy
on the functional idiom - arrow functions, filter/map/reduce, etc.

There are also a couple of minor implementation fixes, such as improved side
offset for confetti, confetti size depending on viewport height, rather than
viewport with as we use in Evy. Options to configure confetti colors, print
and count.
Copy link
Member

@camh- camh- left a comment

Choose a reason for hiding this comment

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

🫛 This all reads pretty well I think. Perhaps the JS folks may object if some parts are not idiomatic, but I think it is idiomatic JS to find yet another way to do the same thing anyway so all good!

@juliaogris juliaogris merged commit 2997529 into main Jan 9, 2024
3 checks passed
@juliaogris juliaogris deleted the js-split branch January 9, 2024 08:21
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.

2 participants