Skip to content
Snippets Groups Projects

Issue #3347474: Fix Icon patch for Type Tray with the Origin URL (scheme and HTTP host) of the site

Open Issue #3347474: Fix Icon patch for Type Tray with the Origin URL (scheme and HTTP host) of the site
3 unresolved threads
Open Rajab Natshah requested to merge issue/type_tray-3347474:3347474-fix-icon-patch into 1.0.x
3 unresolved threads

Closes #3347474

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
183 183 ])->toString();
184 184 $favorite_link_action = 'add';
185 185 }
186
187 /** @var \Symfony\Component\HttpFoundation\Request $origin_url */
  • This comment seems innacurate? Can we replace with something that explains why we calculate all this at this point? Maybe something along the lines of

            // Calculate the path of the default thumbnails in case there is nothing
            // stored in config.
  • Please register or sign in to reply
  • 183 183 ])->toString();
    184 184 $favorite_link_action = 'add';
    185 185 }
    186
    187 /** @var \Symfony\Component\HttpFoundation\Request $origin_url */
    188 $origin_url = \Drupal::request()->getSchemeAndHttpHost() . \Drupal::request()->getBaseUrl();
  • 183 183 ])->toString();
    184 184 $favorite_link_action = 'add';
    185 185 }
    186
    187 /** @var \Symfony\Component\HttpFoundation\Request $origin_url */
    188 $origin_url = \Drupal::request()->getSchemeAndHttpHost() . \Drupal::request()->getBaseUrl();
    189 $origin_url_type_tray = $origin_url . '/' . $this->moduleList->getPath('type_tray');
    • Just for clarity, can we maybe define here directly the default URL we want to use? So instead of

      $origin_url_type_tray = $origin_url . '/' . $this->moduleList->getPath('type_tray');

      we can use

      $default_thumbnail_url = $origin_url . '/' . $this->moduleList->getPath('type_tray') . static::TYPE_TRAY_DEFAULT_THUMBNAIL_PATH;

      and then just use $default_thumbnail_url as the fallback in the ternary check down below? I think this makes things a bit clearer. Thanks!

    • Please register or sign in to reply
  • I'm OK with this change, but left a few minor requests. Thanks for working on this!

  • Please register or sign in to reply
    Loading