Skip to content

Commit

Permalink
[web] Update Layout documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
dgdavid committed Jan 18, 2023
1 parent 6dd8d06 commit 54a3c60
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
16 changes: 13 additions & 3 deletions web/src/components/layout/Layout.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,20 @@ const FooterActions = createTeleporter();
const FooterInfoArea = createTeleporter();

/**
* D-Installer main layout component.
*
* It displays the content in a single vertical responsive column with fixed
* header and footer.
* The D-Installer main layout component.
*
* It displays the content in a single column with a fixed header and footer.
*
* To achieve an {@link https://gregberge.com/blog/react-scalable-layout scalable layout},
* it uses {@link https://reactjs.org/docs/portals.html React Portals} through
* {@link https://github.com/gregberge/react-teleporter react-teleporter}. In other words,
* it is mounted only once and gets influenced by other components by using the created
* slots (Title, PageIcon, MainActions, etc).
*
* So, please ensure that {@link test-utils!mockLayout } gets updated when adding or deleting
* slots here. It's needed in order to allow testing the output of components that interact
* with the layout using that mechanism.
*
* @example
* <Layout>
Expand Down
6 changes: 6 additions & 0 deletions web/src/test-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@
* find current contact information at www.suse.com.
*/

/**
* A module for providing utility functions for testing
*
* @module test-utils
*/

import React from "react";
import userEvent from "@testing-library/user-event";
import { render } from "@testing-library/react";
Expand Down

0 comments on commit 54a3c60

Please sign in to comment.