From 7385e139b0c9efca7430458cee982e63e282f4ae Mon Sep 17 00:00:00 2001 From: Patrick Williams Date: Thu, 8 Dec 2022 06:13:13 -0600 Subject: prettier: re-format Prettier is enabled in openbmc-build-scripts on Markdown, JSON, and YAML files to have consistent formatting for these file types. Re-run the formatter on the whole repository. Change-Id: I2804ee3ab5ff6bcbf986b028db2fafec8e616779 Signed-off-by: Patrick Williams --- docs/guide/components/alerts/index.md | 6 +- docs/guide/components/buttons/index.md | 6 +- docs/guide/components/file-upload/readme.md | 10 +- docs/guide/components/info-tooltip/index.md | 7 +- docs/guide/components/page-section/index.md | 5 +- docs/guide/components/page-title/index.md | 8 +- docs/guide/components/readme.md | 3 +- docs/guide/components/status-icon/readme.md | 17 +-- docs/guide/components/table/index.md | 165 +++++++++++++--------------- docs/guide/components/toasts/index.md | 7 +- 10 files changed, 107 insertions(+), 127 deletions(-) (limited to 'docs/guide/components') diff --git a/docs/guide/components/alerts/index.md b/docs/guide/components/alerts/index.md index aa2c5e13..0ce5167c 100644 --- a/docs/guide/components/alerts/index.md +++ b/docs/guide/components/alerts/index.md @@ -1,11 +1,11 @@ # Alerts + An alert is an inline message that contains a short description that a user cannot manually dismiss. With exception to the error message on the login page, alerts are not triggered by user action. Success and error notifications based on user actions are created using a toast component. -[Learn more about Bootstrap-vue alert -options](https://bootstrap-vue.js.org/docs/components/alert) +[Learn more about Bootstrap-vue alert options](https://bootstrap-vue.js.org/docs/components/alert) ![Alert examples](./alert.png) @@ -13,4 +13,4 @@ options](https://bootstrap-vue.js.org/docs/components/alert) This is a warning message This is an error message This is an info message -``` \ No newline at end of file +``` diff --git a/docs/guide/components/buttons/index.md b/docs/guide/components/buttons/index.md index 83b8e8a7..251316ff 100644 --- a/docs/guide/components/buttons/index.md +++ b/docs/guide/components/buttons/index.md @@ -6,10 +6,10 @@ can be themed by setting the `variant` prop on the component to one of the [theme-color map keys](/guide/guidelines/colors). To create a button that looks like a link, set the variant value to `link`. -[Learn more about Bootstrap-vue -buttons](https://bootstrap-vue.js.org/docs/components/button) +[Learn more about Bootstrap-vue buttons](https://bootstrap-vue.js.org/docs/components/button) ### Icon only buttons + Add `btn-icon-only` class to the button and add `title` attribute to get helper text on hover over the button. @@ -57,4 +57,4 @@ text on hover over the button. -``` \ No newline at end of file +``` diff --git a/docs/guide/components/file-upload/readme.md b/docs/guide/components/file-upload/readme.md index fb833648..e0819a85 100644 --- a/docs/guide/components/file-upload/readme.md +++ b/docs/guide/components/file-upload/readme.md @@ -4,12 +4,13 @@ component. The purpose of this component is to upload files to the BMC. To use this component: + 1. Import it into the single file component (SFC) 2. Add the `` tag 3. Add the optional `id` , `disabled`, `accept` and `state` prop as required -[Learn more about the Bootstrap-vue Form File -component](https://bootstrap-vue.org/docs/components/form-file) +[Learn more about the Bootstrap-vue Form File component](https://bootstrap-vue.org/docs/components/form-file) + ### Optional properties - `id`- Used to set the `id` attribute on the rendered content, and used as the @@ -23,10 +24,7 @@ component](https://bootstrap-vue.org/docs/components/form-file) ## Example of form file ```vue - + ``` diff --git a/docs/guide/components/info-tooltip/index.md b/docs/guide/components/info-tooltip/index.md index b6117924..4b6416c9 100644 --- a/docs/guide/components/info-tooltip/index.md +++ b/docs/guide/components/info-tooltip/index.md @@ -4,15 +4,12 @@ The `InfoTooltip` is a custom component that uses a Bootstrap-vue tooltip with an info icon. This custom component requires a title property containing the tooltip text to display to the user. -[Read more about the Bootstrap-vue tooltip -component](https://bootstrap-vue.org/docs/components/tooltip) +[Read more about the Bootstrap-vue tooltip component](https://bootstrap-vue.org/docs/components/tooltip) ## Example ```vue - + ``` ![Tooltip example](./info-tooltip.png) diff --git a/docs/guide/components/page-section/index.md b/docs/guide/components/page-section/index.md index 2a8a22ef..94113c58 100644 --- a/docs/guide/components/page-section/index.md +++ b/docs/guide/components/page-section/index.md @@ -4,10 +4,9 @@ The `` component will render semantic HTML. By adding a `:section-title` prop to the `` component, the localized text string will be rendered in an `h2` header element. -``` vue +```vue // Example: `src/views/AccessControl/Ldap/Ldap.vue` ``` -[View the page section component source -code](https://github.com/openbmc/webui-vue/blob/master/src/components/Global/PageSection.vue). \ No newline at end of file +[View the page section component source code](https://github.com/openbmc/webui-vue/blob/master/src/components/Global/PageSection.vue). diff --git a/docs/guide/components/page-title/index.md b/docs/guide/components/page-title/index.md index db43f29f..2f635e74 100644 --- a/docs/guide/components/page-title/index.md +++ b/docs/guide/components/page-title/index.md @@ -1,4 +1,5 @@ # Page title + The `` component will automatically render the page title that corresponds with the title property set in the route record's meta field in `src/router/routes.js`. @@ -19,10 +20,9 @@ Optional page descriptions can be included by using the description prop `:description` prop and passing in the i18n localized text string. Translations are found in the `src/locales` folder. -``` vue +```vue // Example: `src/views/AccessControl/Ldap/Ldap.vue` - + ``` -[View the page title component source -code](https://github.com/openbmc/webui-vue/blob/master/src/components/Global/PageTitle.vue). +[View the page title component source code](https://github.com/openbmc/webui-vue/blob/master/src/components/Global/PageTitle.vue). diff --git a/docs/guide/components/readme.md b/docs/guide/components/readme.md index aef688af..b200b305 100644 --- a/docs/guide/components/readme.md +++ b/docs/guide/components/readme.md @@ -1,4 +1,5 @@ # Overview + Vue components are the building blocks of the OpenBMC Web UI. It uses both Boostrap-Vue components, as well as custom components. Using these components assures consistency throughout the application. They also improve the developer @@ -7,4 +8,4 @@ HTML markup. If the feature you're working on includes a new layout pattern, rather than adding raw markup to the page, consider creating a component that other sections of the application can use as well. -[Learn more about Vue components](https://vuejs.org/v2/guide/components.html) \ No newline at end of file +[Learn more about Vue components](https://vuejs.org/v2/guide/components.html) diff --git a/docs/guide/components/status-icon/readme.md b/docs/guide/components/status-icon/readme.md index aef1f93c..e2041986 100644 --- a/docs/guide/components/status-icon/readme.md +++ b/docs/guide/components/status-icon/readme.md @@ -9,6 +9,7 @@ following statuses: - danger To use this component: + 1. Import it into the single file component (SFC) 2. Add the `` tag 3. Add the optional status prop and set the value to one of the statuses @@ -29,9 +30,7 @@ import StatusIcon from '@/components/Global/StatusIcon' ## Status icon with success status ```vue - + ``` ![StatusIcon success icon example](./success.png) @@ -39,9 +38,7 @@ import StatusIcon from '@/components/Global/StatusIcon' ## Status icon with info status ```vue - + ``` ![StatusIcon info icon example](./info.png) @@ -49,9 +46,7 @@ import StatusIcon from '@/components/Global/StatusIcon' ## Status icon with warning status ```vue - + ``` ![StatusIcon warning icon example](./warning.png) @@ -59,9 +54,7 @@ import StatusIcon from '@/components/Global/StatusIcon' ## Status icon with danger status ```vue - + ``` ![StatusIcon danger icon example](./danger.png) diff --git a/docs/guide/components/table/index.md b/docs/guide/components/table/index.md index 614ef60f..47bc51d8 100644 --- a/docs/guide/components/table/index.md +++ b/docs/guide/components/table/index.md @@ -1,17 +1,16 @@ # Table -All tables in the application are using the [BoostrapVue table -component](https://bootstrap-vue.org/docs/components/table). +All tables in the application are using the +[BoostrapVue table component](https://bootstrap-vue.org/docs/components/table). To use the component, include the `` tag in the template. The component is registered globally so does not need to be imported in each SFC. ## Basic table -There are a few required properties to maintain consistency across the -application. The full list of options can be viewed on the [Bootstrap-vue table -component's documentation -page](https://bootstrap-vue.org/docs/components/table#comp-ref-b-table-props). +There are a few required properties to maintain consistency across the +application. The full list of options can be viewed on the +[Bootstrap-vue table component's documentation page](https://bootstrap-vue.org/docs/components/table#comp-ref-b-table-props). ### Required properties @@ -20,12 +19,13 @@ page](https://bootstrap-vue.org/docs/components/table#comp-ref-b-table-props). - `hover` - enables table row hover state - `responsive` or `stacked` - makes the table responsive (enables horizontal scrolling or stacked view) at the defined breakpoint -- `show-empty` *(required if table data is generated dynamically)* - shows an +- `show-empty` _(required if table data is generated dynamically)_ - shows an empty message if there are no items in the table -- `empty-text` *(required if table data is generated dynamically)* - the +- `empty-text` _(required if table data is generated dynamically)_ - the translated empty message -![Basic table example](./table.png) ![Basic empty table +![Basic table example](./table.png) +![Basic empty table example](./table-empty.png) ```vue @@ -41,36 +41,36 @@ example](./table-empty.png) ``` @@ -85,7 +85,6 @@ columns and add the following props to the `` component: ![Table sort example](./table-sort.png) - ```vue