generated from redhat-developer/new-project-template
-
Notifications
You must be signed in to change notification settings - Fork 57
RHIDP-5514: Floating action button #925
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
Merged
Merged
Changes from 16 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
e90a937
Added new content for FAB
pabel-rh 6be3505
Minor edits
pabel-rh 03a8b88
Adding content to customizing
pabel-rh 3c9b5f1
Changing capitalization in docs
pabel-rh 6e1ceab
Minor changes
pabel-rh 2cb35aa
Incorporated Christoph's comments
pabel-rh 9c575ff
Removed static plugin mentions
pabel-rh ceb89d5
Incorporated Lindsey's comments
pabel-rh daf8cbc
Refined content
pabel-rh 2c03a40
Changed topic name
pabel-rh 1daab79
Updated priority description
pabel-rh b6aadaf
Incorporated Heena's comments
pabel-rh eb59886
Minor changes
pabel-rh a8ec9cb
Minor change
pabel-rh 018f8b7
Removed the part that talked about enabling
pabel-rh 6c80e6d
Removed unwanted step
pabel-rh cc8e378
Minor change
pabel-rh 09cb812
Added svg icon example
pabel-rh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
8 changes: 8 additions & 0 deletions
8
assemblies/assembly-configuring-a-floating-action-button.adoc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| :_mod-docs-content-type: ASSEMBLY | ||
| :context: configuring-a-floating-action-button | ||
| [id="{context}"] | ||
| = Configuring a floating action button in {product} | ||
|
|
||
| You can use the floating action button plugin to configure any action button as a floating button in any page in the {product-short} instance as you want. The floating action button plugin is disabled by default. You can also configure floating action buttons to display as submenu options within the main floating action button. | ||
|
|
||
| include::modules/configuring-a-floating-action-button/proc-configuring-floating-action-button-as-a-dynamic-plugin.adoc[leveloffset=+1] | ||
149 changes: 149 additions & 0 deletions
149
...-action-button/proc-configuring-floating-action-button-as-a-dynamic-plugin.adoc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,149 @@ | ||
| :_mod-docs-content-type: PROCEDURE | ||
| [id="proc-configuring-floating-action-button-as-a-dynamic-plugin_{context}"] | ||
| = Configuring a floating action button as a dynamic plugin | ||
|
|
||
| You can configure the floating action button as a dynamic plugin to perform actions or open an internal or external link. | ||
|
|
||
| .Prerequisties | ||
| You must have sufficient permissions as a platform engineer. | ||
|
|
||
| .Procedure | ||
pabel-rh marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| To configure a floating action button as a dynamic plugin, complete any of the following tasks: | ||
|
|
||
| * Specify the `global.floatingactionbutton/config` mount point in your `app-config-dynamic.yaml` file. For example: | ||
| + | ||
| .Example of a bulk-import plugin as a floating action button | ||
| [source,yaml] | ||
| ---- | ||
| dynamicPlugins: | ||
| frontend: | ||
| red-hat-developer-hub.backstage-plugin-bulk-import: | ||
| # Start of the floating action button configuration | ||
| mountPoints: | ||
| - mountPoint: global.floatingactionbutton/config | ||
| importName: BulkImportPage <1> | ||
| config: | ||
| slot: 'page-end' | ||
| icon: bulkImportIcon | ||
| label: 'Bulk import' | ||
| toolTip: 'Register multiple repositories in bulk' | ||
| to: /bulk-import/repositories | ||
| # End of the floating action button configuration | ||
| appIcons: | ||
| - name: bulkImportIcon | ||
| importName: BulkImportIcon | ||
| dynamicRoutes: | ||
| - path: /bulk-import/repositories | ||
| importName: BulkImportPage | ||
| menuItem: | ||
| icon: bulkImportIcon | ||
| text: Bulk import | ||
| ---- | ||
| <1> (Required) The import name with an associated component to the mount point. | ||
|
|
||
| * To configure a dynamic plugin as a floating action button that opens an external link, specify the `global.floatingactionbutton/config` mount point in your `app-config-dynamic.yaml` file. For example: | ||
| + | ||
| .Example of a floating action button that opens GitHub | ||
| [source,yaml] | ||
| ---- | ||
| dynamicPlugins: | ||
| frontend: | ||
| red-hat-developer-hub.backstage-plugin-global-floating-action-button: | ||
| mountPoints: | ||
| - mountPoint: application/listener | ||
| importName: DynamicGlobalFloatingActionButton | ||
| - mountPoint: global.floatingactionbutton/config | ||
| importName: NullComponent | ||
| config: | ||
| icon: github | ||
| label: 'Git' | ||
| toolTip: 'Github' | ||
| to: https://github.com/redhat-developer/rhdh-plugins | ||
| ---- | ||
|
|
||
| == Floating action button parameters | ||
| Use the parameters as shown in the following table to configure your floating action button plugin. | ||
|
|
||
| .Floating action button parameters | ||
pabel-rh marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| |=== | ||
| | Name | Description | Type | Default value | Required | ||
|
|
||
| | `slot` | ||
| | Position of the floating action button. Valid values: `PAGE_END`, `BOTTOM_LEFT` | ||
| | `enum` | ||
| | `PAGE_END` | ||
| | No | ||
|
|
||
| | `label` | ||
| | Name of the floating action button | ||
| | `String` | ||
| | Not applicable | ||
| | Yes | ||
|
|
||
| | `icon` | ||
| | Icon of the floating action button. Recommended to use filled icons from the link:https://fonts.google.com/icons[Material Design library]. | ||
| | `StringReact.ReactElement` | ||
| | Not applicable | ||
pabel-rh marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| | No | ||
|
|
||
| | `showLabel` | ||
| | Display of the abel next to your icon | ||
| | `Boolean` | ||
| | Not applicable | ||
| | No | ||
|
|
||
| | `size` | ||
| | Size of the floating action button | ||
| | `small`, `medium`, `large` | ||
| | `medium` | ||
| | No | ||
|
|
||
| | `color` | ||
| | Color of the component. It supports both default and custom theme colors, that are added from the link:https://mui.com/material-ui/customization/palette/#custom-colors[Palette Getting started guide]. | ||
| | `default`, `error`, `info`, `inherit`, `primary`, `secondary`, `success`, `warning` | ||
| | `default` | ||
| | No | ||
|
|
||
| | `onClick` | ||
| | Performed action when selecting a floating action button | ||
| | `React.MouseEventHandler` | ||
| | Not applicable | ||
| | No | ||
|
|
||
| | `to` | ||
| | Link that opens when selecting a floating action button | ||
| | `String` | ||
| | Not applicable | ||
| | No | ||
|
|
||
| | `toolTip` | ||
| | Text that appears when hovering over a floating action button | ||
| | `String` | ||
| | Not applicable | ||
| | No | ||
|
|
||
| | `priority` | ||
| | Order of the floating action buttons displayed in the submenu. A larger value means higher priority. | ||
| | `number` | ||
| | Not applicable | ||
| | No | ||
|
|
||
| | `visibleOnPaths` | ||
| | Display floating action button on the specified paths | ||
| | `string[]` | ||
| | Display floating action button on all paths | ||
| | No | ||
|
|
||
| | `excludeOnPaths` | ||
| | Hide floating action button on the specified paths | ||
| | `string[]` | ||
| | Display floating action button on all paths | ||
| | No | ||
|
|
||
| |=== | ||
|
|
||
| [NOTE] | ||
| ==== | ||
| If multiple floating button actions are assigned to the same `Slot`, these floating buttons are displayed as submenu options within the main floating action button. | ||
| ==== | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.