Problem/Motivation

Since Builder panel has been renamed "Canvas" panel, I witness confusion to the people I was demoing to:

  • In Poland DrupalCamp in September
  • In Rotterdam DrupalCon early October
  • In French DrupalMeetup mid October

Each time, people publicly and verbally asked what the heck was going one here. In the Meetup, someone even believed i was demoing Canvas module from Acquia.

Canvas brand is too strong in the Drupal world. I am afraid we can't afford to confuse users like that.

Proposed resolution

I will do a proposal bringing "Builder" back, because it allows us to just rename the plugin label and the documentation, the classes and ID still being BuilderPanel, builder and BuilderPanelTest.

But any name proposal is welcomed.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

pdureau created an issue. See original summary.

mogtofu33’s picture

Related issues: +#3615493: Renaming cleanup
pdureau’s picture

Issue summary: View changes
Status: Active » Needs work

Changes done locally. Pushed, pipeline running

because it allows us to just rename the plugin label and the documentation,

I didn't know "Canvas" term has muscle in so many parts of the codebase (test names, HTML class names...). I was expecting it to be only in some user facing strings.

The diff may be scary ( 115 files changed, 726 lines changes), but most of the changes happened in comments, not in proper code. And 111 of the changed lines (15% of total) are displayBuilder.canvasFrame() calls.

What have been done

In code, in the order of importance.

User-facing:

  • BuilderPanel.php: the island label and iframe title "Canvas" → "Builder", and the shortcut help "Show the canvas" → "Show the builder".
  • Descriptions changed in ComponentLibraryPanel.php, PreviewPanel.php, ViewportSwitcher.php and HighlightToggle.php ("…for the canvas panel" → "…for the builder panel").

Backend code:

  • Class CanvasController → BuilderController, with its method canvas() → builder().
  • ThemeHooks.php: the private method isCanvasPage() → isBuilderPage()
  • Route display_builder.canvas_island → display_builder.builder_island, with its path /display-builder/canvas/{…} → /display-builder/builder/{…} and the controller reference.

Frontend code:

  • Libraries canvas_frame → builder_frame and canvas_frame_inner → builder_frame_inner, with their file paths, plus canvas_query.js → builder_query.js in display_builder.component.yml.
  • 5 asset files renamed (builder_frame.js/.css, builder_frame_inner.js/.css, builder_query.js).
  • CSS classes and DOM events: db-canvas-frame (with --buffer and -wrap), -preview (with --buffer), -drop-overlay, -insert-line and -refresh all became db-builder-*. The custom events db-canvas-refresh and db-canvas-dragend became db-builder-*.
  • Public API: Drupal.displayBuilder.canvasDocuments() → builderDocuments() and afterCanvasRefresh() → afterBuilderRefresh().
  • Behavior and once() ID: Drupal.behaviors.displayBuilderCanvasFrame → displayBuilderBuilderFrame, and the once('db-canvas-frame', …) ID → 'db-builder-frame'.
  • Expando properties: wrap.dbCanvas → wrap.dbBuilder and builder.dbCanvasMirror → builder.dbBuilderMirror.
  • Sortable group name: 'canvas' → 'builder' in builder_frame.js.

Tests:

  • Kernel tests: CanvasControllerTest → BuilderControllerTest (class, ->builder() calls, library names, the $canvas_page variable), and the expected URLs and libraries in BuilderPanelTest. ProfileViewBuilderTest and a few others have names in assertion messages or variables changed.
  • Playwright: Spec file: canvas_frame.spec.ts → builder_frame.spec.ts, and many occurrences in the file.
  • One word in each test module: display_builder.profile.test_frame.yml, display_builder.profile.test_secondary.yml and test_input.component.yml.

What have been kept

Mention of off-canvas mechanism from Core, and mentions of Acquia Canvas in FAQ.

pdureau’s picture

Assigned: pdureau » mogtofu33
Status: Needs work » Needs review

mogtofu33’s picture

Assigned: mogtofu33 » Unassigned
Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

pdureau’s picture

Has been shipped in beta9

pdureau’s picture

Status: Fixed » Closed (fixed)