Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs some love
$('nav .navbar-nav li.language > a').on('click', function (e, context) { | ||
e.preventDefault(); | ||
langSelect.css('left', '0px'); | ||
langSelect.css('top', '150px'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you operate by classes and avoid of adding styles int the code?
MVC pattern is really important here
type: module | ||
description: OpenY module for Google Translate integration. | ||
core: 8.x | ||
package: OpenY |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add version, please
@@ -0,0 +1,8 @@ | |||
translate: | |||
version: 1.x |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use Semantic Versioning. Should be 8.0.1, please
public function build() { | ||
$block = [ | ||
'#theme' => 'openy_gtranslate', | ||
'#cache' => ['max-age' => 0], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why remove caching? Could this block be cached?
It is on every page, I'm not a big fan of adding not cached blocks for all pages
<div class="google-translate" id="google_translate_element"></div> | ||
<script type="text/javascript"> | ||
function googleTranslateElementInit() { | ||
new google.translate.TranslateElement({pageLanguage: 'en', layout: google.translate.TranslateElement.InlineLayout.SIMPLE}, 'google_translate_element'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Language code should be passed from Drupal site settings, not hardcoded
Merge with master
Merge with master branch
# Conflicts: # themes/openy_themes/openy_lily/css/style.css.map
Build comment file:
Test PASSed. |
Acessibility Sniffer: front page checking WCAG2AA http://ci.openymca.org/build338/frontWCAG2AAhtmlcs.txt |
Build comment file:
Test PASSed. |
Acessibility Sniffer: front page checking WCAG2AA http://ci.openymca.org/build339/frontWCAG2AAhtmlcs.txt |
Steps for review
After installation or update OpenY profile
on desktop devices: with OpenY Rose or OpenY Lily themes there will be new block "Select language" near user account menu: white link or button.
https://monosnap.com/file/0lbA5LkphtWZLasQLWb2nSaamQhLII
https://monosnap.com/file/tTGvrlgjb6vo9yJLS2EAHXCoTjLskT
on mobile devices: new link will be added to the end of the Main menu (OpenY Rose theme) https://monosnap.com/file/voiuATpge6x9PhsuaSQBa19E0CSYNT or to the end of the User account menu (OpenY Lily theme) https://monosnap.com/file/rvkCw633SnJvo8calK2CCUxJHmdqtX.
@podarok please, review