Skip to content

Card Picker: Entity Picker#6693

Merged
zsarnett merged 14 commits intodevfrom
by-entity-picker
Sep 3, 2020
Merged

Card Picker: Entity Picker#6693
zsarnett merged 14 commits intodevfrom
by-entity-picker

Conversation

@zsarnett
Copy link
Contributor

Proposed change

778ad9417957c8db7a9cd570dab6b854

Type of change

  • New feature (thank you!)

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue:
  • Link to documentation pull request: TODO

Checklist

  • The code change is tested and works locally.
  • There is no commented out code in this PR.
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

@bramkragten
Copy link
Member

I think we should split create-card into it's own dialog. It is getting messy in dialog-edit-card now.

@zsarnett
Copy link
Contributor Author

I agree this is pretty crowded. Would you like me to do that in this PR or different one?

@bramkragten
Copy link
Member

This PR please

Comment on lines +193 to +199
if (this._params!.entities && this._params!.entities.length) {
if (Object.keys(config).includes("entities")) {
config.entities = this._params!.entities;
} else if (Object.keys(config).includes("entity")) {
config.entity = this._params!.entities[0];
}
}
Copy link
Member

Choose a reason for hiding this comment

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

Isn't this logic in the edit card dialog? As it is also used for the suggest card?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I dont know what you mean by this

Copy link
Member

Choose a reason for hiding this comment

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

You can just add entities to the options of showEditCardDialog.

Copy link
Member

Choose a reason for hiding this comment

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

Oh wait... create-card-dialog will open suggest-card-dialog and that will open create-card-dialog again and this logic kicks in?

Copy link
Member

Choose a reason for hiding this comment

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

But I don't see that in the code now, suggest card will open dialog-edit-card? Does it even work now?

Copy link
Member

@bramkragten bramkragten left a comment

Choose a reason for hiding this comment

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

Much cleaner!

@zsarnett zsarnett merged commit f3639c2 into dev Sep 3, 2020
@zsarnett zsarnett deleted the by-entity-picker branch September 3, 2020 23:28
@bramkragten bramkragten mentioned this pull request Sep 4, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Jul 5, 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.

3 participants