Skip to content

Conversation

@dobby5
Copy link

@dobby5 dobby5 commented Nov 9, 2025

  • Fixed the bug that left a margin on the left and right sides. (Mobile view)
  • Fixed the responsive behavior.
  • Now the distance between the popup and the browser window is calculated and transferred to the mobile view.
  • Fixed scrolling
  • The background no longer scrolls when you continue scrolling at the end or beginning of the popup.
  • Minor design adjustments

… view)

Fixed the responsive behavior.
Now the distance between the popup and the browser window is calculated and transferred to the mobile view.
Fixed scrolling
The background no longer scrolls when you continue scrolling at the end or beginning of the popup.
Minor design adjustments
@dobby5
Copy link
Author

dobby5 commented Nov 11, 2025

Hey @thomasloven, would you give me some feedback? I've implemented some of your requests.

@dcapslock
Copy link
Collaborator

Hi @dobby5, you responded to my requests. Busy this week and I should be able to look at later in the week.

Copy link
Collaborator

@dcapslock dcapslock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you again for refining the PR to this stage. However there is still is so much irrelevant changes in this PR that it is impossible to review. Comments left so far are to do with all the irrelevant changes and in some cases where a bug is introduced. I am fearful there are more bugs introduced that I cannot see.

Also, I see that you are abstracting the concept of dialog width from styles. This is not the approach needed. Diaolog width is part of styles. If the PR was focussed just on this part I might be able to give relevant feedback. However as to all the irrelevant changes, it is hard to pick out what is specifically regarding the dialog sizing.

I have stopped reviewing at this stage. Please confine this PR to the exact elements required to address the dialog alignment. Thank you.

ev.preventDefault();
let properties = { ...cardConfig }
delete properties.card;
window.browser_mod?.service("popup", {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is reverting a recent fix. Please update your branch.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

import { BrowserModTileCardEditor } from "./tile-card-editor";
import structuredClone from "@ungap/structured-clone";
import { getLovelaceRoot } from "../../helpers";
import { LovelaceGridOptions, LovelaceCard } from "../../types/types";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to move types.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not necessary, but it would be nice, because it would mean that the project would at least follow the structural standards to some respects.


export function setCustomElementClass(dialogTag: string): void {
if (customElementClassCache[dialogTag]) {
// Check if already registered in customElements registry (not just cache)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All these changes for custom class are unneccessary. If they are to fix any issue (unlikely) then please submit as separate PR.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay

tsconfig.json Outdated
"experimentalDecorators": true
}
}
},
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes only needed as you moved types. Leave types as is, or if critical to move, subit a separate PR moving types and updating build CI files.


export interface HaButtonElement extends HTMLElement, HaButtonProps { }

export type DialogWidth = "small" | "medium" | "large" | "full";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am yet to look at this in detail, but a DialogWidth goes against the concept that the width of the dialog is part of the style. Please make sure you understand the relationship of dialog width being part of style and not an isolated feature.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we are talking at cross-purposes, or perhaps expectations have changed over time. If that is the case, please let me know.

You originally wanted to adopt ha-wa-dialoge. If you take a look at the code, you will see that those types are integrated.
I have no idea what you will do with the types in the future, and I don't care.

Currently, it is used to calculate the dialog size. Until ha-wa-dialoge is used for the dashboard, this will remain a workaround.

flex: 1;
}
:host([card]) .content .container {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As you have changed card from a refectled property to _card, this syle will never be applied. So a bug introduced here due to the irrelevant changes you are applying without full understanding of their consequences.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Paste mistake. Thank you.

@state() _popupStyles: PopupStyle[] = [];
@state() _formdata: any;
@state() _formDataValid: boolean = true;
@state() _card: boolean = false;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change from card to _card has styling consequences. Another irrelevant changes, and in this case I can immediately see it will introduced a bug.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not irrelevant when working with standardization. Often, the difference between state, property, private, and public was not recognized or understood, but this is being fixed here.

A little tip in this regard: The Home Assistant frontend code is very nicely structured and invites you to learn from it.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be helpful if you could tell me which bug you are seeing so that it can be fixed.

@property({ type: String }) width: DialogWidth = "medium";
@property({ type: Boolean }) preventScrimClose: boolean = false;
@property({ type: String }) headerTitle: string = "";
@property({ type: String }) headerSubtitle: string = "";
Copy link
Collaborator

@dcapslock dcapslock Nov 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is headerSubtitle and headerSubtitlePosition used?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See above: Preparation for adoption ha-wa-dialog

card.addEventListener("ll-rebuild", () => {
this._build_card(config);
});
} catch (error) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No. This is not required. The error is caught by Frontend which will display error title and details in preview mode, and 'Configuration error' otherwise.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed

}
});
}
if (changedProperties.has("_narrow")) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just make 'narrow` refelected attribute.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No Idea what you mean exactly but maybe this...

@dcapslock
Copy link
Collaborator

@dobby5 will review later this week or over the weekend when time permits.

@dobby5
Copy link
Author

dobby5 commented Nov 25, 2025

@dobby5 will review later this week or over the weekend when time permits.

Do you have any Feedback for me?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants