Skip to content

Add Modal, and HxDiv elements & Alert event fixes#88

Merged
nicko-winner merged 6 commits intomasterfrom
modal
May 15, 2020
Merged

Add Modal, and HxDiv elements & Alert event fixes#88
nicko-winner merged 6 commits intomasterfrom
modal

Conversation

@nicko-winner
Copy link
Contributor

  • Create useEventListener hook for more terse hook creation
  • Favoring shorter smaller wrappers with more ...rest passing, relying on prop types for prop documentation, Webstorm seems to handle this less explicit approach well.
  • Add actions to Alert, and update update the event names we are listening for to be correct
  • Move constants to a single file.

 - create useEventListener hook for more terse hook creation
 - Favoring shorter smaller wrappers with more ...rest passing, relying on prop types for prop documentation, Webstorm seems to handle this less explicit approach well.
 - Add actions to Alert, and update update the event names we are listening for to be correct
 - Move constants to a single file.
@netlify
Copy link

netlify bot commented May 8, 2020

Deploy preview for helix-react ready!

Built with commit 0f69a97

https://deploy-preview-88--helix-react.netlify.app

Copy link
Contributor

@michaelmang michaelmang left a comment

Choose a reason for hiding this comment

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

Looks great! Just left a few comments

import React, { useRef, useEffect} from 'react';
import React from 'react';
import PropTypes from 'prop-types';
import useEventListener from '../hooks/useEventListener';
Copy link
Contributor

Choose a reason for hiding this comment

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

Awesome idea 👍

<hx-modal
class={classNames(className, SIZES[size])}
ref={hxRef}
open={open ? true : null}
Copy link
Contributor

Choose a reason for hiding this comment

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

I was wondering if there'd be a good util function to make to communicate why this is being done.

Some ideas:

noFalse
nullifyFalse
treatFalseAsNull
supportFalse

If we can't think of a good name, it's fine to leave as is

Copy link
Contributor Author

Choose a reason for hiding this comment

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

wcBool() - short for web component boolean ?
wcBooleanAttribute() more descriptive, but kind of long.

Copy link
Contributor

Choose a reason for hiding this comment

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

I like it, a middleground for your second option would be wcBoolAttr

Copy link
Contributor

@michaelmang michaelmang left a comment

Choose a reason for hiding this comment

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

:shipit:

@nicko-winner nicko-winner merged commit 6337935 into master May 15, 2020
@nicko-winner nicko-winner deleted the modal branch May 15, 2020 18:09
@100stacks 100stacks added this to the v1.0.0-rc.0 milestone Jul 21, 2020
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.

3 participants