Duplicate "Hide descriptions" links at the bottom of the page.

Created on 9 February 2023, almost 2 years ago
Updated 18 January 2024, 11 months ago

Problem/Motivation

Duplicate "Hide description" links are being displayed at the bottom of the permissions table.

Proposed resolution

Patching FpaFormBuilder.php to hide the duplicate links.

User interface changes

Showing the same "Hide descriptions | Show system names" like what we have on top of the permission table for good user experience.

🐛 Bug report
Status

Needs review

Version

4.0

Component

User interface

Created by

🇮🇳India gskharmujai

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

Merge Requests

Comments & Activities

  • Issue created by @gskharmujai
  • 🇮🇳India gskharmujai

    In addition to the existing UI issues, the "Hide descriptions | Show system names" links dosent seem to work for D9.5.3.

    On clicking these links, they appear to be triggered twice and the second click action reverts the supposed action to add a toggle class which will make the functionality work.

  • First commit to issue fork.
  • Status changed to Needs review over 1 year ago
  • 🇩🇪Germany marcoliver Neuss, NRW, Germany

    Hi!

    I've opened an issue fork / a merge request which does the following:

    • removes the Core Hide descriptions link at the bottom of the list
    • duplicates the custom Hide links at the bottom of the list
    • ensures the event listener for the link is executed only once (currently the required classes are toggled twice in a row)

    I'll set this to "Needs review". Feel free to fiddle with the JavaScript changes especially, because this was just a quick shot from the hip.

  • 🇮🇳India gskharmujai

    Thanks marcoliver. I got sometime to look at the changes and verified with D9 and it looks like the UI part of the issue is resolved. However, the click action still seems to have a problem.

    On debugging the click functionality in fpa.js, i was able to get it working by making the change below :

    diff --git a/js/fpa.js b/js/fpa.js
    index 9809dca..197c3b1 100644
    --- a/js/fpa.js
    +++ b/js/fpa.js
    @@ -410,7 +410,7 @@
               var toggle_class = $(e.currentTarget).attr('fpa-toggle-class');
               this.dom.container.toggleClass(toggle_class).hasClass(toggle_class);
             }, this));
    -      });
    +      }, this);
         }
         
         this.dom.section_left
    
  • 🇨🇦Canada mahde Vancouver

    With Drupal 10.2.1 I am getting duplicate search fields as well.

  • 🇩🇪Germany marcoliver Neuss, NRW, Germany

    Hey everyone, I updated the issue fork with a change to address the JavaScript issue (using native bind() instead of the jQuery proxy now) and one to remove the filter added by Core to the bottom of the list.

    I decided to unset the Core filter in this case, since this module provides its own filters anyway. Feel free to discuss / change this if you think otherwise.

Production build 0.71.5 2024