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

Feature request: add support for readme.md display #25

Open
matus-m opened this issue Oct 29, 2021 · 14 comments
Open

Feature request: add support for readme.md display #25

matus-m opened this issue Oct 29, 2021 · 14 comments
Labels
enhancement New feature or request

Comments

@matus-m
Copy link

matus-m commented Oct 29, 2021

hi, thanks for the gitlab plugin.

This is a feature request to support rendering projects readme on the component entity page - as extra widget probably.
Backstage has its own techdocs plugin - but that fulfills different use case then a simple project readme.
The gitlab api provides a readme link in the api response as "readme_url" attribute. The idea is to simply fetch the file from the provided location and render it on the component page with markdown renderer.

Thanks

@satrox28
Copy link
Collaborator

satrox28 commented Oct 29, 2021

Hi @yntelectual thanks for using the plugin. Sure, will check it out on how we can be implemented as at times the docs content might be lengthy.

@satrox28 satrox28 added the enhancement New feature or request label Oct 29, 2021
@matus-m
Copy link
Author

matus-m commented Oct 30, 2021

@lackerman
Copy link

I recently created a custom README card plugin partially because the gitlab plugin did not have one and because I wanted to experience the joy/pain/emotions of building a backstage plugin. If y'all want help on this, I'd be happy to contribute.

@satrox28
Copy link
Collaborator

satrox28 commented Nov 2, 2021

@lackerman we just started working too, sure please contribute.

@satrox28
Copy link
Collaborator

satrox28 commented Nov 3, 2021

We have pushed our initial changes to readmecard branch, please take a look. @lackerman

@satrox28
Copy link
Collaborator

satrox28 commented Nov 9, 2021

@lackerman any thoughts on the code?.

@lackerman
Copy link

apologies for the delay folks. I'll take a look

@lackerman
Copy link

lackerman commented Nov 11, 2021

Hi @satrox28, I've found a few things which I've listed below

The following function is unused
https://github.com/loblaw-sre/backstage-plugin-gitlab/compare/readmecard#diff-114fb4a3888a2330e12cdfbed9ed5a559193e7ebaf2369451aecce70f38092f7R62-R65

The file path needs to be encoded, as per the Gitlab docs
https://github.com/loblaw-sre/backstage-plugin-gitlab/compare/readmecard#diff-a7882c8f358276f83848b82bcdba47fa4cec4a80ccb7b586069eafd1be9a854fR13

Images are not showing up in the README
Screenshot 2021-11-11 at 10 50 34

And the deep link doesn't appear to work. The link rendered does not include the project path
http://127.0.0.1:3000/gitlab.internal.com/-/blob/master/README.md
I see the use of backstage.io/managed-by-location but no reference to it in the docs.

Otherwise, it looks good, renders better than mine ;)

My only favour would be, could we make it a standalone component (perhaps all the widgets could be standalone) so that I could import them on whichever tab I wanted.

@matus-m
Copy link
Author

matus-m commented Nov 12, 2021

+1 for the standalone components - right now we either get all gitlab insights in single component or none, it would be great if we could, for example, just take CICD widget and put it on the entity main page. ANd for readme it definitely makes sense - readme is sth that we want to show as soon as possible, not only once user goes to gitlab tab. Thanks for the quick delivery btw

@matus-m
Copy link
Author

matus-m commented Dec 14, 2021

hi @satrox28 have you had any time to finish the work on this new feature and the export of individual components? Or is there a way we could help? Thanks

@satrox28
Copy link
Collaborator

satrox28 commented Dec 22, 2021

Hi @yntelectual

We got stuck with few other priorities but please feel to raise a PR if you would like to contribute.

We will for sure look in to it after the holidays.

@satrox28
Copy link
Collaborator

Hi @yntelectual @lackerman

Sorry, we still working on other features. Can you please give it a try.

@satrox28
Copy link
Collaborator

satrox28 commented Feb 11, 2022

Hi @yntelectual @lackerman
Exporting the individual cards is released on v0.1.21, please check the readme on how to use it.

@lackerman
Copy link

@satrox28 I tried it out and it worked without issue! Thank you so much!

I see the README card is not there yet. Do you need help on that one?

lackerman pushed a commit to lackerman/backstage-plugin-gitlab that referenced this issue Feb 17, 2022
As per the discussion on loblaw-sre#25
this is the work I did to enable this functionality with a custom
plugin.
lackerman pushed a commit to lackerman/backstage-plugin-gitlab that referenced this issue Feb 17, 2022
As per the discussion on loblaw-sre#25
this is the work I did to enable this functionality with a custom
plugin.

Signed-off-by: Leo Ackerman <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants