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

[UWP][Fallback Requirements] Change requirements handling from a function to a property #3409

Closed
RebeccaAnne opened this issue Aug 28, 2019 · 2 comments · Fixed by #3421
Closed

Comments

@RebeccaAnne
Copy link
Contributor

RebeccaAnne commented Aug 28, 2019

Platform

What platform is your issue or question related to? (Delete other platforms).

  • UWP

Details

Currently IAdaptiveCardElement has a MeetsRequirements() method on it to determine whether the element meets its requirements. For our known types, a single implementation exists in the base class that is used by all elements. For custom types, however, defining the requirement handling this way requires custom type developers to provide their own implementation of MeetsRequirements for their type.

To address this, we should change the MeetsRequirements function to a Requirements property which simply contains the requirements. We can then run our logic on that property to determine if it meets the requirements, removing the need from third party developers to understand and re-implement that logic in their own types.

@RebeccaAnne RebeccaAnne self-assigned this Aug 28, 2019
@ghost ghost added the Triage-Needed label Aug 28, 2019
@ghost ghost added this to Needs triage in Bug Triage Aug 28, 2019
@ghost ghost moved this from Needs triage to Approved in Bug Triage Aug 28, 2019
@ghost ghost removed the Triage-Needed label Aug 28, 2019
@RebeccaAnne RebeccaAnne changed the title [UWP][Fallback Requirements] Change requirements handling from a function to a property [UWP/Shared Model][Fallback Requirements] Change requirements handling from a function to a property Aug 28, 2019
@RebeccaAnne RebeccaAnne changed the title [UWP/Shared Model][Fallback Requirements] Change requirements handling from a function to a property [UWP][Fallback Requirements] Change requirements handling from a function to a property Aug 28, 2019
@RebeccaAnne
Copy link
Contributor Author

The current design also prevents callers from adding requirements programmatically using the object model.

@ghost ghost added the Status-In Code Review label Sep 4, 2019
@ghost ghost moved this from Approved to In Code Review in Bug Triage Sep 5, 2019
Bug Triage automation moved this from In Code Review to Closed Sep 6, 2019
@shalinijoshi19 shalinijoshi19 added this to the 1.3 Schema Refresh milestone Aug 4, 2020
@microsoft microsoft deleted a comment Aug 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Bug Triage
  
Closed
Development

Successfully merging a pull request may close this issue.

2 participants