Add 'Layout' Operation Link to entities

Created on 22 June 2023, over 1 year ago
Updated 28 August 2023, over 1 year ago

Problem/Motivation

Layout Builder Operation Link currently handles a very elementary use-case of adding a 'Layout' operation link to entities which can be customized via Layout Builder. Per a Slack thread on Layout Builder UX by @froboy,
, @larowlan suggested creating an issue to bring over Layout Builder Operation Link's functionality into core. So, this is that issue.

Steps to reproduce

tbd

Proposed resolution

Move 'Layout Builder Operations Link' functionality into core.
Create follow-up issue for Layout Builder Operations Link to deprecate functionality.

Remaining tasks

tbd

User interface changes

Adds a 'Layout' option to entities' Operations Links for those which can be customized via Layout Builder.

API changes

Data model changes

Release notes snippet

Feature request
Status

Needs work

Version

11.0 🔥

Component
Layout builder 

Last updated 1 day ago

Created by

🇺🇸United States Webbeh Georgia, USA

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @Webbeh
  • 🇺🇸United States Chris Burge

    In terms of scope, are the following items, provided Layout Builder Operation Link, in scope?

    • Accommodation of translations (e.g. Layout Builder Asymmetric Translation)
    • Removal the destination query parameter that is hardcoded by Drupal\views\Plugin\views\field\EntityOperations::render()

    My vote on the first is yes, because if we don't, then we'll still have a need for contrib module.
    My vote on the second is yes, because it's a bug workaround.

  • 🇫🇮Finland lauriii Finland

    To me, it seems fine to do both of the things mentioned in #2 👍

  • Assigned to Chris Burge
  • last update over 1 year ago
    Build Successful
  • last update over 1 year ago
    29,799 pass
  • Issue was unassigned.
  • Status changed to Needs work over 1 year ago
  • 🇺🇸United States Chris Burge

    Initial copying from the layout_builder_operation_link module is complete.

    Re layout_builder_install(), in order to rebuild operation links, the rendered cache needs cleared unconditionally. The same is true in the newly added layout_builder_uninstall() function. layout_builder_post_update_rerender_operation_links() is added to clear cache (again, to rebuild operation links).

    In the layout_builder.module file, two new functions are added: layout_builder_entity_operation() and layout_builder_preprocess_links(). I added them to the end of the file.

    The OperationLinkTest class provides test coverage. Right now, testLanguage() returns before doing anything. It relies on a contrib module (layout_builder_at), so it'll need rewritten to remove the contrib test dependency.

    Setting issue status to 'Needs work' for test coverage.

  • 🇦🇺Australia larowlan 🇦🇺🏝.au GMT+10

    Left a review even though this is still needs work, thanks for working on it!

  • First commit to issue fork.
  • last update over 1 year ago
    30,062 pass
  • 🇦🇺Australia acbramley

    Rebased and resolved the minor feedback + minor tidy ups. Not sure how to go about the language stuff though.

Production build 0.71.5 2024