Skip to content

Commit

Permalink
"<view name=" => "<view is="
Browse files Browse the repository at this point in the history
  • Loading branch information
nateps committed May 11, 2016
1 parent 5da44cb commit a149e4a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions docs/guides/components.md
Expand Up @@ -92,13 +92,13 @@ module.exports = class Tabs
```
<Body:>
<view
name="todos-new"
is="todos-new"
on-submit="list.add()"
label="Add todo"
autofocus>
</view>
<view
name="todos-list"
is="todos-list"
as="list"
items="{{_page.items}}">
</view>
Expand Down
14 changes: 7 additions & 7 deletions lib/App.server.js
Expand Up @@ -45,18 +45,18 @@ App.prototype._init = function() {
this.views.register('Page',
'<!DOCTYPE html>' +
'<meta charset="utf-8">' +
'<view name="{{$render.prefix}}TitleElement"></view>' +
'<view name="{{$render.prefix}}Styles"></view>' +
'<view name="{{$render.prefix}}Head"></view>' +
'<view name="{{$render.prefix}}BodyElement"></view>',
'<view is="{{$render.prefix}}TitleElement"></view>' +
'<view is="{{$render.prefix}}Styles"></view>' +
'<view is="{{$render.prefix}}Head"></view>' +
'<view is="{{$render.prefix}}BodyElement"></view>',
{serverOnly: true}
);
this.views.register('TitleElement',
'<title><view name="{{$render.prefix}}Title"></view></title>'
'<title><view is="{{$render.prefix}}Title"></view></title>'
);
this.views.register('BodyElement',
'<body class="{{$bodyClass($render.ns)}}">' +
'<view name="{{$render.prefix}}Body"></view>'
'<view is="{{$render.prefix}}Body"></view>'
);
this.views.register('Title', 'Derby App');
this.views.register('Styles', '', {serverOnly: true});
Expand Down Expand Up @@ -206,7 +206,7 @@ App.prototype.loadViews = function(filename, namespace) {
App.prototype.loadStyles = function(filename, options) {
this._loadStyles(filename, options);
var stylesView = this.views.find('Styles');
stylesView.source += '<view name="' + filename + '"></view>';
stylesView.source += '<view is="' + filename + '"></view>';
// Make chainable
return this;
};
Expand Down

5 comments on commit a149e4a

@curran
Copy link

@curran curran commented on a149e4a May 11, 2016

Choose a reason for hiding this comment

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

This looks like a breaking change and should definitely be mentioned in release notes. #287

@nateps
Copy link
Contributor Author

@nateps nateps commented on a149e4a May 11, 2016

Choose a reason for hiding this comment

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

This particular commit is not breaking, because <view name= is currently an alias for <view is=. This is just updating derby to use the preferred syntax.

It was originally called "name", and I changed the preferred syntax to "is" some time ago. I plan to hard deprecate "name" so that it can be used as an attribute with the 1.0 release most likely.

@curran
Copy link

@curran curran commented on a149e4a May 11, 2016

Choose a reason for hiding this comment

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

Ah wonderful, thank you so much for the clarification. Reading my earlier comment I realize it sounds quite terse, sorry about that. Looking forward to 1.0!

@nateps
Copy link
Contributor Author

@nateps nateps commented on a149e4a May 11, 2016 via email

Choose a reason for hiding this comment

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

@curran
Copy link

@curran curran commented on a149e4a May 12, 2016

Choose a reason for hiding this comment

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

👍

Please sign in to comment.