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

Add Id property to all elements and actions #493

Closed
5 of 6 tasks
dclaux opened this issue Jul 19, 2017 · 10 comments
Closed
5 of 6 tasks

Add Id property to all elements and actions #493

dclaux opened this issue Jul 19, 2017 · 10 comments

Comments

@dclaux
Copy link
Member

dclaux commented Jul 19, 2017

Implementation status

Problem

  • Some hosts, especially those that support Action.Http, might need an easy way to correlate an action from the client to its counterpart on the server. Such hosts will likely use an Id property on actions (added after the card is received) anyway, so we might as well make it official
  • Still in the context of Action.Http, where the response to a POST call might contain instructions for the host replace all or a portion of a card with new content, having an Id property available on elements would make it easy to remove an element from a card's element tree and insert a new one.

Solution

Add the following property on all element and action types

Property Type Description
Id string Uniquely identifies the element or action within a card. If duplicate Ids are used in a given card, the first occurrence "wins."
@matthidinger
Copy link
Member

matthidinger commented Jul 19, 2017

The concept sounds good to me. So this would not be a required property then?

@dclaux
Copy link
Member Author

dclaux commented Jul 19, 2017

It will be at the discretion of hosts. Some hosts might want to make the Id property of an action required, some might not. I don't think the Id property of an element would be required at all.

@tomlm
Copy link
Contributor

tomlm commented Aug 3, 2017

works for me too.

@matthidinger matthidinger modified the milestones: v1.0-beta, v1.1 Sep 15, 2017
@matthidinger
Copy link
Member

@riarenas did we already add this to UWP by chance?

@riarenas
Copy link
Member

This is done in UWP for Actions and CardElements. Should this apply to elements that only exist inside specific containers such as choices, facts and columns?

@riarenas
Copy link
Member

According to the current schema documentation, column should have an id, but choice and fact should not. Shared model and UWP renderer all reflect that.

@matthidinger
Copy link
Member

That's how it is in C# as well, since Fact and Choice are not "typed" elements which is where we added the Id property.

@matthidinger matthidinger modified the milestones: v1.1, v1.0 Nov 13, 2017
@khouzam khouzam removed this from the v1.0 milestone Nov 30, 2017
@dclaux
Copy link
Member Author

dclaux commented Apr 5, 2018

This seems to be done across the board, closing.

@dclaux dclaux closed this as completed Apr 5, 2018
@dclaux dclaux mentioned this issue Jul 22, 2018
6 tasks
@andrewleader
Copy link
Contributor

Looks like this never was documented, re-opening till that's complete

image

@andrewleader andrewleader reopened this Jul 22, 2018
@RebeccaAnne RebeccaAnne added this to the Backlog milestone Jul 24, 2020
@RebeccaAnne RebeccaAnne removed this from the Backlog milestone May 6, 2021
@RebeccaAnne
Copy link
Contributor

This is documented in main and will go out with the next website deployment.

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

No branches or pull requests

7 participants