amundsen icon indicating copy to clipboard operation
amundsen copied to clipboard

fix: Fix links in Announcements

Open ozandogrultan opened this issue 2 years ago • 2 comments

Signed-off-by: Ozan Dogrultan [email protected]

Fixes https://github.com/amundsen-io/amundsen/issues/1875

Summary of Changes

Previously, when there were links in the Announcement html content, they were overridden by the navigation of the Card component and when they were clicked, announcement list page was shown instead of the link itself.

The changes in the PR introduces the logic the stop bubbling up the click event to the Card component so that the link navigation works as expected.

Tests

No test change is needed.

Documentation

No documentation change is needed.

CheckList

Make sure you have checked all steps below to ensure a timely review.

  • [x] PR title addresses the issue accurately and concisely. Example: "Updates the version of Flask to v1.0.2"
  • [x] PR includes a summary of changes.
  • [x] PR adds unit tests, updates existing unit tests, OR documents why no test additions or modifications are needed.
  • [ ] In case of new functionality, my PR adds documentation that describes how to use it.
    • All the public functions and the classes in the PR contain docstrings that explain what it does

ozandogrultan avatar Jul 19 '22 20:07 ozandogrultan

cc @Golodhros

feng-tao avatar Jul 20 '22 05:07 feng-tao

@Golodhros could you review this please? 🙏🏼

ozandogrultan avatar Aug 09 '22 09:08 ozandogrultan

@Golodhros I've changed the fix strategy slightly with the latest changes. Now the only change is to allow onclick handlers to be customized in the sanitized announcement content, so stopping event propagation logic can be set if needed by the content which is passed. Can you please review again?

ozandogrultan avatar Aug 11 '22 11:08 ozandogrultan