Skip to content

Use BlobHeader vue component for repo files

Samantha Ming requested to merge 323210-vue-blob-header into master

Issue: #323210 (closed)

MR Changes
This MR Name (Copy File Path)
This MR File Size
!60986 (merged) Edit Link Button
TBD Web IDE Link Button
TBD Edit/Web IDE Consolidated Buttons
!60975 (closed) Lock
TBD Replace
TBD Delete
This MR Viewer Switcher
This MR Copy content
This MR Open Raw link button
This MR Download link Button

What does this MR do?

This MR updates the Repository Files to use the shared Vue BlobHeader component. There are no UI or functionality changes. This is a bigger effort to convert the entire Repository Files Blob from HAML to Vue (YAY Vue 💚)

Simple View (no view switcher buttons) Rich View (has view switcher buttons)
image image

🏗 Follow-up MRs

  • There is an Uncaught error when the copy button is pressed (also exists in production), here's the follow up issue > #329837 (closed)
  • The "Copy file contents" button isn't working, this is because we're using a new monaco editor for our content (which is different than the current editor setup), here's the follow up issue so it works with the monaco editor > #329843 (closed)
  • The blob content for rich markdown file is not displaying perfectly (spacing is off), but it will be addressed in a future MR. This MR series is focused on the Blob Header only.

Testing Case

This feature is behind a feature flag, to turn on:

rails c

Feature.enable(: refactor_blob_viewer)
  1. Navigate to Repository > Files

Simple Viewer

  1. Click on a non-markdown file.

image

Rich Viewer

  1. Click on a markdown file.
Simple Rich
image image

blob-header-markdown

Screenshots (strongly suggested)

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team

Related to #323210 (closed)

Edited by Samantha Ming

Merge request reports