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

Incompatibility with Preact #788

Closed
dandv opened this issue Aug 25, 2018 · 9 comments
Closed

Incompatibility with Preact #788

dandv opened this issue Aug 25, 2018 · 9 comments
Labels
Milestone

Comments

@dandv
Copy link
Contributor

dandv commented Aug 25, 2018

Description

Can't get react-md to work with Preact, even with preact-compat installed. I've created an app skeleton with the "default" template, followed the react-md installation instructions and additionally loaded webfontloader (should this be mentioned on the Install page, BTW?), but I get the error below when I npm run dev:

Images/Screenshots

image

Link to a gist or code sample where the issue can be reproduced

https://github.com/dandv/preact-react-md/

I've also filed the issue in Preact's repo at preactjs/preact-compat#502.

Version

Preact 8.3.1
React-MD 1.5.0

@mlaursen mlaursen added the bug label Aug 29, 2018
@mlaursen
Copy link
Owner

Hmm, I haven't worked with preact before, but this might be because I use ReactDOM.findDOMNode to set the containers which looks like returns null instead of the element in preact.

@dandv
Copy link
Contributor Author

dandv commented Sep 6, 2018

Turns out findDOMNode returning null had recently been fixed in preact-compat 3.18.3, yet my reproduction repo still shows the issue when using 3.8.14. Any other ideas?

@billneff79
Copy link

I believe the issue is with preact itself, not with preact-compat or its findDOMNode implementation. The problem arises in that react-md's InkContainer component is a High Order Component (e.g. a proxy to another component) component with no real html root node itself (it just turns around and renders another component TransitionGroup:

<TransitionGroup
component="div"
style={style}
className={cn('md-ink-container', className)}
ref={this._setContainers}
>

For some reason that I am unaware of, preact calls the ref callback function before rendering the Higher Order Component, and thus base on the component rendered by a Higher Order Component is not set immediately when the ref callback is called

https://github.com/developit/preact/blob/8aa7ec9e87e34596d0ec292d12fb9f79135e382f/src/vdom/component.js#L127-L143

https://github.com/developit/preact/blob/62c04e0e373c24e0e2b329457b85f233753b2aa3/src/vdom/component.js#L46-L55

In this scenario, the renderMode is NO_RENDER for a Higher Order Component because it's top-level child is a function/component, not a regular DOM node.

What this all means is that HOCs in preact need to put a delay around their children's refs callbacks to make sure this.base will resolve. Here is a simple reproduction jsfiddle (look at the console output):

http://jsfiddle.net/billneff79/es9xuL65/

I don't know if this is a bug or a feature in preact, but I know you could easily work around it in react-md by modifying the ref callback in InkContainer here:

_setContainers = (group) => {

with a setTimeout wrapper, like this:

_setContainers = (group) => { 
    if (group !== null) {
      setTimeout(() => {
        this._inkContainer = findDOMNode(group);
        this._container = this._inkContainer.parentElement;

        if (this._container) {
          this._initOrRemoveEvents(this.props);
        }
      });
    }
}

@marvinhagemeister
Copy link

marvinhagemeister commented Sep 6, 2018

Disclaimer: I'm part of the preact team

@billneff79 That is an issue with how refs are applied in current preact. Our issue to track that is preactjs/preact#1177 .

@mlaursen
Copy link
Owner

Thanks for looking into this!

I'm not entirely sure if I want to apply a patch to fix this just for preact since I have mainly been focusing on just React itself and wanting to keep the scope low since I'm the only main developer. If this is an extreme blocker and can't wait until I finish the v2 branch, I can try adding the suggested setTimeout fix above. Otherwise I think I would like to hold off "fixing" this until the v2 branch where I stopped doing HOCs (and some hacky DOM node finding) for Inks and Tooltips.

@dandv
Copy link
Contributor Author

dandv commented Sep 10, 2018

If this is an extreme blocker and can't wait until I finish the v2 branch

This is as extreme as a blocker can be, since it means react-md can't be used with Preact at all :) Is there a timeline for the v2 branch?

@mlaursen
Copy link
Owner

Sorry, I actually think it's unreasonable for me to say wait for v2 branch now that I think about it.. It's probably a good few months away :( (first pass should be near the end of this month though).

So I'll look into doing the suggested fix above and your repo to see if that fixes it.

@mlaursen
Copy link
Owner

I haven't seen any problems by adding the setTimeout workaround for my existing react apps as well as the preact demo, so I'll release a patch with this change tonight

@mlaursen
Copy link
Owner

There ended up being some additional conflicts that I didn't find in my testing so I reverted the workaround until it can be resolved.

@mlaursen mlaursen reopened this Sep 24, 2018
@mlaursen mlaursen added this to the v2.0.0 milestone May 6, 2020
mlaursen added a commit that referenced this issue Jun 11, 2020
This should hopefully be the last commit required for the v2 release.
Tagging all the open v2 targeted github issues below so they auto close
once this is merged.

- Closes #826 (v2 status ticket)
- Closes #697
- Closes #854 with the new documentation for [self hosting fonts with relative paths]
- Closes #851, closes #642 with the new [ExpansionPanel] components
- Closes #850, closes #641, closes #600, closes #594, closes #554, closes #519, closes #406, closes #405, closes #404, closes #399, closes #289, closes #237 with the new [Table] components and the new [useIndeterminateChecked] hook
- Closes #848, closes #816, closes #788 since v2 no longer uses deprecated lifecycle methods and is purely function component based. (react-transition-group uses `findDOMNode` though right now)
- Closes #844 since this is available in the [@react-md/sheet package]
- Closes #842 due to re-writing the `Collapse` component
- Closes #824, closes #820, closes #771, closes #707, closes #693, closes #687, closes #654, closes #577, closes #270 due to the new [Tabs API]
- Closes #823, closes #714, closes #705 with the new [Menu components]
- Closes #822 since the new [@react-md/form package] added the new styles.
- Closes #819 with the new [SimpleListItem] and [ListItemChildren (preferred)] components
- Closes #818 with the new focus behavior
- Closes #804, closes #765, closes #743, closes #731, closes #730, closes #671, closes #607, closes #387 with the new [NativeSelect] and [Select] implementations
- Closes #802, closes #762, closes #761, closes #572, closes #486, closes #408, closes #314, closes #312 with the new [TextField] implementation
- Closes #791, closes #780, closes #425 with the new [AutoComplete] implementation
- Closes #770 with the new [FixedDialog] component
- Closes #721, closes #640, closes #407 with the new [Grid] and [GridList] implementations
- Closes #719 with the new [Radio] component
- Closes #706, closes #683 with the new [Button] component
- Closes #695 with the new [Theme API]
- Closes #691 with the new [FileInput] component
- Closes #689 with the new [Tabs API] and [Menu components]
- Closes #674, closes #413 with the new [@react-md/alert package]
- Closes #658 with the new [Menu components] and [@react-md/tree package]
- Closes #582 with the new [Chip] component
- Closes #497, closes #455, closes #419 with the new [@react-md/layout package]
- Closes #496 with the new [Switch] component
- Closes #239, closes #157 with the new [Tooltip] component

[self hosting fonts with relative paths]: https://react-md.dev/guides/advanced-installation#using-relative-paths-for-fonts
[useIndeterminateChecked hook]: https://react-md.dev/packages/form/demos#indeterminate-checkboxes-title
[@react-md/alert package]: https://react-md.dev/packages/alert/demos
[@react-md/layout package]: https://react-md.dev/packages/layout/demos
[@react-md/form package]: https://react-md.dev/packages/form/demos
[@react-md/sheet package]: https://react-md.dev/packages/sheet/demos
[@react-md/tree package]: https://react-md.dev/packages/tree/demos
[Theme API]: https://react-md.dev/guides/customizing-your-theme
[Tabs api]: https://react-md.dev/packages/tabs/demos
[Button]: https://react-md.dev/packages/button/demos
[Chip]: https://react-md.dev/packages/chip/demos
[ExpansionPanel]: https://react-md.dev/packages/button/demos
[menu components]: https://react-md.dev/packages/menu/demos
[FileInput]: https://react-md.dev/packages/form/demos#file-input-example-title
[Switch]: https://react-md.dev/packages/form/demos#switch-examples-title
[NativeSelect]: https://react-md.dev/packages/form/demos#native-select-example-title
[Select]: https://react-md.dev/packages/form/demos#select-example-title
[Tooltip]: https://react-md.dev/packages/tooltip/demos
[AutoComplete]: https://react-md.dev/packages/autocomplete/demos
[FixedDialog]: https://react-md.dev/packages/dialog/demos#fixed-dialog-example-title
[TextField]: https://react-md.dev/packages/form/demos#text-field-example-title
[Radio]: https://react-md.dev/packages/form/demos#checkbox-and-radio-examples-title
[Grid]: https://react-md.dev/packages/utils/demos#material-grid-example-title
[GridList]: https://react-md.dev/packages/utils/demos#simple-grid-list-example-title
[SimpleListItem]: https://github.com/mlaursen/react-md/blob/1a4161976fbb95233284c507c10063602d1cc682/packages/list/src/SimpleListItem.tsx
[ListItemChildren]: https://github.com/mlaursen/react-md/blob/1a4161976fbb95233284c507c10063602d1cc682/packages/list/src/ListItemChildren.tsx
@mlaursen mlaursen mentioned this issue Jun 11, 2020
mlaursen added a commit that referenced this issue Jun 11, 2020
This should hopefully be the last commit required for the v2 release.
Tagging all the open v2 targeted github issues below so they auto close once this is merged.

- Closes #826 (v2 status ticket)
- Closes #697
- Closes #854 with the new documentation for [self hosting fonts with relative paths]
- Closes #851, closes #642 with the new [ExpansionPanel] components
- Closes #850, closes #641, closes #600, closes #594, closes #554, closes #519, closes #406, closes #405, closes #404, closes #399, closes #289, closes #237 with the new [Table] components and the new [useIndeterminateChecked] hook
- Closes #848, closes #816, closes #788 since v2 no longer uses deprecated lifecycle methods and is purely function component based. (react-transition-group uses `findDOMNode` though right now)
- Closes #844 since this is available in the [@react-md/sheet package]
- Closes #842 due to re-writing the `Collapse` component
- Closes #824, closes #820, closes #771, closes #707, closes #693, closes #687, closes #654, closes #577, closes #270 due to the new [Tabs API]
- Closes #823, closes #714, closes #705 with the new [Menu components]
- Closes #822 since the new [@react-md/form package] added the new styles.
- Closes #819 with the new [SimpleListItem] and [ListItemChildren (preferred)] components
- Closes #818 with the new focus behavior
- Closes #804, closes #765, closes #743, closes #731, closes #730, closes #671, closes #607, closes #387 with the new [NativeSelect] and [Select] implementations
- Closes #802, closes #762, closes #761, closes #572, closes #486, closes #408, closes #314, closes #312 with the new [TextField] implementation
- Closes #791, closes #780, closes #425, closes #633 with the new [AutoComplete] implementation
- Closes #770 with the new [FixedDialog] component
- Closes #721, closes #640, closes #407 with the new [Grid] and [GridList] implementations
- Closes #719 with the new [Radio] component
- Closes #706, closes #683 with the new [Button] component
- Closes #695 with the new [Theme API]
- Closes #691 with the new [FileInput] component
- Closes #689 with the new [Tabs API] and [Menu components]
- Closes #674, closes #413 with the new [@react-md/alert package]
- Closes #658 with the new [Menu components] and [@react-md/tree package]
- Closes #582 with the new [Chip] component
- Closes #497, closes #455, closes #419 with the new [@react-md/layout package]
- Closes #496 with the new [Switch] component
- Closes #239, closes #157 with the new [Tooltip] component

[self hosting fonts with relative paths]: https://react-md.dev/guides/advanced-installation#using-relative-paths-for-fonts
[useIndeterminateChecked hook]: https://react-md.dev/packages/form/demos#indeterminate-checkboxes-title
[@react-md/alert package]: https://react-md.dev/packages/alert/demos
[@react-md/layout package]: https://react-md.dev/packages/layout/demos
[@react-md/form package]: https://react-md.dev/packages/form/demos
[@react-md/sheet package]: https://react-md.dev/packages/sheet/demos
[@react-md/tree package]: https://react-md.dev/packages/tree/demos
[Theme API]: https://react-md.dev/guides/customizing-your-theme
[Tabs api]: https://react-md.dev/packages/tabs/demos
[Button]: https://react-md.dev/packages/button/demos
[Chip]: https://react-md.dev/packages/chip/demos
[ExpansionPanel]: https://react-md.dev/packages/button/demos
[menu components]: https://react-md.dev/packages/menu/demos
[FileInput]: https://react-md.dev/packages/form/demos#file-input-example-title
[Switch]: https://react-md.dev/packages/form/demos#switch-examples-title
[NativeSelect]: https://react-md.dev/packages/form/demos#native-select-example-title
[Select]: https://react-md.dev/packages/form/demos#select-example-title
[Tooltip]: https://react-md.dev/packages/tooltip/demos
[Table]: https://react-md.dev/packages/table/demos
[AutoComplete]: https://react-md.dev/packages/autocomplete/demos
[FixedDialog]: https://react-md.dev/packages/dialog/demos#fixed-dialog-example-title
[TextField]: https://react-md.dev/packages/form/demos#text-field-example-title
[Radio]: https://react-md.dev/packages/form/demos#checkbox-and-radio-examples-title
[Grid]: https://react-md.dev/packages/utils/demos#material-grid-example-title
[GridList]: https://react-md.dev/packages/utils/demos#simple-grid-list-example-title
[SimpleListItem]: https://github.com/mlaursen/react-md/blob/1a4161976fbb95233284c507c10063602d1cc682/packages/list/src/SimpleListItem.tsx
[ListItemChildren (preferred)]: https://github.com/mlaursen/react-md/blob/1a4161976fbb95233284c507c10063602d1cc682/packages/list/src/ListItemChildren.tsx
[useIndeterminateChecked]: https://github.com/mlaursen/react-md/blob/1a4161976fbb95233284c507c10063602d1cc682/packages/form/src/useIndeterminateChecked.ts
pull bot pushed a commit to JCofman/react-md that referenced this issue Jun 15, 2020
This should hopefully be the last commit required for the v2 release.
Tagging all the open v2 targeted github issues below so they auto close once this is merged.

- Closes mlaursen#826 (v2 status ticket)
- Closes mlaursen#697
- Closes mlaursen#854 with the new documentation for [self hosting fonts with relative paths]
- Closes mlaursen#851, closes mlaursen#642 with the new [ExpansionPanel] components
- Closes mlaursen#850, closes mlaursen#641, closes mlaursen#600, closes mlaursen#594, closes mlaursen#554, closes mlaursen#519, closes mlaursen#406, closes mlaursen#405, closes mlaursen#404, closes mlaursen#399, closes #289, closes #237 with the new [Table] components and the new [useIndeterminateChecked] hook
- Closes mlaursen#848, closes mlaursen#816, closes mlaursen#788 since v2 no longer uses deprecated lifecycle methods and is purely function component based. (react-transition-group uses `findDOMNode` though right now)
- Closes mlaursen#844 since this is available in the [@react-md/sheet package]
- Closes mlaursen#842 due to re-writing the `Collapse` component
- Closes mlaursen#824, closes mlaursen#820, closes mlaursen#771, closes mlaursen#707, closes mlaursen#693, closes mlaursen#687, closes mlaursen#654, closes mlaursen#577, closes #270 due to the new [Tabs API]
- Closes mlaursen#823, closes mlaursen#714, closes mlaursen#705 with the new [Menu components]
- Closes mlaursen#822 since the new [@react-md/form package] added the new styles.
- Closes mlaursen#819 with the new [SimpleListItem] and [ListItemChildren (preferred)] components
- Closes mlaursen#818 with the new focus behavior
- Closes mlaursen#804, closes mlaursen#765, closes mlaursen#743, closes mlaursen#731, closes mlaursen#730, closes mlaursen#671, closes mlaursen#607, closes mlaursen#387 with the new [NativeSelect] and [Select] implementations
- Closes mlaursen#802, closes mlaursen#762, closes mlaursen#761, closes mlaursen#572, closes mlaursen#486, closes mlaursen#408, closes mlaursen#314, closes mlaursen#312 with the new [TextField] implementation
- Closes mlaursen#791, closes mlaursen#780, closes mlaursen#425, closes mlaursen#633 with the new [AutoComplete] implementation
- Closes mlaursen#770 with the new [FixedDialog] component
- Closes mlaursen#721, closes mlaursen#640, closes mlaursen#407 with the new [Grid] and [GridList] implementations
- Closes mlaursen#719 with the new [Radio] component
- Closes mlaursen#706, closes mlaursen#683 with the new [Button] component
- Closes mlaursen#695 with the new [Theme API]
- Closes mlaursen#691 with the new [FileInput] component
- Closes mlaursen#689 with the new [Tabs API] and [Menu components]
- Closes mlaursen#674, closes mlaursen#413 with the new [@react-md/alert package]
- Closes mlaursen#658 with the new [Menu components] and [@react-md/tree package]
- Closes mlaursen#582 with the new [Chip] component
- Closes mlaursen#497, closes mlaursen#455, closes mlaursen#419 with the new [@react-md/layout package]
- Closes mlaursen#496 with the new [Switch] component
- Closes #239, closes #157 with the new [Tooltip] component

[self hosting fonts with relative paths]: https://react-md.dev/guides/advanced-installation#using-relative-paths-for-fonts
[useIndeterminateChecked hook]: https://react-md.dev/packages/form/demos#indeterminate-checkboxes-title
[@react-md/alert package]: https://react-md.dev/packages/alert/demos
[@react-md/layout package]: https://react-md.dev/packages/layout/demos
[@react-md/form package]: https://react-md.dev/packages/form/demos
[@react-md/sheet package]: https://react-md.dev/packages/sheet/demos
[@react-md/tree package]: https://react-md.dev/packages/tree/demos
[Theme API]: https://react-md.dev/guides/customizing-your-theme
[Tabs api]: https://react-md.dev/packages/tabs/demos
[Button]: https://react-md.dev/packages/button/demos
[Chip]: https://react-md.dev/packages/chip/demos
[ExpansionPanel]: https://react-md.dev/packages/button/demos
[menu components]: https://react-md.dev/packages/menu/demos
[FileInput]: https://react-md.dev/packages/form/demos#file-input-example-title
[Switch]: https://react-md.dev/packages/form/demos#switch-examples-title
[NativeSelect]: https://react-md.dev/packages/form/demos#native-select-example-title
[Select]: https://react-md.dev/packages/form/demos#select-example-title
[Tooltip]: https://react-md.dev/packages/tooltip/demos
[Table]: https://react-md.dev/packages/table/demos
[AutoComplete]: https://react-md.dev/packages/autocomplete/demos
[FixedDialog]: https://react-md.dev/packages/dialog/demos#fixed-dialog-example-title
[TextField]: https://react-md.dev/packages/form/demos#text-field-example-title
[Radio]: https://react-md.dev/packages/form/demos#checkbox-and-radio-examples-title
[Grid]: https://react-md.dev/packages/utils/demos#material-grid-example-title
[GridList]: https://react-md.dev/packages/utils/demos#simple-grid-list-example-title
[SimpleListItem]: https://github.com/mlaursen/react-md/blob/1a4161976fbb95233284c507c10063602d1cc682/packages/list/src/SimpleListItem.tsx
[ListItemChildren (preferred)]: https://github.com/mlaursen/react-md/blob/1a4161976fbb95233284c507c10063602d1cc682/packages/list/src/ListItemChildren.tsx
[useIndeterminateChecked]: https://github.com/mlaursen/react-md/blob/1a4161976fbb95233284c507c10063602d1cc682/packages/form/src/useIndeterminateChecked.ts
mlaursen added a commit that referenced this issue Jun 15, 2020
This should hopefully be the last commit required for the v2 release.
Tagging all the open v2 targeted github issues below so they auto close once this is merged.

- Closes #826 (v2 status ticket)
- Closes #697
- Closes #854 with the new documentation for [self hosting fonts with relative paths]
- Closes #851, closes #642 with the new [ExpansionPanel] components
- Closes #850, closes #641, closes #600, closes #594, closes #554, closes #519, closes #406, closes #405, closes #404, closes #399, closes #289, closes #237 with the new [Table] components and the new [useIndeterminateChecked] hook
- Closes #848, closes #816, closes #788 since v2 no longer uses deprecated lifecycle methods and is purely function component based. (react-transition-group uses `findDOMNode` though right now)
- Closes #844 since this is available in the [@react-md/sheet package]
- Closes #842 due to re-writing the `Collapse` component
- Closes #824, closes #820, closes #771, closes #707, closes #693, closes #687, closes #654, closes #577, closes #270 due to the new [Tabs API]
- Closes #823, closes #714, closes #705 with the new [Menu components]
- Closes #822 since the new [@react-md/form package] added the new styles.
- Closes #819 with the new [SimpleListItem] and [ListItemChildren (preferred)] components
- Closes #818 with the new focus behavior
- Closes #804, closes #765, closes #743, closes #731, closes #730, closes #671, closes #607, closes #387 with the new [NativeSelect] and [Select] implementations
- Closes #802, closes #762, closes #761, closes #572, closes #486, closes #408, closes #314, closes #312 with the new [TextField] implementation
- Closes #791, closes #780, closes #425, closes #633 with the new [AutoComplete] implementation
- Closes #770 with the new [FixedDialog] component
- Closes #721, closes #640, closes #407 with the new [Grid] and [GridList] implementations
- Closes #719 with the new [Radio] component
- Closes #706, closes #683 with the new [Button] component
- Closes #695 with the new [Theme API]
- Closes #691 with the new [FileInput] component
- Closes #689 with the new [Tabs API] and [Menu components]
- Closes #674, closes #413 with the new [@react-md/alert package]
- Closes #658 with the new [Menu components] and [@react-md/tree package]
- Closes #582 with the new [Chip] component
- Closes #497, closes #455, closes #419 with the new [@react-md/layout package]
- Closes #496 with the new [Switch] component
- Closes #239, closes #157 with the new [Tooltip] component

[self hosting fonts with relative paths]: https://react-md.dev/guides/advanced-installation#using-relative-paths-for-fonts
[useIndeterminateChecked hook]: https://react-md.dev/packages/form/demos#indeterminate-checkboxes-title
[@react-md/alert package]: https://react-md.dev/packages/alert/demos
[@react-md/layout package]: https://react-md.dev/packages/layout/demos
[@react-md/form package]: https://react-md.dev/packages/form/demos
[@react-md/sheet package]: https://react-md.dev/packages/sheet/demos
[@react-md/tree package]: https://react-md.dev/packages/tree/demos
[Theme API]: https://react-md.dev/guides/customizing-your-theme
[Tabs api]: https://react-md.dev/packages/tabs/demos
[Button]: https://react-md.dev/packages/button/demos
[Chip]: https://react-md.dev/packages/chip/demos
[ExpansionPanel]: https://react-md.dev/packages/button/demos
[menu components]: https://react-md.dev/packages/menu/demos
[FileInput]: https://react-md.dev/packages/form/demos#file-input-example-title
[Switch]: https://react-md.dev/packages/form/demos#switch-examples-title
[NativeSelect]: https://react-md.dev/packages/form/demos#native-select-example-title
[Select]: https://react-md.dev/packages/form/demos#select-example-title
[Tooltip]: https://react-md.dev/packages/tooltip/demos
[Table]: https://react-md.dev/packages/table/demos
[AutoComplete]: https://react-md.dev/packages/autocomplete/demos
[FixedDialog]: https://react-md.dev/packages/dialog/demos#fixed-dialog-example-title
[TextField]: https://react-md.dev/packages/form/demos#text-field-example-title
[Radio]: https://react-md.dev/packages/form/demos#checkbox-and-radio-examples-title
[Grid]: https://react-md.dev/packages/utils/demos#material-grid-example-title
[GridList]: https://react-md.dev/packages/utils/demos#simple-grid-list-example-title
[SimpleListItem]: https://github.com/mlaursen/react-md/blob/1a4161976fbb95233284c507c10063602d1cc682/packages/list/src/SimpleListItem.tsx
[ListItemChildren (preferred)]: https://github.com/mlaursen/react-md/blob/1a4161976fbb95233284c507c10063602d1cc682/packages/list/src/ListItemChildren.tsx
[useIndeterminateChecked]: https://github.com/mlaursen/react-md/blob/1a4161976fbb95233284c507c10063602d1cc682/packages/form/src/useIndeterminateChecked.ts
pull bot pushed a commit to JCofman/react-md that referenced this issue Jun 15, 2020
* chore(docs): Started initial v2 Release Notes/Blog

* chore(docs): Updated documentation for {{RMD_VERSION}}

This should hopefully be the last commit required for the v2 release.
Tagging all the open v2 targeted github issues below so they auto close once this is merged.

- Closes mlaursen#826 (v2 status ticket)
- Closes mlaursen#697
- Closes mlaursen#854 with the new documentation for [self hosting fonts with relative paths]
- Closes mlaursen#851, closes mlaursen#642 with the new [ExpansionPanel] components
- Closes mlaursen#850, closes mlaursen#641, closes mlaursen#600, closes mlaursen#594, closes mlaursen#554, closes mlaursen#519, closes mlaursen#406, closes mlaursen#405, closes mlaursen#404, closes mlaursen#399, closes #289, closes #237 with the new [Table] components and the new [useIndeterminateChecked] hook
- Closes mlaursen#848, closes mlaursen#816, closes mlaursen#788 since v2 no longer uses deprecated lifecycle methods and is purely function component based. (react-transition-group uses `findDOMNode` though right now)
- Closes mlaursen#844 since this is available in the [@react-md/sheet package]
- Closes mlaursen#842 due to re-writing the `Collapse` component
- Closes mlaursen#824, closes mlaursen#820, closes mlaursen#771, closes mlaursen#707, closes mlaursen#693, closes mlaursen#687, closes mlaursen#654, closes mlaursen#577, closes #270 due to the new [Tabs API]
- Closes mlaursen#823, closes mlaursen#714, closes mlaursen#705 with the new [Menu components]
- Closes mlaursen#822 since the new [@react-md/form package] added the new styles.
- Closes mlaursen#819 with the new [SimpleListItem] and [ListItemChildren (preferred)] components
- Closes mlaursen#818 with the new focus behavior
- Closes mlaursen#804, closes mlaursen#765, closes mlaursen#743, closes mlaursen#731, closes mlaursen#730, closes mlaursen#671, closes mlaursen#607, closes mlaursen#387 with the new [NativeSelect] and [Select] implementations
- Closes mlaursen#802, closes mlaursen#762, closes mlaursen#761, closes mlaursen#572, closes mlaursen#486, closes mlaursen#408, closes mlaursen#314, closes mlaursen#312 with the new [TextField] implementation
- Closes mlaursen#791, closes mlaursen#780, closes mlaursen#425, closes mlaursen#633 with the new [AutoComplete] implementation
- Closes mlaursen#770 with the new [FixedDialog] component
- Closes mlaursen#721, closes mlaursen#640, closes mlaursen#407 with the new [Grid] and [GridList] implementations
- Closes mlaursen#719 with the new [Radio] component
- Closes mlaursen#706, closes mlaursen#683 with the new [Button] component
- Closes mlaursen#695 with the new [Theme API]
- Closes mlaursen#691 with the new [FileInput] component
- Closes mlaursen#689 with the new [Tabs API] and [Menu components]
- Closes mlaursen#674, closes mlaursen#413 with the new [@react-md/alert package]
- Closes mlaursen#658 with the new [Menu components] and [@react-md/tree package]
- Closes mlaursen#582 with the new [Chip] component
- Closes mlaursen#497, closes mlaursen#455, closes mlaursen#419 with the new [@react-md/layout package]
- Closes mlaursen#496 with the new [Switch] component
- Closes #239, closes #157 with the new [Tooltip] component

[self hosting fonts with relative paths]: https://react-md.dev/guides/advanced-installation#using-relative-paths-for-fonts
[useIndeterminateChecked hook]: https://react-md.dev/packages/form/demos#indeterminate-checkboxes-title
[@react-md/alert package]: https://react-md.dev/packages/alert/demos
[@react-md/layout package]: https://react-md.dev/packages/layout/demos
[@react-md/form package]: https://react-md.dev/packages/form/demos
[@react-md/sheet package]: https://react-md.dev/packages/sheet/demos
[@react-md/tree package]: https://react-md.dev/packages/tree/demos
[Theme API]: https://react-md.dev/guides/customizing-your-theme
[Tabs api]: https://react-md.dev/packages/tabs/demos
[Button]: https://react-md.dev/packages/button/demos
[Chip]: https://react-md.dev/packages/chip/demos
[ExpansionPanel]: https://react-md.dev/packages/button/demos
[menu components]: https://react-md.dev/packages/menu/demos
[FileInput]: https://react-md.dev/packages/form/demos#file-input-example-title
[Switch]: https://react-md.dev/packages/form/demos#switch-examples-title
[NativeSelect]: https://react-md.dev/packages/form/demos#native-select-example-title
[Select]: https://react-md.dev/packages/form/demos#select-example-title
[Tooltip]: https://react-md.dev/packages/tooltip/demos
[Table]: https://react-md.dev/packages/table/demos
[AutoComplete]: https://react-md.dev/packages/autocomplete/demos
[FixedDialog]: https://react-md.dev/packages/dialog/demos#fixed-dialog-example-title
[TextField]: https://react-md.dev/packages/form/demos#text-field-example-title
[Radio]: https://react-md.dev/packages/form/demos#checkbox-and-radio-examples-title
[Grid]: https://react-md.dev/packages/utils/demos#material-grid-example-title
[GridList]: https://react-md.dev/packages/utils/demos#simple-grid-list-example-title
[SimpleListItem]: https://github.com/mlaursen/react-md/blob/1a4161976fbb95233284c507c10063602d1cc682/packages/list/src/SimpleListItem.tsx
[ListItemChildren (preferred)]: https://github.com/mlaursen/react-md/blob/1a4161976fbb95233284c507c10063602d1cc682/packages/list/src/ListItemChildren.tsx
[useIndeterminateChecked]: https://github.com/mlaursen/react-md/blob/1a4161976fbb95233284c507c10063602d1cc682/packages/form/src/useIndeterminateChecked.ts

* chore: Updates to look better in npm

Created a new `yarn dev-utils rmd-readme` script that will copy the root
README.md to the `react-md` folder and insert some additional
information into the README. This is just to help add documentation if
this package is found through npm instead of GitHub or other sources.

Also updated all the package.json files to link to their specific
documentation page as the `"homepage"` field.

* chore(docs): Removed API Routes

I haven't figured out how to generate the API docs yet and it's better
to remove these pages so it isn't included in search or lead to
confusion since there's nothing there.

Hopefully I'll be able to figure out typedoc, react-docgen-typescript,
or react-docgen (with the new typescript support) soon so it can be
added back.

* skip ci: Fixed travis badge to point to master

* fix(form): Fixed the Select component to be submitted with forms

Added the <input type=hidden /> back to the Select component so it can
be submitted in forms. Also changed a few of the ids.

* chore: Adding github label workflow

* chore: Trying automatic labelling workflow
pull bot pushed a commit to JCofman/react-md that referenced this issue Jun 15, 2020
* chore(docs): Started initial v2 Release Notes/Blog

* chore(docs): Updated documentation for {{RMD_VERSION}}

This should hopefully be the last commit required for the v2 release.
Tagging all the open v2 targeted github issues below so they auto close once this is merged.

- Closes mlaursen#826 (v2 status ticket)
- Closes mlaursen#697
- Closes mlaursen#854 with the new documentation for [self hosting fonts with relative paths]
- Closes mlaursen#851, closes mlaursen#642 with the new [ExpansionPanel] components
- Closes mlaursen#850, closes mlaursen#641, closes mlaursen#600, closes mlaursen#594, closes mlaursen#554, closes mlaursen#519, closes mlaursen#406, closes mlaursen#405, closes mlaursen#404, closes mlaursen#399, closes #289, closes #237 with the new [Table] components and the new [useIndeterminateChecked] hook
- Closes mlaursen#848, closes mlaursen#816, closes mlaursen#788 since v2 no longer uses deprecated lifecycle methods and is purely function component based. (react-transition-group uses `findDOMNode` though right now)
- Closes mlaursen#844 since this is available in the [@react-md/sheet package]
- Closes mlaursen#842 due to re-writing the `Collapse` component
- Closes mlaursen#824, closes mlaursen#820, closes mlaursen#771, closes mlaursen#707, closes mlaursen#693, closes mlaursen#687, closes mlaursen#654, closes mlaursen#577, closes #270 due to the new [Tabs API]
- Closes mlaursen#823, closes mlaursen#714, closes mlaursen#705 with the new [Menu components]
- Closes mlaursen#822 since the new [@react-md/form package] added the new styles.
- Closes mlaursen#819 with the new [SimpleListItem] and [ListItemChildren (preferred)] components
- Closes mlaursen#818 with the new focus behavior
- Closes mlaursen#804, closes mlaursen#765, closes mlaursen#743, closes mlaursen#731, closes mlaursen#730, closes mlaursen#671, closes mlaursen#607, closes mlaursen#387 with the new [NativeSelect] and [Select] implementations
- Closes mlaursen#802, closes mlaursen#762, closes mlaursen#761, closes mlaursen#572, closes mlaursen#486, closes mlaursen#408, closes mlaursen#314, closes mlaursen#312 with the new [TextField] implementation
- Closes mlaursen#791, closes mlaursen#780, closes mlaursen#425, closes mlaursen#633 with the new [AutoComplete] implementation
- Closes mlaursen#770 with the new [FixedDialog] component
- Closes mlaursen#721, closes mlaursen#640, closes mlaursen#407 with the new [Grid] and [GridList] implementations
- Closes mlaursen#719 with the new [Radio] component
- Closes mlaursen#706, closes mlaursen#683 with the new [Button] component
- Closes mlaursen#695 with the new [Theme API]
- Closes mlaursen#691 with the new [FileInput] component
- Closes mlaursen#689 with the new [Tabs API] and [Menu components]
- Closes mlaursen#674, closes mlaursen#413 with the new [@react-md/alert package]
- Closes mlaursen#658 with the new [Menu components] and [@react-md/tree package]
- Closes mlaursen#582 with the new [Chip] component
- Closes mlaursen#497, closes mlaursen#455, closes mlaursen#419 with the new [@react-md/layout package]
- Closes mlaursen#496 with the new [Switch] component
- Closes #239, closes #157 with the new [Tooltip] component

[self hosting fonts with relative paths]: https://react-md.dev/guides/advanced-installation#using-relative-paths-for-fonts
[useIndeterminateChecked hook]: https://react-md.dev/packages/form/demos#indeterminate-checkboxes-title
[@react-md/alert package]: https://react-md.dev/packages/alert/demos
[@react-md/layout package]: https://react-md.dev/packages/layout/demos
[@react-md/form package]: https://react-md.dev/packages/form/demos
[@react-md/sheet package]: https://react-md.dev/packages/sheet/demos
[@react-md/tree package]: https://react-md.dev/packages/tree/demos
[Theme API]: https://react-md.dev/guides/customizing-your-theme
[Tabs api]: https://react-md.dev/packages/tabs/demos
[Button]: https://react-md.dev/packages/button/demos
[Chip]: https://react-md.dev/packages/chip/demos
[ExpansionPanel]: https://react-md.dev/packages/button/demos
[menu components]: https://react-md.dev/packages/menu/demos
[FileInput]: https://react-md.dev/packages/form/demos#file-input-example-title
[Switch]: https://react-md.dev/packages/form/demos#switch-examples-title
[NativeSelect]: https://react-md.dev/packages/form/demos#native-select-example-title
[Select]: https://react-md.dev/packages/form/demos#select-example-title
[Tooltip]: https://react-md.dev/packages/tooltip/demos
[Table]: https://react-md.dev/packages/table/demos
[AutoComplete]: https://react-md.dev/packages/autocomplete/demos
[FixedDialog]: https://react-md.dev/packages/dialog/demos#fixed-dialog-example-title
[TextField]: https://react-md.dev/packages/form/demos#text-field-example-title
[Radio]: https://react-md.dev/packages/form/demos#checkbox-and-radio-examples-title
[Grid]: https://react-md.dev/packages/utils/demos#material-grid-example-title
[GridList]: https://react-md.dev/packages/utils/demos#simple-grid-list-example-title
[SimpleListItem]: https://github.com/mlaursen/react-md/blob/1a4161976fbb95233284c507c10063602d1cc682/packages/list/src/SimpleListItem.tsx
[ListItemChildren (preferred)]: https://github.com/mlaursen/react-md/blob/1a4161976fbb95233284c507c10063602d1cc682/packages/list/src/ListItemChildren.tsx
[useIndeterminateChecked]: https://github.com/mlaursen/react-md/blob/1a4161976fbb95233284c507c10063602d1cc682/packages/form/src/useIndeterminateChecked.ts

* chore: Updates to look better in npm

Created a new `yarn dev-utils rmd-readme` script that will copy the root
README.md to the `react-md` folder and insert some additional
information into the README. This is just to help add documentation if
this package is found through npm instead of GitHub or other sources.

Also updated all the package.json files to link to their specific
documentation page as the `"homepage"` field.

* chore(docs): Removed API Routes

I haven't figured out how to generate the API docs yet and it's better
to remove these pages so it isn't included in search or lead to
confusion since there's nothing there.

Hopefully I'll be able to figure out typedoc, react-docgen-typescript,
or react-docgen (with the new typescript support) soon so it can be
added back.
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 a pull request may close this issue.

4 participants