Wednesday, March 23, 2016

LabShare

We build Engineering Innovation Platform to help People in their professional life.


by csreladm via CSSREEL | CSS Website Awards | World best websites | website design awards | CSS Gallery

This Week's HTML5 and Browser Technology News (Issue 232)


Read this e-mail on the Web
HTML 5 Weekly
Issue 232 — March 23, 2016
Vitaly Friedman
A superb slidedeck from a workshop given by Smashing Magazine’s proprietor. You should learn a few things from this.


David Berner
How do Web Components fit into the current state of the Web, work cross browser, and adapt to the space they’re allocated? David Berner shows us how.


Paul Bakaus
Mobile is becoming the starting point in Chrome’s DevTools.


corgibytes  Sponsored
Building out test suites is our specialty. We refactor. You build new features.

corgibytes

Ehsan Akhgari
The WHATWG Fetch API provides a modern way to fetch network resources and gives you fine grained control over the details of the request and response.


Microsoft Edge Dev Blog
MS is participating in the W3C Browser Extension Community Group’s efforts to define standardized extension APIs.


W3C
Covers a wide range of recommendations for making Web content more accessible.


W3C
Defines the W3C’s activities around DRM and corrects misconceptions about “EME putting DRM in HTML”.


W3C
W3C First Public Working Draft describing what people with low vision require for electronic content, tools, and technologies to be accessible.


Jobs

  • UI Developer, React + D3 (Boston)We're looking for a savvy UI Developer to help us build applications for the next generation of wearable devices. Join our engineering team and get your hands dirty with React, D3 and other best-of-breed web technologies. MC10
  • UX Developer (SF Bay Area)Join an awesome web/mobile/DB consultancy that emphasizes teamwork and learning and puts employees first in everything we do. Beezwax
  • Stop Applying to Jobs - Let Companies Apply to YouOn Hired, sign up in 10 minutes and get offers from top companies like Facebook, Uber, & Stripe. Engineers get an average of 5 offers on the platform in 1 week. Try it today. Hired.com

In brief

Curated by Peter Cooper and published by Cooper Press.
Want to post a job? E-mail us or use our self-serve system.

Unsubscribe : Change email address : Read this issue on the Web

Published by Cooper Press Ltd. Office 30, Lincoln Way, Louth, LN11 0LS, UK


by via HTML5 Weekly

Theming Views in Drupal 8 – Custom Style Plugins

Drupal 8 logo

Views is in Drupal 8 core. We all know that by now. Twig is the new templating engine in Drupal 8. This we also know. But do we know how to interact programmatically with the first in order to theme a View using the second? Aside from overriding View templates like with any other subsystem, we have available a more powerful alternative in the form of Views plugins (Display, Style, Row and Field).

In this article, we are going to look at how we can create a custom Style plugin for Views in Drupal 8. We will use the Bootstrap tab markup as a goal and implement a tabbed output for our View results. In the View configuration, the Style settings will allow us to specify which field will be used as the tab navigation copy, leaving the rest of the fields shown in the respective tab panes. Basically, each View result will represent a tab - so this example is not suited for Views which have more than a few results. The main goal is to illustrate how we can create our own Views Style plugins in Drupal 8.

We will not cover the details on how you can use Bootstrap in your project. However, you can check out the documentation page on assets or even this article on how to make sure anonymous users can benefit from jQuery being loaded on the page. And if you want to see the code we write ahead of time, you can find it in this repository within the Demo module.

What Is the Style Plugin?

The Views Style plugin is the one responsible for rendering the listing. Notable examples of core Style plugins are Unformatted List, HTML List, Table or Grid. They are used by the Display plugin and they in turn use Row plugins that represent one item in the listing.

In Drupal 8, all Views plugin types are built using the new Plugin system and share some common functionality (they always extend from the same Views PluginBase).

Let’s now create our own such Style plugin that can be used by most Display types (Page, Block, etc) and which uses the Field row plugin.

The Bootstrap Tabs Style Plugin

The first step is to create our plugin class located in the Plugin/views/style folder of our module:

namespace Drupal\demo\Plugin\views\style;
use Drupal\Core\Form\FormStateInterface;
use Drupal\views\Plugin\views\style\StylePluginBase;

/**
 * A Views style that renders markup for Bootstrap tabs.
 *
 * @ingroup views_style_plugins
 *
 * @ViewsStyle(
 *   id = "bootstrap_tabs",
 *   title = @Translation("Bootstrap Tabs"),
 *   help = @Translation("Uses the Bootstrap Tabs component."),
 *   theme = "demo_bootstrap_tabs",
 *   display_types = {"normal"}
 * )
 */
class BootstrapTabs extends StylePluginBase {

  /**
   * Does this Style plugin allow Row plugins?
   *
   * @var bool
   */
  protected $usesRowPlugin = TRUE;

  /**
   * Does the Style plugin support grouping of rows?
   *
   * @var bool
   */
  protected $usesGrouping = FALSE;

  /**
   * {@inheritdoc}
   */
  protected function defineOptions() {
    $options = parent::defineOptions();
    $options['tab_nav_field'] = array('default' => '');
    return $options;
  }

  /**
   * {@inheritdoc}
   */
  public function buildOptionsForm(&$form, FormStateInterface $form_state) {
    parent::buildOptionsForm($form, $form_state);
    $options = $this->displayHandler->getFieldLabels(TRUE);
    $form['tab_nav_field'] = array(
      '#title' => $this->t('The tab navigation field'),
      '#description' => $this->t('Select the field that will be used as the tab navigation. The rest of the fields will show up in the tab content.'),
      '#type' => 'select',
      '#default_value' => $this->options['tab_nav_field'],
      '#options' => $options,
    );
  }
}

Continue reading %Theming Views in Drupal 8 – Custom Style Plugins%


by Daniel Sipos via SitePoint

This Week in Mobile Web Development (#100)

Read this on the Web

Mobile Web Weekly March 23, 2016   #100
Chris Brandrick recommends
Chrome DevTools Gets a New Mobile-First Device Mode — Mobile is becoming the starting point in Chrome’s DevTools.
Paul Bakaus
Brian Rinaldi recommends
Progressive Web Apps: The Long Game — Thoughts on Google’s Progressive Web Apps initiative after attending a full day event by Google on the topic.
Remy Sharp
Brian Rinaldi recommends
Google's Mobilegeddon Aftermath: Eight Months Into A Better Mobile Web — Google’s launch of it’s new mobile ranking system (aka “Mobilegeddon”) on April 21, 2015 has triggered a 25% increase in mobile web adoption.
Smashing Magazine
This issue is sponsored by Hired.com
Apply to 3,000+ Jobs in 10 Minutes & 1 Application — Top companies apply to you on Hired. Get salary and equity upfront before interviewing.
Hired.com

Holly Schinsky recommends
Why I Switched to Android After 7 Years of iOS — Henrik talks about how the support for Progressive Web Apps has led him back to his Android devices.
Henrik Joreteg
Brian Rinaldi recommends
Is the Term ‘Mobile First’ Becoming Outmoded? — Mark Lowenstein says that “mobile first” is evolving into a “multiscreen” strategy.
Re/code
Brian Rinaldi recommends
Why I Value Truly Responsive Web Design — Why designing an site that works at any size is important.
Jonathan Snook
Brian Rinaldi recommends
NativeScript 1.7 Announcement — Includes a preview of Windows support, Angular 2 alpha SDK, full Visual Studio Code integration and more.
NativeScript Blog
Brian Rinaldi recommends
NativeScript Runtime Preview for Windows 10 — A “proof of concept” stage open source release of NativeScript support for the Universal Windows Platform.
NativeScript Blog
Holly Schinsky recommends
10 Tips for Mobile Web Design Optimization — Improve your site’s mobile friendliness with these design optimization tips.
Elegant Themes
Brian Rinaldi recommends
Designing for Mobile Micro-Moments — A guide to what people expect in terms of mobile experience based upon user research by Google and AnswerLab.
Think with Google
Holly Schinsky recommends
Fixing Continuous Delivery for Mobile — A video presentation from PhoneGap Day US on how to implement an effective mobile continuous delivery process.
PhoneGap Blog
Holly Schinsky recommends
cordova-plugin-inapppurchase: A lightweight cordova plugin for in app purchases on iOS/Android — A lightweight Cordova plugin for adding in-app purchase support to your hybrid apps.
Alex Disler
Holly Schinsky recommends
Ionic: The Truly Progressive Web App Framework — Choosing hybrid and using a framework like Ionic allows for building apps that provide a flexible user experience via a mobile website, a progressive web app or an installed app.
Ionically Speaking
Holly Schinsky recommends
Enhancing Your Web App with Offline Support, Notifications and More — Improving the user experience of your web apps with offline support, notification integration and home screen presence.
Ido Green
Brian Rinaldi recommends
Apple starts rejecting apps that use UIWebBrowserView — The use of UIWebBrowserView instead of UIWebView in the Ionic keyboard plugin was causing app rejections. The plugin has been updated to correct this issue but has some API changes due to the change.
Hacker News
Job listing
Mobile iOS/Android Developer at Honeypot (Berlin, Germany) — If you have a deep knowledge in iOS and/or Android development, a passion to create the best apps imaginable, and are seeking a new challenge with an awesome team, apply to Honeypot.
Honeypot

Curated by Brian Rinaldi and Holly Schinsky for Cooper Press.
Cooper Press is located at Office 30, Fairfield Enterprise Centre, Louth, LN11 0LS, UK
Update your email address
or stop receiving MWW here


by via Mobile Web Weekly

How to Use Bottom Sheets With the Design Support Library

Behind The Hashtag: #TheDress

Behind The Hashtag: #TheDress

Long scrolling interactive One Pager with a comprehensive report on #TheDress famous debate on social media. This micro-site is part of a weekly editorial called 'Behind The Hashtag'. Real nice touch with the color scheme switcher related to the topic. Each week is published in the form of a Long-form Journalism interactive One Page website - each with unique design elements.

by Rob Hope via One Page Love

Exploring Ubuntu Phone UI Elements

Last November I wrote a short tour of the UX principles of the Ubuntu operating systems for phones. In this article I will focus on specific UI elements, based on the official style guide provided by Canonical. Time to begin!

Continue reading %Exploring Ubuntu Phone UI Elements%


by Elio Qoshi via SitePoint