Skip to content
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

Update UI and Add Move Card to a Dialogue #2282

Merged
merged 12 commits into from Dec 19, 2018
Merged

Update UI and Add Move Card to a Dialogue #2282

merged 12 commits into from Dec 19, 2018

Conversation

zsarnett
Copy link
Contributor

@zsarnett zsarnett commented Dec 12, 2018

gif

Updated

gif2

@ghost ghost assigned zsarnett Dec 12, 2018
@ghost ghost added the in progress label Dec 12, 2018
}
</style>
<paper-dialog with-backdrop opened>
<h2>Move card to view</h2>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Need to add Localize stuff

@balloob
Copy link
Member

balloob commented Dec 12, 2018

Screenshot if you change looks

@@ -52,6 +52,7 @@ documentContainer.innerHTML = `<custom-style>
--card-background-color: #ffffff;
--primary-background-color: #fafafa;
--secondary-background-color: #e5e5e5; /* behind the cards on state */
--edit-mode-header-background-color: #455a64; /* Edit Mode Changes Header Color */
Copy link
Member

Choose a reason for hiding this comment

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

I don't like having names about how colors are going to be applied. We have primary, accent, maybe we should have dark-background-color and dark-text-color ?

Copy link
Member

Choose a reason for hiding this comment

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

Or maybe we should define a theme for editing mode :D and apply that to the app-header ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

or
We could use var(--dark-primary-color) and fall back onto a set value

Copy link
Contributor Author

Choose a reason for hiding this comment

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

var(--dark-primary-color, #455a64);

Copy link
Member

Choose a reason for hiding this comment

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

We should change our values to HSL 😉

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We should actually. maybe someday Ill get bored enough to do that.

@zsarnett
Copy link
Contributor Author

gif


private _openedChanged(ev: MouseEvent) {
if (!(ev.detail as any).value) {
this._dialog.close();
Copy link
Member

Choose a reason for hiding this comment

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

I don't think this is necessary, as closing a dialog means you're setting opened to false. So when opened changes to false, it is already closed?

Copy link
Member

Choose a reason for hiding this comment

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

You could however set this._params to undefined and then have the render method return empty when params is not set. The nice thing about that is that we don't keep a dialog in memory when it's not being used. That way you can also just add opened to the rendered DOM, because we will render a new dialog when params are set.

@@ -36,6 +42,9 @@ class LovelaceFullConfigEditor extends hassLocalizeLitMixin(LitElement) {
></paper-icon-button>
<div main-title>Edit Config</div>
<paper-button @click="${this._handleSave}">Save</paper-button>
<ha-icon class="save-button ${classMap({
saved: this._saving! === false,
Copy link
Member

Choose a reason for hiding this comment

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

I think that the icon should hide again when a user starts typing, indicating that the current work is not saved.

src/resources/ha-style.js Outdated Show resolved Hide resolved
src/resources/ha-style.js Outdated Show resolved Hide resolved
@zsarnett
Copy link
Contributor Author

Is there a reason we arent using paper-textarea? Other than its deprecated? I couldnt get the change event to work for just text area

@balloob
Copy link
Member

balloob commented Dec 18, 2018

paper-textarea doesn't look good when used in a large area.

For textarea, listen to input event

@ghost
Copy link

ghost commented Dec 18, 2018

Hi
How we can change colors UI to activate editor as show on screen @zsarnett ? Default color UI is blue but he has other when go to editor....

@zsarnett
Copy link
Contributor Author

I swear I tried the input event... But it worked

@balloob balloob merged commit 79b71ed into dev Dec 19, 2018
@delete-merged-branch delete-merged-branch bot deleted the Update-card-UI branch December 19, 2018 12:08
@ghost ghost removed the in progress label Dec 19, 2018
@github-actions github-actions bot locked and limited conversation to collaborators Jul 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants