Skip to content
This repository has been archived by the owner on Jul 30, 2018. It is now read-only.

Create Resize Observer Meta #908

Merged
merged 6 commits into from
Apr 10, 2018
Merged

Create Resize Observer Meta #908

merged 6 commits into from
Apr 10, 2018

Conversation

tomdye
Copy link
Member

@tomdye tomdye commented Apr 3, 2018

Type: feature

The following has been addressed in the PR:

Description:

Creates ResizeObserver meta which can be used to observe component level resize events.
Requires a global polyfill to be imported when used outside of chrome 64+.

Example deployed here.

Resolves #618

Copy link
Member

@dylans dylans left a comment

Choose a reason for hiding this comment

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

A couple of minor suggestions on the readme content. Really excited to see this land!

README.md Outdated

The resize observer meta uses the latest [`ResizeObserver`](https://wicg.github.io/ResizeObserver/) within your widgets. This is currently supported within `Chrome 64+` and supported via [polyfill](https://github.com/WICG/ResizeObserver/issues/3).

This allows you to observe resize events at the component level. The `meta` accepts an object of `predicate` functions which receive `ContentRect` dimensions and will be executed when a resize event has occured. The results are made available in your widgets `render` function. This is an incredibly powerful tool for creating responsive layouts.
Copy link
Member

Choose a reason for hiding this comment

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

in your widgets -> in a widget's

README.md Outdated
@@ -1176,6 +1176,35 @@ class TestWidget extends WidgetBase<WidgetProperties> {
}
```

#### Resize

The resize observer meta uses the latest [`ResizeObserver`](https://wicg.github.io/ResizeObserver/) within your widgets. This is currently supported within `Chrome 64+` and supported via [polyfill](https://github.com/WICG/ResizeObserver/issues/3).
Copy link
Member

Choose a reason for hiding this comment

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

within your widgets -> within Dojo-based widgets

Copy link
Member

Choose a reason for hiding this comment

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

This is currently supported within Chrome 64+ and supported via -> Native browser support is currently provided by Chrome 64+ and other Dojo supported browsers work via

@tomdye
Copy link
Member Author

tomdye commented Apr 5, 2018

@dylans comments addressed and example usage created and deployed here.

Copy link
Member

@dylans dylans left a comment

Choose a reason for hiding this comment

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

Changes to the readme look fine. The example doesn't seem to quite work correctly on iOS, but assuming that is resolved I consider this approved.

@tomdye tomdye requested a review from agubler April 5, 2018 14:31
@tomdye
Copy link
Member Author

tomdye commented Apr 5, 2018

@dylans i'll raise an issue on widgets relating to the split-pane responsiveness

@tomdye
Copy link
Member Author

tomdye commented Apr 5, 2018

@agubler can I get some 👁 on this please?

@tomdye tomdye merged commit d5d2ced into dojo:master Apr 10, 2018
@dylans dylans added this to the 2.0.0 milestone Apr 11, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants