Support from Acquia helps fund testing for Drupal Acquia logo

Comments

nilesh.addweb created an issue. See original summary.

yoftahe.addweb’s picture

Status: Active » Needs review
FileSize
10.41 KB
yas’s picture

Status: Needs review » Needs work

@nileshaddweb

Could you please run git pull and re-create the patch? I encountered the following error while applying the patch after merging the prior patches:

$ git apply -v /tmp/3118026-2.patch
Checking patch bootstrap_cloud.libraries.yml...
Checking patch bootstrap_cloud.theme...
error: while searching for:
    '#default_value' => theme_get_setting('font_size'),
  ];

  $form['#attached']['library'][] = 'bootstrap_cloud/global-scripts';

  // Set text resize option in drupalSettings.
  $form['#attached']['drupalSettings']['font']['font_size'] = $font_size_option[theme_get_setting('font_size')];
  $form['#attached']['drupalSettings']['font']['font_family'] = $font_family_option[theme_get_setting('font_family')];
}

/**
 * Implements hook_preprocess_html().
 */
function bootstrap_cloud_preprocess_html(&$variables) {
  $variables['font_size_html'] = theme_get_setting('font_size');
  $font_family_option = [
    'lucida_grande' => t('Lucida Grande'),
    'lato' => t('Lato'),

error: patch failed: bootstrap_cloud.theme:62
error: bootstrap_cloud.theme: patch does not apply
Checking patch config/install/bootstrap_cloud.settings.yml...
Checking patch css/red-theme.css...
error: css/red-theme.css: already exists in working directory
Checking patch js/fonts.js...
error: while searching for:
        $('li a[href="#edit-font"]').find('strong').siblings('span').html('Font family: ' + textValue + '<br /> ' + 'Font size: ' + font_size);
      });

      // Change body font family.
      var body_font_family = $('body').css('font-family');
      var replace_body_font_family = ' ' + body_font_family.replace(/\"/g,'');

error: patch failed: js/fonts.js:29
error: js/fonts.js: patch does not apply
yoftahe.addweb’s picture

Status: Needs work » Needs review
FileSize
4.68 KB

@yas Thank you for review.

I re-created the patch. Please check.

yas’s picture

Status: Needs review » Needs work
FileSize
1.09 MB
1.28 MB

@nileshaddweb

Thank you for the update. But unfortunately, when I applied the patch, the screen changed as follows:

16.png

... I tried to switch the color blue and red back and forth, cache clear, uninstall and re-install Bootstrap for Cloud. Could you please check it?

Also, could you please change to my comments shown in the screenshot as follows?

11.png

NOTE: Please use === / !== instead of == / !=

yoftahe.addweb’s picture

Status: Needs work » Needs review
FileSize
11.24 KB

@yas Thank you for review.

I updated the patch as per your previous comment.

Please review updated patch.

thanks

yas’s picture

Status: Needs review » Needs work

@nileshaddweb

Could you please provide interdiff?

yoftahe.addweb’s picture

Status: Needs work » Needs review
FileSize
12.29 KB

@yas uploaded interdiff. Please check.

yas’s picture

@nileshaddweb

Thank you for providing the interdiff. It is helpful. Could you please re-create the patch? I have the following warning:

$ git apply -v /tmp/3118026-6.patch 
Checking patch bootstrap_cloud.libraries.yml...
Checking patch bootstrap_cloud.theme...
Checking patch config/install/bootstrap_cloud.settings.yml...
Checking patch js/bootstrap_for_cloud.js...
/tmp/3118026-6.patch:210: new blank line at EOF.
+
Checking patch js/fonts.js...
Applied patch bootstrap_cloud.libraries.yml cleanly.
Applied patch bootstrap_cloud.theme cleanly.
Applied patch config/install/bootstrap_cloud.settings.yml cleanly.
Applied patch js/bootstrap_for_cloud.js cleanly.
Applied patch js/fonts.js cleanly.
warning: 1 line adds whitespace errors.
yas’s picture

Status: Needs review » Needs work
yas’s picture

FileSize
839.78 KB

@nileshaddweb

Please add descriptions as follows:

16.png

yoftahe.addweb’s picture

Status: Needs work » Needs review
FileSize
1.07 KB
11.37 KB

@yas Updated patch as per your last comment, please check.

yas’s picture

Status: Needs review » Reviewed & tested by the community

@nileshaddweb

Thank you for the update. It looks good to me now. I'll merge the patch to 8.x-1.x and 8.x-2.x and close this issue as Fixed.

  • yas committed 882c429 on 8.x-1.x authored by nilesh.addweb
    Issue #3118026 by nilesh.addweb, yas: Add a drop-down list box to switch...
yas’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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