cucumber / react-components

React components for Cucumber
MIT License
32 stars 10 forks source link

add ability to download unsupported attachments #333

Closed davidjgoss closed 1 year ago

davidjgoss commented 1 year ago

šŸ¤” What's changed?

For attachments that aren't a video, image or text, we previously rendered an error message about the attachment being unsupported.

This PR changes the behaviour so we instead render a button to download the attachment as a file. It:

image

It also includes some slight rework in the Gherkin document accordion, so a panel is only rendered when it's expanded - previously this was just hidden by way of display: none. This means we don't render components unless the user is going to see them, and also that any generated download URLs are cleaned up when a panel is closed.

āš”ļø What's your motivation?

Fixes #80.

šŸ·ļø What kind of change is this?

šŸ“‹ Checklist:


This text was originally generated from a template, then edited by hand. You can modify the template here.