-
-
Notifications
You must be signed in to change notification settings - Fork 126
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
feat: custom extension rendering #994
Open
ductaily
wants to merge
36
commits into
asyncapi:master
Choose a base branch
from
ductaily:feat/custom-extension-value-render
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+216
−11
Open
Changes from all commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
db17606
Custom extension value render
a52c230
Merge branch 'master' into feat/custom-extension-value-render
asyncapi-bot 22f07b3
Add parent to ExtensionComponentProps and move changes to Extensions …
18654d2
Merge remote-tracking branch 'origin/feat/custom-extension-value-rend…
9b978b8
Address Sonar issue
de451e8
Merge branch 'master' into feat/custom-extension-value-render
ductaily 13a8a6c
Apply suggestions from code review
ductaily 23401a9
Clean up Extension class
6c4f19f
Merge branch 'refs/heads/master' into feat/custom-extension-value-render
37bc952
Merge branch 'master' into feat/custom-extension-value-render
ductaily 3b19209
Merge remote-tracking branch 'origin/feat/custom-extension-value-rend…
95bfa86
Merge branch 'master' into feat/custom-extension-value-render
derberg 8492e7a
Merge branch 'master' into feat/custom-extension-value-render
asyncapi-bot 389e407
Merge remote-tracking branch 'origin/feat/custom-extension-value-rend…
973c1da
Address eslint errors
4b03c14
Fix handling of concatenatedConfig for extensions
3b548f5
Add config modification docs
cae5861
Add test
8caea6e
Add example for x-x extension
f986398
Add viewBox to x logo
979777d
Merge branch 'master' into feat/custom-extension-value-render
ductaily a34f50a
Update package-lock.json
32cf262
Fix lint error
c630f89
Merge branch 'master' into feat/custom-extension-value-render
pavelkornev eed70c4
Merge branch 'refs/heads/master' into feat/custom-extension-value-render
350646a
Merge remote-tracking branch 'origin/feat/custom-extension-value-rend…
d91df2a
Merge branch 'master' into feat/custom-extension-value-render
ductaily 3e57a3f
Add x-x extensions example.
1740980
Merge branch 'master' into feat/custom-extension-value-render
asyncapi-bot 361a2c2
Merge branch 'master' into feat/custom-extension-value-render
ductaily aa7423b
Merge branch 'master' into feat/custom-extension-value-render
pavelkornev 8384cd8
Merge branch 'master' into feat/custom-extension-value-render
3563ab1
Add x-x extensions example in info component
df932da
Merge branch 'master' into feat/custom-extension-value-render
AceTheCreator a25f1d2
Address review comments
ec52216
Merge remote-tracking branch 'origin/feat/custom-extension-value-rend…
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 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import React from 'react'; | ||
|
||
import { ExtensionComponentProps } from '../../types'; | ||
|
||
/** | ||
* See <https://github.com/asyncapi/extensions-catalog/blob/master/extensions/x.md>. | ||
*/ | ||
export default function XExtension({ | ||
propertyValue, | ||
}: ExtensionComponentProps<string>) { | ||
const onClickHandler = () => { | ||
window.open(`https://x.com/${propertyValue}`, '_blank'); | ||
}; | ||
|
||
return ( | ||
<div | ||
title={`https://x.com/${propertyValue}`} | ||
style={{ display: 'inline-block' }} | ||
> | ||
<svg | ||
onClick={onClickHandler} | ||
style={{ cursor: 'pointer' }} | ||
width="15px" | ||
height="15px" | ||
viewBox="0 0 1200 1227" | ||
fill="none" | ||
xmlns="http://www.w3.org/2000/svg" | ||
> | ||
<path | ||
d="M714.163 519.284L1160.89 0H1055.03L667.137 450.887L357.328 0H0L468.492 681.821L0 1226.37H105.866L515.491 750.218L842.672 1226.37H1200L714.137 519.284H714.163ZM569.165 687.828L521.697 619.934L144.011 79.6944H306.615L611.412 515.685L658.88 583.579L1055.08 1150.3H892.476L569.165 687.854V687.828Z" | ||
fill="black" | ||
/> | ||
</svg> | ||
</div> | ||
Comment on lines
+16
to
+34
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Out of curiosity why aren't we wrapping it an anchor tag? |
||
); | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
I think for best practices we should include the
noopener,noreferrer
attribute