Skip to content

Edit a table’s structure in the Content Editor

Enrique Alcántara requested to merge edit-table-structure-poc into master

What does this MR do?

This MR implements UI controls to edit the structure of a table in the Content Editor. It also introduces a slight change in the Markdown Typescale CSS to avoid list styles to overwrite the GlDropdownItem component styles.

Screenshots or Screencasts (strongly suggested)

This MR affects two areas of the application

Editing the structure of a table in the Content Editor

2021-08-18_12.20.26

Embedded Metrics in Markdown

Before After
Screen_Shot_2021-08-19_at_10.06.11_AM Screen_Shot_2021-08-19_at_5.48.30_AM

How to setup and validate locally (strongly suggested)

  • Edit a Wiki page in your local environment
  • Choose the Content Editor clicking the "Use the new editor" option.
  • Add a new table or just move the text cursor inside a cell of an existing table.
  • You should see the UI demonstrated in the gif above.

How to test the metrics dashboard CSS changes

This feature is difficult to test in a local environment. I recommend adding a live_debug statement to ee/spec/features/markdown/metrics_spec.rb to get a test environment with an example metrics dashboard:

diff --git a/ee/spec/features/markdown/metrics_spec.rb b/ee/spec/features/markdown/metrics_spec.rb
index c82586f7eab..cb283d37d19 100644
--- a/ee/spec/features/markdown/metrics_spec.rb
+++ b/ee/spec/features/markdown/metrics_spec.rb
@@ -103,6 +103,8 @@
         .to have_received(:new)
         .with(cluster, 'GET', 'query_range', hash_including('start', 'end', 'step'))
         .at_least(:once)
+
+      live_debug
     end
   end

You can run the test using the command bundle exec rspec ee/spec/features/markdown/metrics_spec.rb

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

Does this MR contain changes to processing or storing of credentials or tokens, authorization and authentication methods or other items described in the security review guidelines? If not, then delete this Security section.

  • 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 issue: #328759 (closed)

Edited by Enrique Alcántara

Merge request reports