Commit 6f4cbc8f authored by Takuya Noguchi's avatar Takuya Noguchi

Add navigation to DropLab plugins on Frontend Development Guide

Also s/droplab/DropLab/g'd only in texts (not in code snippets).
Signed-off-by: default avatarTakuya Noguchi <takninnovationresearch@gmail.com>
parent a5032437
...@@ -22,7 +22,7 @@ The value is irrelevant. ...@@ -22,7 +22,7 @@ The value is irrelevant.
The DropLab class has no side effects, so you must always call `.init` when The DropLab class has no side effects, so you must always call `.init` when
the DOM is ready. `DropLab.prototype.init` takes the same arguments as `DropLab.prototype.addHook`. the DOM is ready. `DropLab.prototype.init` takes the same arguments as `DropLab.prototype.addHook`.
If you do not provide any arguments, it will globally query and instantiate all droplab compatible dropdowns. If you do not provide any arguments, it will globally query and instantiate all DropLab compatible dropdowns.
```html ```html
<a href="#" data-dropdown-trigger="#list">Toggle</a> <a href="#" data-dropdown-trigger="#list">Toggle</a>
...@@ -216,7 +216,7 @@ These custom events add a `detail` object to the vanilla `Event` object that pro ...@@ -216,7 +216,7 @@ These custom events add a `detail` object to the vanilla `Event` object that pro
## Plugins ## Plugins
Plugins are objects that are registered to be executed when a hook is added (when a droplab trigger and dropdown are instantiated). Plugins are objects that are registered to be executed when a hook is added (when a DropLab trigger and dropdown are instantiated).
If no modules API is detected, the library will fall back as it does with `window.DropLab` and will add `window.DropLab.plugins.PluginName`. If no modules API is detected, the library will fall back as it does with `window.DropLab` and will add `window.DropLab.plugins.PluginName`.
...@@ -246,13 +246,11 @@ droplab.init(trigger, list, [droplabAjax], { ...@@ -246,13 +246,11 @@ droplab.init(trigger, list, [droplabAjax], {
### Documentation ### Documentation
- [Ajax plugin](plugins/ajax.md) A list of DropLab plugins is [available](./plugins/index.md).
- [Filter plugin](plugins/filter.md)
- [InputSetter plugin](plugins/input_setter.md)
### Development ### Development
When plugins are initialised for a droplab trigger+dropdown, DropLab will When plugins are initialised for a DropLab trigger+dropdown, DropLab will
call the plugins `init` function, so this must be implemented in the plugin. call the plugins `init` function, so this must be implemented in the plugin.
```javascript ```javascript
......
...@@ -4,9 +4,9 @@ group: unassigned ...@@ -4,9 +4,9 @@ group: unassigned
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#designated-technical-writers info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#designated-technical-writers
--- ---
# Ajax # Ajax plugin
`Ajax` is a droplab plugin that allows for retrieving and rendering list data from a server. `Ajax` is a DropLab plugin that allows for retrieving and rendering list data from a server.
## Usage ## Usage
......
...@@ -4,9 +4,9 @@ group: unassigned ...@@ -4,9 +4,9 @@ group: unassigned
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#designated-technical-writers info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#designated-technical-writers
--- ---
# Filter # Filter plugin
`Filter` is a plugin that allows for filtering data that has been added `Filter` is a DropLab plugin that allows for filtering data that has been added
to the dropdown using a simple fuzzy string search of an input value. to the dropdown using a simple fuzzy string search of an input value.
## Usage ## Usage
......
---
stage: none
group: unassigned
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#designated-technical-writers
description: A list of DropLab plugins.
---
# A list of DropLab plugins
A list of [DropLab](../droplab.md) plugins follows:
- [Ajax plugin](plugins/ajax.md)
- [Filter plugin](plugins/filter.md)
- [InputSetter plugin](plugins/input_setter.md)
...@@ -4,9 +4,9 @@ group: unassigned ...@@ -4,9 +4,9 @@ group: unassigned
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#designated-technical-writers info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#designated-technical-writers
--- ---
# InputSetter # InputSetter plugin
`InputSetter` is a plugin that allows for updating DOM out of the scope of droplab when a list item is clicked. `InputSetter` is a plugin that allows for updating DOM out of the scope of DropLab when a list item is clicked.
## Usage ## Usage
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment