Skip to content

Add message.show usage in sample app#568

Open
ishita-gambhir-adobe wants to merge 1 commit intoadobe:stagingfrom
ishita-gambhir-adobe:shouldShowMessage
Open

Add message.show usage in sample app#568
ishita-gambhir-adobe wants to merge 1 commit intoadobe:stagingfrom
ishita-gambhir-adobe:shouldShowMessage

Conversation

@ishita-gambhir-adobe
Copy link
Contributor

Description

  • Update sample app with usage for message.show
  • Add usage for shouldShowMessage and shouldSaveMessage

Related Issue

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

Sample app update

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

shouldShowMessage: () => true,
shouldSaveMessage: () => true,
shouldShowMessage: msg => {
const msgId = msg.id; // use this message id to save the message in the cache
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it would be nice to have a toggle switch for shouldShow and shouldSave to set the boolean value.

};

const showMessage = async () => {
const messageId = 'MESSAGE_ID'; // replace MESSAGE_ID with the id of the message you want to show
Copy link
Contributor

Choose a reason for hiding this comment

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

we can have a global variable for saving message id which will save the latest saved message. In case we want to add a specific message I'd we have this comment to provide it here.

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.

3 participants