Skip to content

fix: download raw file

Warren Gifford requested to merge bee/fix-raw into main

Created by: abeatrix

Fix https://github.com/sourcegraph/sourcegraph/issues/33888

Issues

As mentioned in https://github.com/sourcegraph/sourcegraph/issues/33888, the button to download raw file is currently not working as clicking on the button does not redirect you to the file link, resulting in an empty page: image

The alignment is also off for the raw file download button at dropdown mode: image

Fixes

This PR updates the Raw file download button to open the file link in a new tab so that a download window would pop up instead: raw

The same setting is being used for the Go to Code Host button as well: link to code

Also fixes the alignment issue at smaller viewport width: image

Note

This PR allows the users to download the file after clicking on the Raw (download file) button and further discussion will need to be held if we would like to change the behavior so that a plaintext file will be opened in a new tab instead of the option to download (by updating the download option from true to false`).

Test plan

See image above

App preview:

Check out the client app preview documentation to learn more.

Merge request reports

Loading