Skip to content

feat: show messages for URL result exporters - #1731

Open
CenturySturgeon wants to merge 1 commit into
pinterest:masterfrom
CenturySturgeon:custom-redirect-message
Open

feat: show messages for URL result exporters#1731
CenturySturgeon wants to merge 1 commit into
pinterest:masterfrom
CenturySturgeon:custom-redirect-message

Conversation

@CenturySturgeon

Copy link
Copy Markdown

Summary

  • Allow URL result exporters to return an optional structured result with url, message and message_type.
  • Display the exporter message in the existing "export complete" modal while retaining the user clicked "View Export" action.
  • Preserve compatibility with exporters that return a plain URL string.

Test plan

  • make test
  • Verified structured URL results show a warning and open the supplied URL only after clicking "View Export".
  • Verified legacy plain string URL results still use the existing "export complete" modal flow.

Compatibility

Existing URL exporters may continue returning a plain string URL unchanged. The structured result is opt-in:

{
    "url": "https://example.com/export",
    "message": "Optional warning for the user",
    "message_type": "warning",
}

@raymondtieu raymondtieu left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

lgtm

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.

2 participants