issue: i had GCC block to my sidebar second region under bartik theme. but it was not displaying inside the block layout.it was going out of block.

solution: add custom css to show reflection only on provided block.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

xaiwant created an issue. See original summary.

xaiwant’s picture

Assigned: xaiwant » Unassigned
Status: Needs work » Needs review
FileSize
3.91 KB

added custom css for block and applied patch

xaiwant’s picture

Assigned: Unassigned » xaiwant
xaiwant’s picture

Status: Needs review » Needs work
xaiwant’s picture

Assigned: xaiwant » Unassigned
Status: Needs work » Needs review
FileSize
808 bytes

check updated code base. applied latest patch.

Status: Needs review » Needs work

The last submitted patch, 5: 2682429-3.patch, failed testing.

xaiwant’s picture

Status: Needs work » Needs review
naveenvalecha’s picture

Status: Needs review » Needs work
Issue tags: +Novice, +Needs reroll

#2 patch needs reroll.

xaiwant’s picture

Status: Needs work » Needs review
Issue tags: -Needs reroll
FileSize
1.41 KB

@naveenvalecha
rerolled a patch.

naveenvalecha’s picture

Status: Needs review » Needs work
  1. +++ b/css/google_currency_converter.css
    @@ -0,0 +1,3 @@
    +#edit-google-currency-converter-from, #edit-google-currency-converter-to {
    

    use #attributes property on both the select list elements and add a common class and then use that common class to stylize it.

  2. +++ b/google_currency_converter.libraries.yml
    @@ -0,0 +1,5 @@
    +  version: VERSION
    

    remove version constant from here. this VERSION refer to core version. See line 84 https://api.drupal.org/api/drupal/core%21lib%21Drupal.php/8

xaiwant’s picture

Status: Needs work » Needs review
FileSize
2.26 KB

As per above statement
made the changes

Added attribute to apply common css

Removed version constant

naveenvalecha’s picture

The patch in #11 was not able to apply.
Recreate the patch.

Pinged the manjit.singh to provide his thoughts/review on the css & css files structure.
Manjit, would you also take a look that why css is not applying.

Thanks!

Manjit.Singh’s picture

I have change couple of things in libraries, info and css file that was missed in previous one.
@Naveen Please review the patch file.

Manjit.Singh’s picture

FileSize
1.47 KB

I missed the interdiff file, So here it is.

naveenvalecha’s picture

  1. --- /dev/null
    +++ b/css/components/google_currency_converter.module.css
    

    +1 Nice

  2. +++ b/google_currency_converter.info.yml
    @@ -2,3 +2,5 @@ name: Google Currency Converter
    +libraries:
    +  - google_currency_converter/drupal.google_currency_converter
    

    Why we have to define the libraries here ? We don't want to attach/load this library on every single page.

Manjit.Singh’s picture

FileSize
73.61 KB
254.79 KB
67.9 KB
244 KB

Why we have to define the libraries here ? We don't want to attach/load this library on every single page.

No, Style will not be call on each and every page, that's a cool thing, i like in drupal 8. Just for an example I have captured couple of screenshots.

  1. Added content(page) with xyz name.
  2. Show currency block only on front page only, not on node/1. You can check the screenshots for that.
  3. After that i have checked that source of both the pages. (frontpage, node/1)
  4. You can see that, CSS file would be call only on front page, not on node/1. Because we have no currency block there.

Please check the screenshots.

naveenvalecha’s picture

Status: Needs review » Reviewed & tested by the community

Alright Thanks Manjit! for the explanation. We are good to go.

naveenvalecha’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed to 8.x-1.x

Status: Fixed » Closed (fixed)

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