[PP1] Move the Edit buttonoutside the more actions drop down

Created on 30 October 2024, 5 months ago

Problem/Motivation

We moved the local tasks into the "More actions" drops-down as they are. The problem is that the main action to edit the content is hidden behind a the More actions drop down.

Proposed resolution

When ๐Ÿ“Œ Define the 3 areas the Top Bar will provide Active is ready, this issue is the next step: on the front-end, when the URL/page is rendering on a full viewmode of an entity (content, taxonomies,...), render the Edit button outside the More actions. See image 3.

This issue is to ONLY move the Edit button outside of the drop-down, not applying any of the other visual changes the image above is providing.

User interface changes

The Edit button will appear as the primary action outside the More actions drop-down.

Release notes snippet

๐Ÿ“Œ Task
Status

Postponed

Version

11.0 ๐Ÿ”ฅ

Component

navigation.module

Created by

๐Ÿ‡ช๐Ÿ‡ธSpain ckrina Barcelona

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @ckrina
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia kunalkursija Mumbai

    Getting started on this one locally.
    Note: #3484564 is the dependency and this issue's MR can only be raised once the parent is done.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia kunalkursija Mumbai

    Changing the version to 11.x-dev so that the Issue fork gets created from 11.x branch.

  • ๐Ÿ‡จ๐Ÿ‡ฆCanada m4olivei Grimsby, ON

    Removing the postponed title prefix as ๐Ÿ“Œ Define the 3 areas the Top Bar will provide Active is merged to 11.x.

  • ๐Ÿ‡ช๐Ÿ‡ธSpain ckrina Barcelona

    Adding the "Drupal CMS release target" to see if we could hopefully get to it.

  • ๐Ÿ‡ช๐Ÿ‡ธSpain ckrina Barcelona

    Also adding Navigation stable blocker

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia kunalkursija Mumbai

    I have been working on this issue and have so far completed rendering the edit button and adding partial styles. Some more styling work is pending and then will be raising the MR for this.

  • Pipeline finished with Failed
    3 months ago
    Total: 169s
    #377868
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia kunalkursija Mumbai

    Looks like the MR has conflicts due to changes in Plugins, Hooks & Test files. I will have to look into this and update the MR accordingly.

  • Pipeline finished with Failed
    3 months ago
    Total: 148s
    #378032
  • Pipeline finished with Failed
    3 months ago
    Total: 119s
    #378036
  • Pipeline finished with Failed
    3 months ago
    Total: 153s
    #378048
  • Pipeline finished with Failed
    3 months ago
    Total: 112s
    #378075
  • Pipeline finished with Failed
    3 months ago
    Total: 111s
    #378081
  • Pipeline finished with Failed
    3 months ago
    Total: 183s
    #378084
  • Pipeline finished with Failed
    3 months ago
    Total: 134s
    #378090
  • Pipeline finished with Failed
    3 months ago
    Total: 3043s
    #378096
  • Assigned to kunalkursija
  • Status changed to Needs review 3 months ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia kunalkursija Mumbai

    I have resolved most of the pipeline issues except the PerformanceTest that's failing. Below are the different messages that I have been getting:

    Line 75: Failed asserting that 59 is identical to 61.
    Line 78: Failed asserting that 1 is identical to 2.
    Line 79: Failed asserting that 27 is identical to 29.
    Line 83: Failed asserting that 90360 is less than 90000.

    Question: I noticed that core/tests/Drupal/Tests/PerformanceTestTrait.php calculates these values, but I'm unclear whether these numbers are updated based on specific criteria or the incoming test data. Could someone provide clarification?

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia sagarmohite0031

    Hello,
    Tested and verified on Drupal 11,
    MR applied successfully.
    Attaching before and after screenshots

  • ๐Ÿ‡จ๐Ÿ‡ญSwitzerland berdir Switzerland

    Left a review about the edit link idenfication.

    > Question: I noticed that core/tests/Drupal/Tests/PerformanceTestTrait.php calculates these values, but I'm unclear whether these numbers are updated based on specific criteria or the incoming test data. Could someone provide clarification?

    It's no so much calculated, it's just what's the current expectation. If we add more CSS, then we have to increase the expectation. What's interesting is that this *lowers* the amount of cache gets/sets. That is generally good and we can just lower the values. It would be good to understand and write down which cache operations aren't happening anymore.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia anjali rathod India
  • Pipeline finished with Failed
    3 months ago
    Total: 1755s
    #389566
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia anjali rathod India
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia roshni upadhyay

    roshni upadhyay โ†’ made their first commit to this issueโ€™s fork.

  • Pipeline finished with Failed
    3 months ago
    Total: 523s
    #397410
  • First commit to issue fork.
  • Pipeline finished with Failed
    3 months ago
    Total: 553s
    #397681
  • Pipeline finished with Canceled
    3 months ago
    Total: 82s
    #397978
  • Pipeline finished with Failed
    3 months ago
    Total: 417s
    #397979
  • ๐Ÿ‡ซ๐Ÿ‡ฎFinland lauriii Finland
  • Pipeline finished with Canceled
    3 months ago
    Total: 99s
    #398600
  • Pipeline finished with Failed
    3 months ago
    Total: 521s
    #398602
  • Pipeline finished with Failed
    2 months ago
    Total: 503s
    #400797
  • Pipeline finished with Failed
    2 months ago
    Total: 101s
    #400907
  • ๐Ÿ‡จ๐Ÿ‡ญSwitzerland berdir Switzerland

    Does it make sense to postpone this on the title issue? If I understand this correctly, that one introduces an API method to fetch the current entity for which to display the title and the same logic could be applied as to when the edit button should be displayed. I think it makes sense if those two things are in sync. We should only have an Edit button if there is a title that displays for what that button?

  • ๐Ÿ‡ท๐Ÿ‡ธSerbia finnsky

    Gonna work on it

  • Pipeline finished with Failed
    2 months ago
    Total: 106s
    #401207
  • ๐Ÿ‡ท๐Ÿ‡ธSerbia finnsky

    At the moment, the module is still experimental.
    We are still waiting for the final design.
    We are still waiting for the icon system.

    The task description says

    This issue is to ONLY move the Edit button outside of the drop-down, not applying any of the other visual changes to the image above is providing.

    So there is no need to make it fully consistent with the image. It is enough to just add the markup and roughly understand how it will work afterwards.

    And even more so, there is no need to add deeply nested CSS that will be impossible to clean up later without significant effort

    Also, there is no need to add new icons. In particular, the Pencil was already there. Let it be different, but there will not be many icons with the same meaning when we switch to the icon API. (I hope soon)
    I also took the icon of three dots from https://phosphoricons.com/ where all the other icons came from.

    I also think that there is no point in adding backend tests based on visual styles, for example, the icon type, but this is not my area and I did not change it.

    @plopesc could you please review backend after rebase?

  • Pipeline finished with Failed
    2 months ago
    Total: 675s
    #401232
  • Pipeline finished with Failed
    2 months ago
    Total: 332s
    #401400
  • ๐Ÿ‡ช๐Ÿ‡ธSpain plopesc Valladolid

    Does it make sense to postpone this on the title issue? If I understand this correctly, that one introduces an API method to fetch the current entity for which to display the title and the same logic could be applied as to when the edit button should be displayed. I think it makes sense if those two things are in sync. We should only have an Edit button if there is a title that displays for what that button?

    Both issues are related but not essentially depends one on the other, I think. Here we make use of $this->navigationRenderer->hasLocalTasks() and that method has been moved to a new service in ๐Ÿ“Œ [PP1] Show entity information on the Top Bar Postponed . If we merge that one first, we will need to make some adjustments here and vice-versa. Agree that things would be simpler here if we merge that one first, though.

    We could postpone this one to have a better separation of concerns.

  • Pipeline finished with Failed
    2 months ago
    Total: 487s
    #401431
  • ๐Ÿ‡ซ๐Ÿ‡ฎFinland lauriii Finland

    ๐Ÿ“Œ [PP1] Show entity information on the Top Bar Postponed has landed so I think we're good to proceed here ๐Ÿš€

  • Pipeline finished with Failed
    2 months ago
    Total: 424s
    #402667
  • Pipeline finished with Success
    2 months ago
    Total: 817s
    #402680
  • Pipeline finished with Success
    2 months ago
    Total: 318s
    #402850
  • ๐Ÿ‡ซ๐Ÿ‡ฎFinland lauriii Finland

    I think this is looking good. I made minor tweaks to the design to make it match the original design a bit more.

    Few follow-ups that we need to open:

    1. Removing the current active local task from the more actions
    2. Showing the Edit button as the primary action when viewing a forward revision
  • Pipeline finished with Success
    2 months ago
    Total: 785s
    #402982
  • ๐Ÿ‡จ๐Ÿ‡ญSwitzerland berdir Switzerland

    > Showing the Edit button as the primary action when viewing a forward revision

    FWIW, that should be pretty trivial, just need extend the route match to allow canonical or latest_version: (canonical|latest_version). If we also want to cover it with tests then it might get more complicated.

    • nod_ โ†’ committed b8ed4811 on 11.x
      Issue #3484575 by plopesc, kunalkursija, lauriii, finnsky, anjali rathod...
  • ๐Ÿ‡ซ๐Ÿ‡ทFrance nod_ Lille

    the dots are way too small for me, but that's subjective, no need to hold this up longer

    Committed b8ed481 and pushed to 11.x. Thanks!

  • ๐Ÿ‡จ๐Ÿ‡ญSwitzerland berdir Switzerland

    Thought I commented about this yesterday, follow-up issue then: ๐Ÿ› navigation top bar edit button has strange active (?) colors Active

  • ๐Ÿ‡ช๐Ÿ‡ธSpain plopesc Valladolid

    Created follow-up ๐Ÿ› Navigation Top Bar should Edit button as the primary action when viewing a forward revision Active to address the Latest version page behavior.

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024