Giter VIP home page Giter VIP logo

wmbert's Introduction

wmbert

Latest Stable Version Total Downloads License

A more user-friendly entity reference list field widget for Drupal 8.

Development of this project is moved to Drupal.org: https://www.drupal.org/project/bert

Use the scripts/upgrade-to-bert.sh script to help with your migration. You also have to move any custom plugins from the Plugin/EntityReferenceListFormatter and Plugin/EntityReferenceLabelFormatter directories to a Plugin/bert/EntityReferenceListFormatter or Plugin/bert/EntityReferenceLabelFormatter directory.

wmbert's People

Contributors

akasake avatar dieterholvoet avatar hans-langouche avatar ponkiwonki avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

drupallabs

wmbert's Issues

Update wmcodestyle

  • Add phpstan.neon config file referencing the wmcodestyle rule files (example)
  • Add phpstan analyse to the coding-standards composer script
  • Add autoload-dev entry to ensure autoloading during analysis

Sorting and Filtering of referenced items

Hi, first of all thanks for this great widget. I am a Drupal veteran, but some things are so deep down handled in D8 and later, that I have no idea where is the correct point of configuration. Therefore I write this feature request.

Summary

It would be nice if I could define callbacks for filtering and or sorting.

Basic example

I noticed that my taxonomy items are not sorted alphabetically in the list of items I can add to an entity (in wmbert pulldown widget). Therefore I need a way sort it.

The second example for the need for filtering is a bit more complex. Imagin having 30 users. I have an entity where I can assign a few of them (imagin like an epic in a tool like JIRA or github). This entity has sub-entities like sub-tasks. When adding user references to these tasks I only want to have a list of users who are assigned to the parent epic. Currently all users are displayed.

I tried to dig deep into the Drupal handling of things and found Selection Handlers per Entity (or so), but I found no suitable and easy to understand how to use them. It seemed that they are based on Entity type. Not sure. An callback function, which will sort and filter sounds so much simpler. Even as an Event it would be okay for me.

It would be nice to have that functionallity in wmbert.

Label formatter plugin only affects autocomplete selection mode

Description

The field widget has an option called Label formatter which changes the way an entity is formatted in the search results. Currently, this only works when the Add entities selection is set to Autocomplete.

Steps to reproduce

Change the Add entities selection option of a wmbert field widget to Autocomplete.

Expected result

The plugin should also change the way the entity is formatted in Select & Radios selection modes.

Actual result

The plugin should only changes the way the entity is formatted in the Autocomplete selection mode.

Environment

Latest version of the module.

Add module to Drupal.org

Summary

  • Choose a name for the new module (bert?)
  • Create the Drupal.org project (example)
  • Change the license to GPLv2 to comply with Drupal.org requirements (example)
  • Update the composer install command in the README
  • Add contributing section to the README (example)
  • Make the module conform with Drupal.org coding standards
  • Remove all mentions of Wieni code style

Automatically change the handler of entity reference fields

Summary

To support a couple of features (Disable duplicate selection, Disable selection of parent entity, Label formatter plugin), we need our own implementation of an entity reference selection handler. Currently, we manually have to change the handler in config. We should change it so when choosing the wmbert field widget, the handler should change automatically.

Motivation

Make the module more user friendly, less error-prone.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.