italia / developers.italia.it

The developer community designing and developing public digital services in Italy
https://developers.italia.it
BSD 3-Clause "New" or "Revised" License
231 stars 116 forks source link

Create component for platform details page buttons row #1462

Open smonolo opened 5 months ago

smonolo commented 5 months ago

Is your feature request related to a problem? Please describe.

Each platform has its own details page, and almost all of them have a set of buttons that bring to the same or similar links. At the moment, each page has a copy of the buttons row that stands on its own, repeated dozens of times.

Describe the solution you'd like

Goal is to create an include that accepts a few props, that renders the row. This way the repeated code would be removed and everything could be managed in the new component, making it quicker and easier to add new things as needed.

Describe alternatives you've considered

N/A

Additional context

18app details page:

image

Gagan20-vis commented 4 months ago

Hi @smonolo , according to the problem described, we need a component for a row of buttons that takes a few props and that we can reuse in different components. Is it correct?

smonolo commented 4 months ago

Hi @Gagan20-vis, thanks for you interest!

You are correct. As you can guess from what's described above, most software pages share a similar row of buttons. They are being placed in each file as a copy paste, and it would be nice to have a shared component that displays these buttons and takes a few props that will be passed by the software file itself, such as slackChannelLink for the software-specific Slack channel link, and so on.

It should be doable easily, but not sure how it would work with MD files. Feel free to ping me again if you have any questions.

Thanks!