<feed xmlns='http://www.w3.org/2005/Atom'>
<title>BMC/OpenBmc/webui-vue.git/docs/guide, branch master</title>
<subtitle>Web-based user interface built on Vue.js for managing OpenBMC systems (mirror)</subtitle>
<id>https://git.radix-linux.su/BMC/OpenBmc/webui-vue.git/atom?h=master</id>
<link rel='self' href='https://git.radix-linux.su/BMC/OpenBmc/webui-vue.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/OpenBmc/webui-vue.git/'/>
<updated>2026-01-23T20:01:27+00:00</updated>
<entry>
<title>Migrate unit tests from Jest to Vitest</title>
<updated>2026-01-23T20:01:27+00:00</updated>
<author>
<name>Jason Westover</name>
<email>jwestover@nvidia.com</email>
</author>
<published>2026-01-08T16:57:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/OpenBmc/webui-vue.git/commit/?id=e5b9cca7a85b49ae95d629765529b872d6a4d57e'/>
<id>urn:sha1:e5b9cca7a85b49ae95d629765529b872d6a4d57e</id>
<content type='text'>
Replace Jest test runner with Vitest for native ES modules support
and faster test execution. This migration aligns the test tooling
with the Vite build system and eliminates CommonJS compatibility
issues.

Why Vitest over Jest?

While Jest is a mature ecosystem with broader adoption (45.5k
GitHub stars vs Vitest's 15.7k), Vitest is the recommended testing
framework for Vue 3 + Vite projects:

1. **Native ESM Support**: Vitest runs tests directly as ESM
   without transformation, while Jest requires Babel/transformation
   layers that add complexity and slow down test execution.

2. **Vite Integration**: Shares the same configuration, plugins,
   and resolvers as the Vite build system. This eliminates the
   dual-config maintenance burden (vite.config.js + jest.config.js).

3. **Vue 3 Ecosystem Alignment**: Vitest is created by the Vue
   team and is the official recommendation in Vue 3 documentation.
   It has first-class Vue component testing support via
   @vue/test-utils.

4. **Performance**: Cold start is significantly faster due to
   Vite's on-demand compilation. HMR for tests provides instant
   feedback during test-driven development.

5. **API Compatibility**: Vitest intentionally matches Jest's API,
   making migration straightforward and allowing developers to
   leverage existing Jest knowledge.

ESLint 9 Upgrade:
- Upgrade ESLint from 8.57.1 to 9.18.0
- Migrate from .eslintrc.cjs to eslint.config.js (flat config)
- Upgrade eslint-plugin-vue from 9.2.0 to 10.0.0
- Replace eslint-plugin-vitest with @vitest/eslint-plugin@1.1.43
- Replace @vue/eslint-config-prettier with eslint-config-prettier
- Add globals package for flat config environment definitions
- Update lint-staged from 13.0.3 to 16.0.0
- Update prettier from 3.2.5 to 3.4.2
- Disable stricter vue rules for follow-up PR:
  vue/no-reserved-component-names, vue/no-unused-components,
  vue/no-deprecated-delete-set, vue/no-required-prop-with-default

Pre-commit Hooks:
- Add simple-git-hooks and lint-staged for automatic linting
- Run eslint --fix on JS/Vue files before commit
- Run prettier --write on markdown files before commit
- Add .prettierrc.yaml matching CI configuration
- Include .cjs/.mjs files in prettier JS override

Documentation:
- Update unit testing guide for Vitest
- Update coding standards with pre-commit hook details

References:
- Vitest official comparison:
  https://vitest.dev/guide/comparisons.html#jest
- Vue 3 testing guide:
  https://vuejs.org/guide/scaling-up/testing.html#unit-testing
- Vite ecosystem recommendations:
  https://vitejs.dev/guide/features.html#testing

Test Results:
  - 19 test files, 123 tests passing
  - No warnings or deprecation messages
  - Test execution: ~3.1s (on par with Jest)

Changes:
- Replace jest.config.js with Vitest config in vite.config.js
- Create tests/vitest.setup.js with Vitest-compatible mocks
- Update package.json scripts for Vitest
- Add vue3-snapshot-serializer for cleaner snapshots
- Use happy-dom and real i18n instance for faster tests

Dependency Updates:
- Remove @vue/cli-plugin-unit-jest, @vue/vue3-jest, babel-jest,
  jest
- Add vitest, @vitest/coverage-v8, jsdom, happy-dom,
  vue3-snapshot-serializer

Test File Migrations:
- Replace jest.fn() with vi.fn()
- Replace jest.spyOn() with vi.spyOn()
- Replace jest.mock() with vi.mock()
- Replace jest.resetModules() with vi.resetModules()
- Replace jest.unmock() with vi.unmock()
- Replace require() with dynamic import() for ESM compatibility
- Add explicit Vitest imports (vi, describe, it, expect, etc.)

Snapshot Improvements:
- Use vue3-snapshot-serializer to strip data-v-* scoped style
  attributes from snapshots for cleaner, more stable output
- Add SVG component stubs for logo assets to avoid verbose path
  data in snapshots (logo-header.svg, login-company-logo.svg,
  built-on-openbmc-logo.svg)
- Updated all snapshot files for Vitest format
- Removed obsolete Jest snapshot entries

Performance Optimizations:
- Use happy-dom instead of jsdom (17% faster environment setup)
- Use real i18n instance instead of mock (eliminates redundant
  dynamic imports, 55% faster test execution)

Tested:
- npm run test:unit runs 19 test files, 123 tests, and passed
  them all with 0 warnings.

Change-Id: Iaf04335db54a5ceeff09bcd43675a488828dc44f
Signed-off-by: Jason Westover &lt;jwestover@nvidia.com&gt;
</content>
</entry>
<entry>
<title>Add i18n vendor overlays and dynamic bundling</title>
<updated>2025-08-22T11:41:39+00:00</updated>
<author>
<name>jason westover</name>
<email>jwestover@nvidia.com</email>
</author>
<published>2025-08-18T14:26:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/OpenBmc/webui-vue.git/commit/?id=d2483622fc31f6b965a052d0c4f999ad963d0a0f'/>
<id>urn:sha1:d2483622fc31f6b965a052d0c4f999ad963d0a0f</id>
<content type='text'>
- Add opt-in vendor overlays under src/env/locales/&lt;env&gt;
  (and optional variant), merged on top of base locales at runtime.
- Auto-discover and bundle all base locale JSON files
  in src/locales/.
- Example: move dump type labels under pageDumps.dumpTypes;
  read vendor-only dump labels from overlays.
- Docs: update i18n guidelines and env README (formatting fixes).
- Tests: add focused unit tests for overlays and locale aliases.

Tested:
- Unit: i18n.locale-alias.spec.js, i18n.vendor.spec.js (passing)
- Manual: Verified dynamic locale discovery and overlay merge in UI

Change-Id: I8eae2bfec0e9622bafdafac3168dbf96650e8ae8
Signed-off-by: jason westover &lt;jwestover@nvidia.com&gt;
</content>
</entry>
<entry>
<title>markdownlint: fixes</title>
<updated>2025-06-12T17:10:20+00:00</updated>
<author>
<name>Patrick Williams</name>
<email>patrick@stwcx.xyz</email>
</author>
<published>2025-06-12T17:10:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/OpenBmc/webui-vue.git/commit/?id=5fa63e5a5ff1e97ea7303cf8da9d74e45685a66e'/>
<id>urn:sha1:5fa63e5a5ff1e97ea7303cf8da9d74e45685a66e</id>
<content type='text'>
Signed-off-by: Patrick Williams &lt;patrick@stwcx.xyz&gt;
Change-Id: I5d07d550b9c483de6c4d5f64570ea8336564297a
</content>
</entry>
<entry>
<title>i18n: fix global method in page-title guide</title>
<updated>2025-05-01T20:19:19+00:00</updated>
<author>
<name>Jason M. Bills</name>
<email>jason.m.bills@intel.com</email>
</author>
<published>2025-04-30T19:11:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/OpenBmc/webui-vue.git/commit/?id=06cfd5bf6f2389229f7580fbd47e5d5b9ab5661e'/>
<id>urn:sha1:06cfd5bf6f2389229f7580fbd47e5d5b9ab5661e</id>
<content type='text'>
The change from i18n.t method to i18n.global.t for vue3 support was
missed in the page-title guide. I found this on the Intel router and am
pushing this for completeness.

Change-Id: I97c993e36caa07af6df7c1ae3124e4f9380c493b
Signed-off-by: Jason M. Bills &lt;jason.m.bills@intel.com&gt;
</content>
</entry>
<entry>
<title>Focus default action in modal windows</title>
<updated>2024-04-18T16:45:03+00:00</updated>
<author>
<name>Paul Fertser</name>
<email>fercerpav@gmail.com</email>
</author>
<published>2024-04-06T08:04:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/OpenBmc/webui-vue.git/commit/?id=d1ef18e6f9ed1527b66cec07eba6acaf9a95819c'/>
<id>urn:sha1:d1ef18e6f9ed1527b66cec07eba6acaf9a95819c</id>
<content type='text'>
Users of common WIMP GUIs (as opposed to interfaces primarily meant for
touch input) expect dialog boxes to have keyboard focus set on the
button for default action so that it can be executed by a single key
press. Usually that is chosen to proceed with the operation but in cases
where that leads to data loss the UI designers often pre-select Cancel
as a precaution.

This patch adds suitable property to all invocations of msgBoxConfirm()
method of `this.$bvModal` BootstrapVue object. For regular actions the
confirmation button is selected and can be activated by Enter or Space
bar. For actions deemed dangerous Cancel is focused instead so it takes
two key presses (first being Tab to shift the focus) to prooceed.

This also improves accessibility following the Web Content Accessibility
Guidelines (WCAG) published by W3C.

Tested: manually verified that modals are consistently shown with the
specified button focused, Enter and Space bar key presses produce the
same effect as left pointer button click: when Cancel is focused it just
closes the window, when OK is focused it sends the corresponding request
to the Redfish endpoint.

Change-Id: I66bfd02e48e08dc18994b11bbdd5d6b3ea27047f
Signed-off-by: Paul Fertser &lt;fercerpav@gmail.com&gt;
</content>
</entry>
<entry>
<title>Fix CI fail</title>
<updated>2023-07-11T15:02:33+00:00</updated>
<author>
<name>Gunnar Mills</name>
<email>gmills@us.ibm.com</email>
</author>
<published>2023-07-11T14:11:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/OpenBmc/webui-vue.git/commit/?id=6236b11ba7b7fb37f37e6af887b87e3071a8a4cb'/>
<id>urn:sha1:6236b11ba7b7fb37f37e6af887b87e3071a8a4cb</id>
<content type='text'>
Looks like a new bump of the tools caught us.

Saw this fail on
https://gerrit.openbmc.org/c/openbmc/webui-vue/+/63442

Fails like:
```
diff --git a/docs/guide/components/page-section/index.md
b/docs/guide/components/page-section/index.md
index 94113c5..a37d67c 100644
--- a/docs/guide/components/page-section/index.md
+++ b/docs/guide/components/page-section/index.md
@@ -6,7 +6,7 @@ string will be rendered in an `h2` header element.

 ```vue
 // Example: `src/views/AccessControl/Ldap/Ldap.vue`
-    &lt;page-section :section-title="$t('pageLdap.settings')"&gt;
+&lt;page-section :section-title="$t('pageLdap.settings')"&gt;&lt;/page-section&gt;
 ```
```

Change-Id: I1ada18a09050c5fbcc773a28ef20b8af1b7e84e4
Signed-off-by: Gunnar Mills &lt;gmills@us.ibm.com&gt;
</content>
</entry>
<entry>
<title>prettier: re-format</title>
<updated>2022-12-08T12:13:13+00:00</updated>
<author>
<name>Patrick Williams</name>
<email>patrick@stwcx.xyz</email>
</author>
<published>2022-12-08T12:13:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/OpenBmc/webui-vue.git/commit/?id=7385e139b0c9efca7430458cee982e63e282f4ae'/>
<id>urn:sha1:7385e139b0c9efca7430458cee982e63e282f4ae</id>
<content type='text'>
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 &lt;patrick@stwcx.xyz&gt;
</content>
</entry>
<entry>
<title>docs: guide: fix broken links to guidelines and customization</title>
<updated>2021-08-04T12:20:44+00:00</updated>
<author>
<name>Paul Fertser</name>
<email>fercerpav@gmail.com</email>
</author>
<published>2021-07-22T15:21:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/OpenBmc/webui-vue.git/commit/?id=03dc2b7b9f0672aac84349fbc77aab55403447e0'/>
<id>urn:sha1:03dc2b7b9f0672aac84349fbc77aab55403447e0</id>
<content type='text'>
Change-Id: I2165938df5adfd2b3891cb1335364b78e3f9c474
Signed-off-by: Paul Fertser &lt;fercerpav@gmail.com&gt;
</content>
</entry>
<entry>
<title>docs: expand guide with vue-i18n-extract.js examples</title>
<updated>2021-07-22T14:52:42+00:00</updated>
<author>
<name>Paul Fertser</name>
<email>fercerpav@gmail.com</email>
</author>
<published>2021-07-22T09:57:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/OpenBmc/webui-vue.git/commit/?id=e827dd235bb4c459a5320ad00c0b0ba7b8bd0468'/>
<id>urn:sha1:e827dd235bb4c459a5320ad00c0b0ba7b8bd0468</id>
<content type='text'>
This internationalization documentation patch provides the developers
with specific recommendations on using vue-i18n-extract.js tool to
ensure translations consistency.

Signed-off-by: Paul Fertser &lt;fercerpav@gmail.com&gt;
Change-Id: I506091c97043ad3f50c4753daddd450abe9744fc
</content>
</entry>
<entry>
<title>Update docs theme section to customization</title>
<updated>2021-06-09T04:27:30+00:00</updated>
<author>
<name>Derick Montague</name>
<email>derick.montague@ibm.com</email>
</author>
<published>2021-05-12T17:26:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/OpenBmc/webui-vue.git/commit/?id=c2f8f34e19ef7b9987538e8c2624e629b5203c17'/>
<id>urn:sha1:c2f8f34e19ef7b9987538e8c2624e629b5203c17</id>
<content type='text'>
The themes section of the webui style guide contained a section named
theme. This section also included information about the environmental
builds. The name was misleading and confusing, so we determined in the
GUI Design Work Group to update the section name.

Signed-off-by: Derick Montague &lt;derick.montague@ibm.com&gt;
Change-Id: Iad245199048f65f346e6c033a766605f303b0ade
</content>
</entry>
</feed>
