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

fix: Make props of ConnectionState optional #7093

Merged
merged 1 commit into from
May 18, 2023
Merged

Conversation

cshaa
Copy link
Contributor

@cshaa cshaa commented May 15, 2023

The basics

  • I branched from develop
  • My pull request is against develop
  • My code follows the style guide
  • I ran npm run format and npm run lint

The details

Proposed Changes

Makes props in ConnectionState optional, so that the code in documentation works.

Behavior Before Change

Previously, one had to specify both block and shadow and write undefined into one of them:

{
  "kind": "flyoutToolbox",
  "contents": [
    {
      "kind": "block",
      "type": "controls_for",
      "inputs": {
        "FROM": {
          "block": {
            "type": "math_number",
            "fields": {
              "NUM": 1
            },
            "shadow": undefined, // error if omitted
          }
        },
        // ...
      }
    },
  ]
}

Behavior After Change

Now we can use the code written in the documentation:

{
  "kind": "flyoutToolbox",
  "contents": [
    {
      "kind": "block",
      "type": "controls_for",
      "inputs": {
        "FROM": {
          "block": {
            "type": "math_number",
            "fields": {
              "NUM": 1
            }
          }
        },
        // ...
      }
    },
  ]
}

Reason for Changes

This way it is both more convenient and matches the documentation better.

@cshaa cshaa requested a review from a team as a code owner May 15, 2023 18:59
@cshaa cshaa requested a review from maribethb May 15, 2023 18:59
Copy link
Contributor

@maribethb maribethb left a comment

Choose a reason for hiding this comment

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

Thank you for the PR!

@maribethb maribethb changed the title Make props of ConnectionState optional fix: Make props of ConnectionState optional May 18, 2023
@conventional-commit-lint-gcf
Copy link

conventional-commit-lint-gcf bot commented May 18, 2023

🤖 I detect that the PR title and the commit message differ and there's only one commit. To use the PR title for the commit history, you can use Github's automerge feature with squashing, or use automerge label. Good luck human!

-- conventional-commit-lint bot
https://conventionalcommits.org/

@github-actions github-actions bot added the PR: fix Fixes a bug label May 18, 2023
@maribethb maribethb merged commit d3939f7 into google:develop May 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: fix Fixes a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants