Skip to content

Commit

Permalink
docs(ui5-popover, ui5-dialog): adapt documentation (#9460)
Browse files Browse the repository at this point in the history
  • Loading branch information
TeodorTaushanov authored Jul 11, 2024
1 parent 0e95ae9 commit 0480e58
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 20 deletions.
8 changes: 1 addition & 7 deletions packages/main/src/Dialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ const ICON_PER_STATE: Record<ValueStateWithIcon, string> = {
* The dialog combines concepts known from other technologies where the windows have
* names such as dialog box, dialog window, pop-up, pop-up window, alert box, or message box.
*
* The `ui5-dialog` is modal, which means that an user action is required before it is possible to return to the parent window.
* The `ui5-dialog` is modal, which means that a user action is required before it is possible to return to the parent window.
* To open multiple dialogs, each dialog element should be separate in the markup. This will ensure the correct modal behavior. Avoid nesting dialogs within each other.
* The content of the `ui5-dialog` is fully customizable.
*
Expand Down Expand Up @@ -98,12 +98,6 @@ const ICON_PER_STATE: Record<ValueStateWithIcon, string> = {
*
* `import "@ui5/webcomponents/dist/Dialog";`
*
* **Note:** We recommend placing popup-like components (`ui5-dialog` and `ui5-popover`)
* outside any other components. Preferably, the popup-like components should be placed
* in an upper level HTML element. Otherwise, in some cases the parent HTML elements can break
* the position and/or z-index management of the popup-like components.
*
* **Note:** We don't recommend nesting popup-like components (`ui5-dialog`, `ui5-popover`).
* @constructor
* @extends Popup
* @public
Expand Down
6 changes: 0 additions & 6 deletions packages/main/src/Popover.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,6 @@ type CalculatedPlacement = {
*
* `import "@ui5/webcomponents/dist/Popover.js";`
*
* **Note: ** We recommend placing popup-like components (`ui5-dialog` and `ui5-popover`)
* outside any other components. Preferably, the popup-like components should be placed
* in an upper level HTML element. Otherwise, in some cases the parent HTML elements can break
* the position and/or z-index management of the popup-like components.
*
* **Note:** We don't recommend nesting popup-like components (`ui5-dialog`, `ui5-popover`).
* @constructor
* @extends Popup
* @since 1.0.0-rc.6
Expand Down
9 changes: 2 additions & 7 deletions packages/main/src/Popup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,25 +53,20 @@ type PopupBeforeCloseEventDetail = {
* ### Overview
* Base class for all popup Web Components.
*
* If you need to create your own popup-like custom UI5 Web Components, it is highly recommended that you extend
* at least Popup in order to have consistency with other popups in terms of modal behavior and z-index management.
* If you need to create your own popup-like custom UI5 Web Components.
*
* 1. The Popup class handles modality:
* - The "isModal" getter can be overridden by derivatives to provide their own conditions when they are modal or not
* - Derivatives may call the "blockPageScrolling" and "unblockPageScrolling" static methods to temporarily remove scrollbars on the html element
* - Derivatives may call the "openPopup" and "closePopup" methods which handle focus, manage the popup registry and for modal popups, manage the blocking layer
*
* 2. Provides blocking layer (relevant for modal popups only):
* - It is in the static area
* - Controlled by the "open" and "close" methods
*
* 3. The Popup class "traps" focus:
* - Derivatives may call the "applyInitialFocus" method (usually when opening, to transfer focus inside the popup)
*
* 4. The Popup class automatically assigns "z-index"
* - Each time a popup is opened, it gets a higher than the previously opened popup z-index
*
* 5. The template of this component exposes two inline partials you can override in derivatives:
* 4. The template of this component exposes two inline partials you can override in derivatives:
* - beforeContent (upper part of the box, useful for header/title/close button)
* - afterContent (lower part, useful for footer/action buttons)
* @constructor
Expand Down

0 comments on commit 0480e58

Please sign in to comment.