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

Implement SVG-based modal mode #248

Merged
merged 1 commit into from
Sep 20, 2018

Conversation

BrianSipple
Copy link
Contributor

Closes #197

@RobbieTheWagner
Copy link
Owner

screen shot 2018-09-20 at 6 27 55 am

It looks like the sizing of the opening is slightly off on some elements. I'm not sure if this is something we can control or not.

Also, is there any way we could make masks of the text in the element to avoid the box entirely? This is definitely an elegant solution for working with nested elements, but I prefer the aesthetics of just having the text highlighted, as it was before.

if (targetElement) {
positionModalOpening(targetElement, modalOverlayOpening);

this._onScreenChange = () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't understand why a private function starts empty and gets filled in here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My goal here is to update this._onScreenChange before calling addEventListener with it. I'm open to ideas on making this a bit cleaner.

@chuckcarpenter
Copy link
Contributor

Would be great to have docs on the functions as well. Make doc automation later easier.

@BrianSipple
Copy link
Contributor Author

BrianSipple commented Sep 20, 2018

@rwwagner90 It looks like the selection is occurring that way because we're currently targeting the container of the heading in the dummy app:

screen shot 2018-09-20 at 11 19 52 am

Here's what we get when we target the h4 directly:

screen shot 2018-09-20 at 11 24 04 am

@BrianSipple BrianSipple force-pushed the 4.0-modal-refactor--svg-solution branch from ff2a1f4 to 5136a3c Compare September 20, 2018 19:17
@chuckcarpenter chuckcarpenter merged commit 42b9d0d into master Sep 20, 2018
@chuckcarpenter chuckcarpenter deleted the 4.0-modal-refactor--svg-solution branch September 20, 2018 21:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants