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 tether and replace with popper.js #1070

Closed
wants to merge 16 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 0 additions & 21 deletions components/date-picker/date-picker.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -146,24 +146,6 @@ const propTypes = {
* Custom function to parse date string into and return a `Date` object. Default function passes the input value to `Date()` and prays for a miracle. Use an external library such as [MomentJS](https://github.com/moment/moment/) if additional date parsing is needed. _Tested with snapshot testing._
*/
parser: PropTypes.func,
/**
* Absolutely positioned DOM nodes, such as a datepicker dialog, may need their own React DOM tree root. They may need their alignment "flipped" if extended beyond the window or outside the bounds of an overflow-hidden scrolling modal. This library's portal mounts are added as a child node of `body`. This prop will be triggered instead of the default `ReactDOM.mount()` when this dialog is mounted. This prop is useful for testing and simliar to a "callback ref." Two arguments,`reactElement` and `domContainerNode` are passed in. Consider the following code that bypasses the internal mount and uses an Enzyme wrapper to mount the React root tree to the DOM.
*
* ```
* <Datepicker
isOpen
portalMount={(reactElement, domContainerNode) => {
portalWrapper = Enzyme.mount(reactElement, { attachTo: domContainerNode });
}}
onOpen={() => {
expect(portalWrapper.find(`#my-heading`)).to.exist;
done();
}}
/>
```
* _Tested with Mocha framework._
*/
portalMount: PropTypes.func,
/**
* Offset of year from current year that can be selected in the year selection dropdown. (2017 - 5 = 2012). _Tested with snapshot testing._
*/
Expand Down Expand Up @@ -234,8 +216,6 @@ const defaultProps = {
* The calendar is rendered with time/dates based on local browser time of the client. All dates are in local user timezones. Another way to put it is if a user selects a date, they are selecting midnight their time on that day and not mightnight in UTC. If this component is being used in conjuction with a timezone input, you may want to convert dates provided to UTC in that timezone.
*
* This component is wrapped in a [higher order component to listen for clicks outside itself](https://github.com/kentor/react-click-outside) and thus requires use of `ReactDOM`.
*
* This component may use a portalMount (a disconnected React subtree mount) within an absolutely positioned DOM node created with [Drop](http://github.hubspot.com/drop/).
*/
class Datepicker extends React.Component {
constructor (props) {
Expand Down Expand Up @@ -397,7 +377,6 @@ class Datepicker extends React.Component {
flippable={!this.props.hasStaticAlignment}
Copy link
Contributor

Choose a reason for hiding this comment

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

This is different than it was before. Seems like it should open down
.
screen shot 2017-09-21 at 2 43 31 pm

screen shot 2017-09-21 at 2 43 25 pm

Copy link
Contributor

Choose a reason for hiding this comment

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

Datepicker position is off too.
screen shot 2017-09-21 at 2 44 40 pm

onClose={this.handleClose}
onOpen={this.handleOpen}
portalMount={this.props.portalMount}
targetElement={this.inputRef}
>
{this.getDatePicker({ labels, assistiveText })}
Expand Down
2 changes: 0 additions & 2 deletions components/lookup/lookup.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ const defaultFilter = (term, item) => {
* Lookup is an advanced inline search form. The lookup can parse through single or multi scoped datasets. The parsed dataset can be filtered by single or multi option selects.
*
* This component is wrapped in a [higher order component to listen for clicks outside itself](https://github.com/kentor/react-click-outside) and thus requires use of `ReactDOM`.
*
* This component may use a portalMount (a disconnected React subtree mount) within an absolutely positioned DOM node created with [Drop](http://github.hubspot.com/drop/).
*/
const Lookup = React.createClass({
displayName: LOOKUP,
Expand Down
3 changes: 0 additions & 3 deletions components/menu-dropdown/menu-dropdown.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,6 @@ const DropdownNubbinPositions = [
* support is needed.
*
* This component is wrapped in a [higher order component to listen for clicks outside itself](https://github.com/kentor/react-click-outside) and thus requires use of `ReactDOM`.
*
* This component may use a portalMount (a disconnected React subtree mount) within an absolutely positioned DOM node created with [Drop](http://github.hubspot.com/drop/).

*/
const MenuDropdown = React.createClass({
// ### Display Name
Expand Down
1 change: 0 additions & 1 deletion components/modal/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ const defaultProps = {
* settings.setAppElement('#mount');
* ```
*
* This component uses a portalMount (a disconnected React subtree mount) to create a modal as a child of `body`.
Copy link
Contributor

Choose a reason for hiding this comment

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

I think Modal still does this because of React Modal.

*/
class Modal extends React.Component {

Expand Down
18 changes: 0 additions & 18 deletions components/popover/popover.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -163,23 +163,6 @@ const Popover = React.createClass({
* This function is triggered when the user clicks outside the Popover or clicks the close button. You will want to define this if Popover is to be a controlled component. Most of the time you will want wnat to set `isOpen` to `false` when this is triggered unless you need to validate something.
*/
onRequestClose: PropTypes.func,
/**
* Absolutely positioned DOM nodes, such as a popover dialog, may need their own React DOM tree root. They may need their alignment "flipped" if extended beyond the window or outside the bounds of an overflow-hidden scrolling modal. This library's portal mounts are added as a child node of `body`. This prop will be triggered instead of the default `ReactDOM.mount()` when this dialog is mounted. This prop is useful for testing and simliar to a "callback ref." Two arguments,`reactElement` and `domContainerNode` are passed in. Consider the following code that bypasses the internal mount and uses an Enzyme wrapper to mount the React root tree to the DOM.
*
* ```
* <Popover
isOpen
portalMount={(reactElement, domContainerNode) => {
portalWrapper = Enzyme.mount(reactElement, { attachTo: domContainerNode });
}}
onOpen={() => {
expect(portalWrapper.find(`#my-heading`)).to.exist;
done();
}}
/>
```
*/
portalMount: PropTypes.func,
/**
* An object of CSS styles that are applied to the `slds-popover` DOM element.
*/
Expand Down Expand Up @@ -417,7 +400,6 @@ const Popover = React.createClass({
onMouseEnter={(props.openOn === 'hover') ? this.handleMouseEnter : null}
onMouseLeave={(props.openOn === 'hover') ? this.handleMouseLeave : null}
outsideClickIgnoreClass={outsideClickIgnoreClass}
portalMount={this.props.portalMount}
variant="popover"
>
<div
Expand Down
Loading