microsoft / microsoft/AdaptiveCards

[Shared] We should stop using `0` as a sentinel value for `Image` `Width`/`Height`

Open
#5,781 0 comments 0 reactions 1 assignee View on GitHub

@paulcam206 is already working on this.

Since May 6, 2021.

Area-Incubation Request Task
Dominant language
C#
Stars
2k
Forks
595
Avg merge
1d 19h
Merged PRs (30d)
1

Description

We currently use 0 as a sentinel value for, at minimum Image's Width and Height. We should take a look at the various places that this behavior is used (I think Column might suffer from this as well) and move them over to using std::optional.

Image example:
https://github.com/microsoft/AdaptiveCards/blob/f85e5a5ccedeb77e4827470aad66944a94e7c0bb/source/shared/cpp/ObjectModel/Image.cpp#L206-L210

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.