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

How to: render tabs #62

Merged
merged 1 commit into from Jul 12, 2017
Merged

How to: render tabs #62

merged 1 commit into from Jul 12, 2017

Conversation

dpobel
Copy link
Contributor

@dpobel dpobel commented Jul 7, 2017

Copy link

@DominikaK DominikaK left a comment

Choose a reason for hiding this comment

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

Minor proofing


Constraints:

* To be recognized, the tabs markup must be inside a `ez-server-side-content`

Choose a reason for hiding this comment

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

  • To be recognized, the tabs markup must be inside an ez-server-side-content

* To be recognized, the tabs markup must be inside a `ez-server-side-content`
custom element or a custom element extending this one (`ez-content-view`, ...)
* Each tab consists of a *tab label* and a *tab panel*. A panel must have an
`id` and the corresponding tab label must contain a link which

Choose a reason for hiding this comment

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

id and the corresponding tab label must contain a link whose


### JavaScript API

When switching tab, the `ez:tabChange` custom event is dispatched from the

Choose a reason for hiding this comment

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

When switching tabs, the ez:tabChange custom event is dispatched from the


When switching tab, the `ez:tabChange` custom event is dispatched from the
`ez-server-side-content` custom element. This event carries the tab label
element and the tab panel element that are going to be selected. It is is

Choose a reason for hiding this comment

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

element and the tab panel element that are going to be selected. It is


## Asynchronously loaded tabs

By definition, only one tab is visible at a time. So when having tabs, it is

Choose a reason for hiding this comment

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

By definition, only one tab is visible at a time. So when you have tabs, it is


#### Links

By default, a link in an `ez-asynchronous-block` behaves as [any link in the

Choose a reason for hiding this comment

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

By default, a link in an ez-asynchronous-block behaves like [any link in the

#### Links

By default, a link in an `ez-asynchronous-block` behaves as [any link in the
application](prevent_navigation_enhancement.md). By putting the class

Choose a reason for hiding this comment

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

application](prevent_navigation_enhancement.md). By assigning the class


By default, a link in an `ez-asynchronous-block` behaves as [any link in the
application](prevent_navigation_enhancement.md). By putting the class
`ez-js-local-navigation` on a link or one of its ancestors in the block, the

Choose a reason for hiding this comment

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

ez-js-local-navigation to a link or one of its ancestors in the block, the


So it's possible to listen to `ez:asynchronousBlock:updated` from the block
itself or from any ancestor HTML element (and even from the document) to apply
any kind of JavaScript enhanced on the newly added markup.

Choose a reason for hiding this comment

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

any kind of JavaScript enhancement on the newly added markup.

application](prevent_navigation_enhancement.md). By putting the class
`ez-js-local-navigation` on a link or one of its ancestors in the block, the
`ez-asynchronous-block` custom element considers a click on this link as a
*local navigation*. That means the block will prevent the default link behaviour

Choose a reason for hiding this comment

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

local navigation. That means the block will prevent the default link behavior

@dpobel dpobel merged commit aaf66dc into master Jul 12, 2017
@dpobel dpobel deleted the doc_tabs branch July 12, 2017 08:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants