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

Remove pubsub #40

Draft
wants to merge 7 commits into
base: develop
Choose a base branch
from
Draft

Remove pubsub #40

wants to merge 7 commits into from

Conversation

gingerchew
Copy link
Member

Removes PubSub wrapper to clean the slate and try out different design patterns.

After living with the PubSub in the beta, it didn't make sense for this small of a package, so I scrapped it in favor of making a utility logging proxy.

This will fill the gap, still allow for debugging with events on a form by form basis.

I think the logging proxy may likely be a candidate for its own package, but that may need further assessment.

also simplifies the parameters for the
updatePercent and appendVerification function

for now the old event emitter functions are commented out
its extraneous so its not necessary anyways
All that's left is to test each of the pages
TODO: create a new debug solution
debug logger uses WeakMap to track forms
and the history of the logged messages
if the debug attribute is not on the form, it is not added to
the WeakMap

A proxy is used so that whenever a message is added to a
specific log type:
log, info, error, warn
it will be saved as such too

It might be nice to add a callback argument, but if that happens,
it is time to break it out into its own package
adds new logger util to manage debugging and events

no more pubsub for handling inner function communications
instead just going to use regular old function to
function style programming

call me old fasioned

You can search for `log.` to see how it is used.

It is also a likely candidate for a separate package in its
own right
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.

Reassess design pattern: Pub/Sub doesn't make sense in the context of a web-worker or small plugin
1 participant