Skip to content

Add edit/add/delete view#2172

Merged
balloob merged 7 commits intodevfrom
view-controls
Dec 4, 2018
Merged

Add edit/add/delete view#2172
balloob merged 7 commits intodevfrom
view-controls

Conversation

@bramkragten
Copy link
Copy Markdown
Member

@bramkragten bramkragten commented Dec 3, 2018

views
Closes: #1961 Closes: #1962 Closes: #1963

@ghost ghost assigned bramkragten Dec 3, 2018
@ghost ghost added the in progress label Dec 3, 2018
@ghost
Copy link
Copy Markdown

ghost commented Dec 3, 2018

Please also add strings to translation to we can start working on translating.

showEditViewDialog(this, {
add: true,
reloadLovelace: () => {
this.fire("config-refresh");
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I would like to do this._selectView(this.config.views.length - 1); to go to the newly created view, but I don't know when the config is loaded... Any way to tell? this._curView = this.config.views.length works but uhh 😬

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

could you add event detail to say "refresh and pick view" ?

@bramkragten
Copy link
Copy Markdown
Member Author

The translations are a breaking change :-(

.viewConfig="${this._params.viewConfig}"
.add="${this._params.add}"
@reload-lovelace="${this._params.reloadLovelace}"
@cancel-edit-view="${this._cancel}"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Do you have to remove the registration of these events with typescript?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I removed cancel-edit-view the other one is still used

@balloob balloob merged commit f680832 into dev Dec 4, 2018
@ghost ghost removed the in progress label Dec 4, 2018
@delete-merged-branch delete-merged-branch bot deleted the view-controls branch December 4, 2018 15:50
@balloob balloob mentioned this pull request Dec 5, 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.

Allow removing views Allow adding views Allow editing views

3 participants