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

Modular component scripts #320

Merged
merged 32 commits into from Aug 16, 2020
Merged

Modular component scripts #320

merged 32 commits into from Aug 16, 2020

Conversation

sebnitu
Copy link
Owner

@sebnitu sebnitu commented Aug 15, 2020

Problem

Current Vrembem JavaScript components are written in a single file. This can make it hard to understand their features, test and keep organized.

Solution

This PR re-writes Vrembem's JavaScript components to be more module. Each components module entry is through their index.js file where a factory function written in ES6 classes is defined. From there, all functionality is split into their own module files and shared features between modules has been moved into @vrembem/core in their own modules.

A few of the now shared @vrembem/core modules include:

Modules Exports
accessibility { setInert, setOverflowHidden, setTabindex }
focus { focusTarget, focusTrigger, FocusTrap }
getElement { getElement }
moveElement { moveElement }
transition { openTransition, closeTransition }

Ref #257

@sebnitu sebnitu marked this pull request as ready for review August 16, 2020 03:12
@sebnitu sebnitu merged commit bd7db7a into master Aug 16, 2020
@sebnitu sebnitu deleted the modular-component-scripts branch August 16, 2020 07:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant