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

PSA-2507 : Add new attribute hint to Function parameters #89

Merged
merged 3 commits into from
Aug 25, 2022

Conversation

achautha
Copy link
Contributor

Summary

PSA-2507 - For function parameters, we are introducing a new attribute hint . This can be used to display warnings or any text that is in addition to title, description and it will be displayed under the input field.

Refer this Tech spec for the details.

Testing

  1. Create a new Hermes app ( reverse string template ), Add hint attribute to Reverse string function param.
export const ReverseFunction = DefineFunction({
  callback_id: "reverse_hint",
  title: "Reverse hint",
  description: "Takes a string and reverses it",
  source_file: "functions/reverse.ts",
  input_parameters: {
    properties: {
      stringToReverse: {
        type: Schema.types.string,
        description: "The string to reverse",
        hint: "Some random hint",
      },
    },
    required: ["stringToReverse"],
  },
  output_parameters: {
    properties: {
      reverseString: {
        type: Schema.types.string,
        description: "The string in reverse",
      },
    },
    required: ["reverseString"],
  },
});

  1. import_map.json to point to local SDK
  2. Deploy app to a dev workspace
  3. Check output of functions.list on the same workspace and see hint parameter appears in the Reverse String function.

Requirements (place an x in each [ ])

@achautha achautha requested a review from a team as a code owner August 25, 2022 06:22
@CLAassistant
Copy link

CLAassistant commented Aug 25, 2022

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ selfcontained
❌ Atharva Chauthaiwale


Atharva Chauthaiwale seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@codecov
Copy link

codecov bot commented Aug 25, 2022

Codecov Report

Merging #89 (7050d73) into main (70f29a2) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main      #89   +/-   ##
=======================================
  Coverage   96.10%   96.10%           
=======================================
  Files          41       41           
  Lines        1565     1565           
  Branches       87       87           
=======================================
  Hits         1504     1504           
  Misses         59       59           
  Partials        2        2           

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Contributor

@selfcontained selfcontained left a comment

Choose a reason for hiding this comment

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

Thanks!

@selfcontained selfcontained merged commit 8f53935 into main Aug 25, 2022
@selfcontained selfcontained deleted the ac-function-param-hint branch August 25, 2022 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants