Skip to content
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: added new md component #1137

Merged
merged 9 commits into from
Dec 6, 2022
Merged

feat: added new md component #1137

merged 9 commits into from
Dec 6, 2022

Conversation

AceTheCreator
Copy link
Member

Implemented a new markdown component for rendering a list of profiles

Related to #1131

cc @magicmatatjahu

@netlify
Copy link

netlify bot commented Dec 2, 2022

Deploy Preview for asyncapi-website ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit d7e22b4
🔍 Latest deploy log https://app.netlify.com/sites/asyncapi-website/deploys/638f62b5da0e480008039b73
😎 Deploy Preview https://deploy-preview-1137--asyncapi-website.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@github-actions
Copy link

github-actions bot commented Dec 2, 2022

⚡️ Lighthouse report for the changes in this PR:

Category Score
🔴 Performance 27
🟠 Accessibility 88
🟠 Best practices 83
🟢 SEO 100
🔴 PWA 30

Lighthouse ran on https://deploy-preview-1137--asyncapi-website.netlify.app/


export default function Profile() {
const getContext = useContext(BlogContext);
const profiles = getContext.post.profiles
Copy link
Member

Choose a reason for hiding this comment

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

where are these profiles coming from?

why not have this component support props and you just provide data through props?

Copy link
Member Author

Choose a reason for hiding this comment

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

The profiles come from the post details...


title: "lorem ipsum"
profiles: "path/to/list/of/profiles

All you have to do in the md is to use the profile component

<Profile />

Copy link
Member Author

Choose a reason for hiding this comment

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

why not have this component support props and you just provide data through props?

If I Import the component in the markdown, how do i pass children in MD?

Copy link
Member

Choose a reason for hiding this comment

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

I'm just afraid passing data to component through metadata might not be super intuitive as we do it classical way always, like:

<YouTube id="Ni5tCY9r0TY" />

so component with props

look how next/previous works:

<DocsButton suggestions={[ { href:'/docs/concepts/consumer', type: 'back',
title: 'Consumer', }, { href:'/docs/concepts/message', type: 'next',
title: 'Message', } ]} />

so IMHO Profile should work same way, you add component with array of profiles

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for the update @derberg. updated the PR

Copy link
Member

@derberg derberg left a comment

Choose a reason for hiding this comment

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

@magicmatatjahu something from you? I do not want to approve before as you were called out first

@akshatnema
Copy link
Member

@AceTheCreator can I get any preview of this component in terms of UI? I don't see any place where this component is used right now in the master branch. Just give a sample screenshot if you can, no need to add the profile section details here.

@AceTheCreator
Copy link
Member Author

@AceTheCreator can I get any preview of this component in terms of UI? I don't see any place where this component is used right now in the master branch. Just give a sample screenshot if you can, no need to add the profile section details here.

@akshatnema it's actually nothing serious 😄

Is-Hacktoberfest-Good-For-Maintainers-AsyncAPI-Initiative-for-event-driven-APIs

Copy link
Member

@akshatnema akshatnema left a comment

Choose a reason for hiding this comment

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

@akshatnema
Copy link
Member

/rtm

@asyncapi-bot asyncapi-bot merged commit 882bec9 into asyncapi:master Dec 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants