-
Notifications
You must be signed in to change notification settings - Fork 969
fix: Fix links in Announcements #1934
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
Merged
Golodhros
merged 16 commits into
amundsen-io:main
from
deliveryhero:fix/links-in-announcements
Aug 11, 2022
Merged
Changes from 3 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
558b227
fix: Fix links in Announcements
ozandogrultan 7567b09
fix: Fix betterer errors
ozandogrultan cd12807
fix: Fix build
ozandogrultan 34096c4
fix: Use pointer-events instead of event handler
ozandogrultan bde1674
Revert: fix: Use pointer-events instead of event handler
ozandogrultan 95d7a94
Merge branch 'main' into fix/links-in-announcements
ozandogrultan fb11312
fix: Stop propagation in Announcement component
ozandogrultan 118f9df
fix: databuilder build
ozandogrultan 7ab143f
fix: Revert last commits
ozandogrultan fd8b506
fix: Stop propagation in Announcement component
ozandogrultan dcc6e7a
fix: Stop propagation in Announcement component
ozandogrultan 14b89a2
Revert fix: Stop propagation in Announcement component
ozandogrultan fafc68b
fix: Add onclick to Announcements allowed attributes
ozandogrultan 073d9a7
fix: Revert some changes
ozandogrultan 094b51d
fix: Use push instead of concat
ozandogrultan 792e89b
fix: Frontend tests
ozandogrultan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This creation of a fake button and adding a stop propagation handler to it seems a bit fishy to me.
Could we achieve the same effect by using CSS pointer-events?
Check in https://css-tricks.com/almanac/properties/p/pointer-events/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the link!
I've tried using
pointer-events
on both child and parent elements, however click event is always propagated to the Card component which results in following the navigation..Could you be more specific on how we can use
pointer-events
here?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is something like this: https://stackoverflow.com/a/46707009
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've tried this suggestion as well, but it didn't work either.. but I might be doing something wrong, I don't have much experience with
pointer-events
Another option in my opinion is that eventPropagation can be stopped on the SanitizedHtml level here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if we stop the propagation in the "html_content" level it also works, but for me it's just another workaround and doesn't solve the problem fully