Recipe description appears twice in modal

Created on 10 January 2025, 4 months ago

Problem/Motivation

When you open a recipe modal, it displays the description twice.

Steps to reproduce

  1. Install Drupal CMS
  2. Go to the recipes page
  3. Click on a recipe
  4. See the description appears twice

Proposed resolution

Only show the description once :)

🐛 Bug report
Status

Active

Version

2.0

Component

User experience

Created by

🇦🇺Australia pameeela

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

Merge Requests

Comments & Activities

  • Issue created by @pameeela
  • First commit to issue fork.
  • Pipeline finished with Success
    4 months ago
    Total: 475s
    #394185
  • Pipeline finished with Canceled
    4 months ago
    Total: 91s
    #394197
  • Pipeline finished with Failed
    4 months ago
    Total: 757s
    #394199
  • Pipeline finished with Success
    4 months ago
    Total: 1290s
    #394205
  • 🇮🇳India Kanchan Bhogade

    Hi
    I've tested MR !670 on Drupal 11.x
    The MR is applied successfully...

    Testing steps:
    Install Drupal 11.x
    Go to the recipes page
    Click on a recipe
    See the description appears twice
    Applied MR and checked for same

    Test Result:
    Recipe description appears twice in modal issues is resolved

    Attaching Screenshots
    RTBC+1

    Keeping need review for code verification!

  • 🇬🇧United Kingdom dunx

    Tested on drupal_cms dev.

    Steps using ddev to reproduce:

    1. git clone https://git.drupalcode.org/project/drupal_cms.git
    2. cd drupal_cms
    3. ddev config --project-type=drupal11 --docroot=web --php-version=8.3
    4. ddev start
    5. ddev composer install
    6. ddev launch

    Followed be skip of available recipe installation and minimum setup.

    Project recipes page at /admin/modules/browse/recipes currently looks like this:

    Ah, looks like this is already fixed in dev! Well, I'll leave this here just in case. Nice work. Looking forward to the launch party in London tomorrow :)

  • 🇬🇧United Kingdom dunx

    Tested on drupal_cms dev.

    Steps using ddev to reproduce:

    1. git clone https://git.drupalcode.org/project/drupal_cms.git
    2. cd drupal_cms
    3. ddev config --project-type=drupal11 --docroot=web --php-version=8.3
    4. ddev start
    5. ddev composer install
    6. ddev launch

    Followed be skip of available recipe installation and minimum setup.

    Visit project recipes page at /admin/modules/browse/recipes and then click on a recipe.
    The *modal* looks like this:

    Applied patch:
    ddev composer require 'drupal/project_browser:2.0.x-dev'
    ddev composer config repositories.project_browser vcs https://git.drupalcode.org/issue/project_browser-3498901.git
    ddev composer require drupal/project_browser:dev-3498901-recipe-description-appears

    Hmmm... MR not applying:

    Your requirements could not be resolved to an installable set of packages.
    
      Problem 1
        - Root composer.json requires drupal/drupal_cms_starter 1.x-dev -> satisfiable by drupal/drupal_cms_starter[1.x-dev].
        - drupal/drupal_cms_starter 1.x-dev requires drupal/project_browser ^2-alpha7 -> found drupal/project_browser[2.0.0-alpha7, 2.0.x-dev] but it conflicts with your root composer.json require (3498901-recipe-description-appears-dev).

    Is that an issue with the MR or (more likely I'll happily admit), a problem with me?

  • 🇬🇧United Kingdom dunx

    Okay, I tried this:
    ddev composer require drupal/project_browser:"dev-3498901-recipe-description-appears as 2.0.7-alpha7" (Thanks the_g_bomb)

    A quick refresh and now the Recipe modal looks like this:

    Looks fixed to me so another for RTBK.

  • 🇨🇦Canada zetagraph

    Tested locally. No duplicate description. Ready to merge.

  • 🇺🇸United States chrisfromredfin Portland, Maine

    We don't want to hardcode things for recipes plugin here whenever possible. We instead, I think, should not display the summary on the modal if it's identical to the body. (Card view should still use a calculated or exact summary.)

  • 🇺🇸United States phenaproxima Massachusetts

    Alternatively, the recipes source plugin could set the summary to NULL and just set a body?

    I agree with this - doing specialized workarounds for recipes is the wrong approach.

  • Merge request !677Use summary and not value → (Merged) created by phenaproxima
  • 🇺🇸United States phenaproxima Massachusetts

    I did an alternative approach that uses the recipe's description as the summary, which should prevent the logic in Project::setSummary() from kicking in. Could use a little review; automated tests are probably not necessary for this one, although I could certainly add it.

  • Pipeline finished with Success
    4 months ago
    Total: 485s
    #403092
  • Pipeline finished with Failed
    4 months ago
    Total: 482s
    #403120
  • Pipeline finished with Success
    4 months ago
    Total: 480s
    #403126
  • Pipeline finished with Skipped
    4 months ago
    #403134
  • 🇺🇸United States chrisfromredfin Portland, Maine

    Essentially now, the implied contract is that summary is required but value is not. This generally will work better for "local-system" types of source plugins (like current Recipes).

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

  • Pipeline finished with Failed
    3 months ago
    Total: 1255s
    #428850
  • Pipeline finished with Failed
    3 months ago
    Total: 1169s
    #428900
  • Pipeline finished with Failed
    3 months ago
    Total: 830s
    #428968
  • Pipeline finished with Failed
    3 months ago
    Total: 1111s
    #428987
  • Pipeline finished with Failed
    3 months ago
    Total: 1285s
    #429008
  • Pipeline finished with Success
    3 months ago
    Total: 1530s
    #429357
  • Pipeline finished with Canceled
    3 months ago
    Total: 139s
    #429585
  • Pipeline finished with Failed
    3 months ago
    Total: 803s
    #429590
  • Pipeline finished with Failed
    3 months ago
    Total: 1249s
    #429608
  • Pipeline finished with Failed
    3 months ago
    Total: 1234s
    #429936
  • Pipeline finished with Failed
    3 months ago
    Total: 1271s
    #430036
  • Pipeline finished with Failed
    3 months ago
    Total: 2184s
    #430581
  • Pipeline finished with Failed
    3 months ago
    Total: 1199s
    #430857
  • Pipeline finished with Failed
    3 months ago
    Total: 231s
    #432513
Production build 0.71.5 2024