Skip to content

Use co-located components instead of pods #444

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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
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
32 changes: 27 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Empty file removed vertical-collection/addon/.gitkeep
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ import { empty, readOnly } from '@ember/object/computed';
import Component from '@ember/component';
import { get, computed } from '@ember/object';
import { run } from '@ember/runloop';
import layout from './template';
import { ViewportContainer } from '../../-private';
import { ViewportContainer } from '../-private';

import { scheduler, Token } from 'ember-raf-scheduler';

Expand Down Expand Up @@ -197,8 +196,6 @@ class Visualization {
*/

const VerticalCollection = Component.extend({
layout,

tagName: '',

/**
Expand Down Expand Up @@ -512,15 +509,15 @@ const VerticalCollection = Component.extend({
}

/* Public methods to Expose to parent

Usage:

Template:

<VerticalCollection @registerAPI={{this.registerAPI}} />

Component:

export default class extends Component {
@action
registerAPI(api) {
Expand All @@ -532,7 +529,7 @@ const VerticalCollection = Component.extend({
this.collectionAPI.scrollToItem(index);
}
}

Need to pass this property in the vertical-collection template
Listen in the component actions and do your custom logic
This API will have below methods.
Expand Down
Empty file removed vertical-collection/app/.gitkeep
Empty file.
2 changes: 1 addition & 1 deletion vertical-collection/app/components/vertical-collection.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export { default } from '@html-next/vertical-collection/components/vertical-collection/component';
export { default } from '@html-next/vertical-collection/components/vertical-collection';
4 changes: 3 additions & 1 deletion vertical-collection/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,9 @@ module.exports = {
publicTree = new Funnel(publicTree, { destDir });
privateTree = new Funnel(privateTree, { destDir });

return merge([addonTemplateTree, publicTree, privateTree]);
return merge([addonTemplateTree, publicTree, privateTree], {
overwrite: true,
});
},

_hasSetupBabelOptions: false,
Expand Down
Loading