-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Fix ha-wa-dialog fullscreen and make alerts not fullscreen #28175
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 27 commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
c8e2a2a
Set minimum safe areas in ha-wa-dialog
timmo001 57a5b6e
Add debug section to dialog
timmo001 eb92e3a
Add type to wa-dialog
timmo001 b11f866
Move custom logic for close button to alert type in wa
timmo001 6db2b02
Safe width
timmo001 9f2abcf
Safe width on standard dialog
timmo001 64b6411
Flip
timmo001 a337d4d
Safe area on standard dialog (actual)
timmo001 e5d33ee
Move safe area 0px clamp to globals
timmo001 d7238a0
Create safe width and height globals
timmo001 5302eb9
Dont rely on ha-vars
timmo001 d5a8511
Remove use of svh/svw, use globals
timmo001 53b66db
Fix
timmo001 2b89e31
Fix
timmo001 9c22e3a
Remove test
timmo001 888f055
Revert "Add debug section to dialog"
timmo001 dc17ac6
Apply suggestion from @bramkragten
timmo001 1e947a4
Use transform to move dialog based on offset x
timmo001 e38a31a
Translate X and Y
timmo001 a261696
Revert unwanted changes to dialog-box
timmo001 eceec1a
Remove extra fallback
timmo001 32dbd2a
Format
timmo001 0b6abb5
Cleanup
timmo001 1844680
Explain
timmo001 9dfe9f4
Align title to content
timmo001 20fc34d
Remove clamp on safe areas
timmo001 c7a9553
Fix fullscreen
timmo001 2ee6b2c
Explain transform
timmo001 af7c6d9
Restore old fullscreen heights
timmo001 44c366f
Add rtl support
piitaya 71ad83b
Compensate mobile margin
piitaya 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
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
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 |
|---|---|---|
| @@ -1,6 +1,7 @@ | ||
| import { mdiAlertOutline, mdiClose } from "@mdi/js"; | ||
| import { css, html, LitElement, nothing } from "lit"; | ||
| import { customElement, property, query, state } from "lit/decorators"; | ||
| import { classMap } from "lit/directives/class-map"; | ||
| import { ifDefined } from "lit/directives/if-defined"; | ||
| import { fireEvent } from "../../common/dom/fire_event"; | ||
| import "../../components/ha-button"; | ||
|
|
@@ -64,6 +65,7 @@ class DialogBox extends LitElement { | |
| <ha-wa-dialog | ||
| .hass=${this.hass} | ||
| .open=${this._open} | ||
| type=${confirmPrompt ? "alert" : "standard"} | ||
| ?prevent-scrim-close=${confirmPrompt} | ||
| @closed=${this._dialogClosed} | ||
| aria-labelledby="dialog-box-title" | ||
|
|
@@ -79,7 +81,11 @@ class DialogBox extends LitElement { | |
| ></ha-icon-button | ||
| ></slot>` | ||
| : nothing} | ||
| <span slot="title" id="dialog-box-title"> | ||
| <span | ||
| class=${classMap({ title: true, alert: confirmPrompt })} | ||
| slot="title" | ||
| id="dialog-box-title" | ||
| > | ||
| ${this._params.warning | ||
| ? html`<ha-svg-icon | ||
| .path=${mdiAlertOutline} | ||
|
|
@@ -199,6 +205,9 @@ class DialogBox extends LitElement { | |
| ha-textfield { | ||
| width: 100%; | ||
| } | ||
| .title.alert { | ||
| margin-left: var(--ha-space-2); | ||
|
||
| } | ||
| `; | ||
| } | ||
|
|
||
|
|
||
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
Oops, something went wrong.
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.