Software
Rails System Test Not Loading Vue
I have a Vue feature in my rails 5.1 app that basically accepts a deeply nested form. The feature works perfectly in development, staging and production, however, when using the new minitest system tests with selenium and capybara, vue doesn't appear to load. As Selenium shows you whats happening in real time, I can see that the rails elements (such as _header, _footer, h1-Title) are all loading fine, but the Vue piece never appears.
Here is my testing setup:
Gemfile
group :test do gem 'minitest-rails' gem 'minitest-reporters' gem 'minitest-rails-capybara' gem 'faker' gem 'capybara', '~> 2.7', '>= 2.7.1' gem 'selenium-webdriver' gem 'simplecov', :require => false endtest/test_helper.rb
ENV["RAILS_ENV"] = "test" require 'simplecov' SimpleCov.start 'rails' require File.expand_path("../../config/environment", __FILE__) require "rails/test_help" require "minitest/rails" require "minitest/rails/capybara" require "minitest/pride" require 'minitest/reporters' require "support/test_password_helper" Minitest::Reporters.use! Minitest::Reporters::SpecReporter.new ActiveRecord::FixtureSet.context_class.send :include, TestPasswordHelper class ActiveSupport::TestCase require "#{Rails.root}/db/seeds.rb" fixtures :all require 'minitest/autorun' include TestPasswordHelper # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order. # Add more helper methods to be used by all tests here... def sign_in(user) post user_session_path \ 'user[email]' => user.email, 'user[password]' => user.password end def submit_form find('input[name="commit"]').click end endtest/application_system_test_case.rb
require "test_helper" class ApplicationSystemTestCase < ActionDispatch::SystemTestCase driven_by :selenium, using: :chrome, screen_size: [1400, 1400] include Devise::Test::IntegrationHelpers endtest/system/proposals_test.rb
require "application_system_test_case" class ProposalsTest < ApplicationSystemTestCase test 'create a proposal' do sign_in users(:martin) @supplier = businesses(:supplier_two) @project = projects(:pete_project_three) visit dashboard_path assert_selector 'h3', text: @supplier.display_name assert_link text: 'Propose for project' click_on 'Create Proposal' assert_selector 'h1', text: 'New Proposal' assert_selector 'small', text: '(Version: 1)' fill_in 'title0', with: 'This is a title' fill_in 'body0', with: 'This is a body' click_on 'Add Section' fill_in 'title1', with: 'This is a second title' fill_in 'body1', with: 'This is a second body' end endThe test itself is failing at fill_in 'title0', with: 'This is a title' because the vue feature doesn't load
Note I am using turbolinks, but as mentioned, it's all working perfecting in practice, its just not loading for the system tests.
Happy to provide more detail if needed
Loading single file components in MVC5 using webpack
I have a MVC solution in VS2015 in wich I use vue.js to bind data, I tried to use webpack to use single file components with extension .vue.
On first instance I tried to generate 1 file.js foreach file.vue with this config:
const fs = require("fs"); const path = require("path"); // build an object that looks like // { // "filename": "./filename.vue" // } // to list the entry points for webpack to compile. function buildEntry() { const reducer = (entry, file) => { entry[file.split(".").shift()] = `./Vue/${file}`; return entry; }; return fs.readdirSync(path.join(__dirname, "Vue")) .filter(file => file.endsWith(".vue")) .reduce(reducer, {}); } module.exports = { entry: buildEntry(), output: { path: path.join(__dirname, "Vue"), filename: "[name].js", library: "[name]" }, module: { loaders: [ { test: /\.vue$/, loader: 'vue-loader' }, ], } }So I could use a new component like this:
Vue.component("foo", foo);But that generates to much .js files and it's dificult to maintain so I tried to unify them with this config:
module.exports = { entry: "./Vue/BundleIndex.js", output: { path: __dirname, filename: "./Vue/bundle.js", }, module: { loaders: [ { test: /\.vue$/, loader: 'vue-loader' }, ], } }with this bundleIndex.js :
import foo from '.\\foo.vue' import example from '.\\example.vue'I tried to use components as I used to, but I can't. what I'm missing here?
Accessing _this
I have a typescript file... and it's failing TSLint. Was hoping someone could answer this.
So the object looks something like this:
export default class Container extends Vue { // methods doSomething() { console.log('something happened') } items: object[] = [ { title: test, onclick: _this.doSomething(); } ] }I tried using this instead of _this, but this only refers to the individual object in items. So then I found in Chrome dev tools that I can use _this to access the containing class. However, when I put this code thru TSLint, it complains that it cannot find the name '_this'.
My project uses tslint-config-airbnb.
Thanks. John.
What decides the directives bind sequences in Vue.js 1.0?
What's the custom directives bind sequences in Vue.js 1.0? Why the console.log result is :
bind loading
bind load
bind calendar
bind filterpanel
bind footprint
Code example is here:
// HTML <!-- Directives--> <div v-mask="UI.showMask"></div> <div v-loading="UI.showLoading"></div> <div v-load = "request.isLoadData"></div> <div v-calendar = "pageParams.leaveDate"></div> <div v-footprint = "UI.footprint"></div> // js Vue.directive('calendar', { bind: function () { console.log('bind calendar') // ... } }); Vue.directive('mask', { bind: function () { console.log('bind mask') // ... } }); Vue.directive('loading', { bind: function () { console.log('bind loading') // ... } }); Vue.directive('load', { bind: function () { console.log('bind load') // ... } update: function () { // send Query ... } }); Vue.directive('footprint', { bind: function () { console.log('bind footprint') // ... } });Vue.js nextTick inside computed property
I have "context menu" component. Computed properties top and left define menu position using $event property. But when I trying to open context menu, menu element is not rendered yet and top cannot be calculated without menu's offsetHeight, so I figured out to use some "nextTick hack" inside computed property:
top() { if (!this.menuIsRendered) { // by default, menuIsRendered is false this.$nextTick(() => { this.menuIsRendered = true }) return 0 } ... // menu element is rendered, calculate top value },Is this ok? I think there must be a better way to do this.
Also, full component code:
<template> <div ref="menu" :style="{top: `${top}px`, left: `${left}px`}" v-click-outside="close" @contextmenu.prevent v-if="show"> <slot></slot> </div> </template> <script> export default { props: [ 'show', 'event' ], data() { return { menuIsRendered: null, } }, computed: { top() { if (!this.menuIsRendered) { this.$nextTick(() => { this.menuIsRendered = true }) return 0 } let top = this.event.y let largestHeight = window.innerHeight - this.$refs.menu.offsetHeight - 25 return top > largestHeight ? largestHeight : top + 1 }, left() { if (!this.menuIsRendered) { return 0 } let left = this.event.x let largestWidth = window.innerWidth - this.$refs.menu.offsetWidth - 25 return left > largestWidth ? largestWidth : left + 1 }, }, methods: { close() { this.$emit('close') }, } } </script>Component usage:
<context-menu @close="close" :event="event" :show="show"> <div @click="doAction">Action</div> <div @click="doAnotherAction">Another action</div> </context-menu>In Framework7 Vue, is it possible to create a sortable list that is activated by tap and hold?
Tapping and holding to reorder list items is a common interface pattern in apps now.
Is there anyway to create a sortable list in this way in Framework7 Vue?
I'm currently using SortableJS / Vue Draggable to accomplish this, but the animation is not quite as slick as the sortable that is built into Framework7.
Please see this video of my current implementation to understand what I mean
60,000,000 Clicks for Copyright Reform
60,000,000 digital flyers.
117,000 activists.
12,000 tweets to Members of the European Parliament (MEPs).
Europe has been Paperstormed.
Earlier this year, Mozilla and our friends at Moniker launched Paperstorm.it, a digital advocacy tool that urges EU policymakers to update copyright laws for the Internet age.
Paperstorm.it users drop digital flyers onto maps of European landmarks, like the Eiffel Tower and the Reichstag Building in Berlin. When users drop a certain amount, they trigger impassioned tweets to European lawmakers:
“We built Paperstorm as a fun (and mildly addictive) way for Internet users to learn about and engage with a serious issue: the EU’s outdated copyright laws,” says Mozilla’s Brett Gaylor, one of Paperstorm’s creators.
“The Parliament has a unique opportunity to reform copyright,” says Raegan MacDonald, Mozilla’s Senior EU Policy Manager. “We hope this campaign served as a reminder that EU citizens want a modern framework that will promote — not hinder — innovation and creativity online. The success of this reform hinges on whether the interests of these citizens — whether creators, innovators, teachers, librarians, or anyone who uses the internet — are truly taken into account in the negotiations.”
Currently, lawmakers are crafting amendments to the proposal for a new copyright law, a process that will end this year. Now is the time to make an impact. And we are.
Over the last two months, more than 100,000 Internet users visited Paperstorm.it. They sent 12,000 tweets to key MEPs, like France’s Jean-Marie Cavada, Germany’s Angelika Niebler, and Lithuania’s Antanas Guoga. In total, Paperstormers contacted 13 MEPs in 10 countries: Austria, France, Germany, Italy, Lithuania, Malta, Poland, Romania, Sweden and the UK.
Then, we created custom MEP figurines inside Paperstorm snowglobes. A Mozilla community member from Italy hand-delivered these snowglobes right to MEPs offices in Brussels, alongside a letter urging a balanced copyright reform for the digital age. Here’s the proof:
Thanks for clicking. We’re looking forward to what’s ahead: 100,000,000 clicks—and common-sense copyright laws for the Internet age.
The post 60,000,000 Clicks for Copyright Reform appeared first on The Mozilla Blog.
Vue.js methods vs computed properties. How they interact with the DOM
I am trying to figure out when to call the methods property, versus when is best to call a computed property. It seems to me that computed is generally preferable since a method will respond anytime a property is called which accesses the DOM.
In the following code, the two buttons tracks a basic counter which increments by 1. The same output is passed to the DOM through a method and through a computed property. Every increment triggers both the computed and the methods properties as shown in the console.
<div id="content"> <!--counter control--> <button v-on:click="counter++">Increase Counter</button> <button v-on:click="counter--">Decrease Counter</button> <!--counter output--> <p>{{counter}}</p> <p>{{ resultMethod() }}</p> <p>{{ resultComputed }}</p> </div> <script> new Vue({ el: '#content', data: { counter: 0 }, computed: { resultComputed: function(){ console.log("computed.result was run"); return this.counter < 5 ? 'small_number' : 'LARGENUMBER'; } }, methods: { resultMethod: function(){ console.log("methods.result was run"); return this.counter < 5 ? 'small_number' : 'LARGENUMBER'; } } }) </script>Now if we add another couple data properties we can see that tracking them doesn't cause the method or the computed property to be triggered.
<!--new data options--> <button v-on:click="secondCounter++">Second Counter</button> <button v-on:click="formSubmit=true">Form Submit</button> //New Data Properties secondCounter: 0, formSubmit: falseNow displaying these data properties to the DOM shows first that the data is indeed being tracked correctly, and second these actions trigger the same methods property as our counter even though these variables are not related to this method.
<p>{{secondCounter}}</p> <p>{{formSubmit}}</p>Finally, if we create an entirely random and unrelated method and reference it in the DOM, this too will be called everytime any of our variables are changed from the DOM. I use the simple method as an example.
<h2>{{ unrelatedMethod() }}</h2> unrelatedMethod: function(){ console.log("We are now using another random method"); var number = 2000; return number; }So what exactly is happening here behind the scenes? Does Vue have to run every related property everytime the DOM is updataed? When would methods be a better choice over computed properties?
vue js passing "top-level" Boolean not working, only nested
This is weird. When I define the Boolean property showModal at the top level it is simply being ignored by vue.js. Here's what I am doing:
//Component: export default { props:['rating', 'showModal'], data: function data () { return { rating: this.rating, showModal: this.showModal }; } };Invoking the view:
const sharedRating = { title: '', remark: '' }; let showModal = false; new Vue({ el: '#rating-edit-container', data: { showModal: showModal, rating: sharedRating } }); showModal = true;Then both values are being passed to the component:
<rating-edit :rating="rating" :show-modal="showModal"></rating-edit>But when I change the value of showModal nothing happens.
If I pass showModal inside the rating object and use that nested property everything works fine:
const sharedRating = { showModal: false, title: '', remark: '' }; new Vue({ el: '#rating-edit-container', data: { rating: sharedRating } }); sharedRating.showModal = true;Shouldn't "stand alone" boolean properties also be working in Vue or do they always need to be "wrapped"?
Vue Router with Render Template
I'm a beginner used vue js. I tried vue router to navigation in my page. Everything went smoothly and easily. But I have a problem, when navigation need template to show page corresponding. Actually, I want my script neatly organized by splitting the file. Such as rooting itself , .html itself, etc. This is my script :
Route.js
/* Configuration Routing */ //const Home = { template: 'templates/home.html' }; const Thread = { template: '<div>THREAD</div>' }; const Tag = { template: '<div>TAG</div>' }; const TrendingTag = { template: '<div>TRENDING TAG</div>' }; const Category = { template: '<div>CATEGORY</div>' }; const User = { template: '<div>USER</div>' }; const Home = Vue.component('home', function(resolve) { $.get('templates/home.html').done(function(template) { resolve({ template: template, data: function () { return { message: 'Welcome' }; } }); }); }); //const Home = Vue.component('home', require('assets/js/controllers/home.js')); const routes = [ { path: '/', component: Home }, { path: '/thread', component: Thread }, { path: '/tag', component: Tag }, { path: '/trending-tag', component: TrendingTag }, { path: '/category', component: Category }, { path: '/user', component: User } ]; const router = new VueRouter({ mode: 'history', routes }); const app = new Vue({ router }).$mount('#app');In this case, actually const home must exist in another file. Like home.js. Because I have to create data in home.js.
Home.js
Vue.component('homepage', function(resolve) { $.get('templates/home.html').done(function(template) { resolve({ template: template, data: function () { return { message: 'Welcome' }; } }); }); });home.html
<div id="homepage"> <template id="home"> <h3 class="page-title" id="content"> {{ message }} </h3> </template> </div>Can you help me please ? I really stuck with this case. Thank you.
Force refresh of an affix in Vue
I am using a bootstrap affix within a Vue JS page. When I first navigate to the route containing the affix (the affix visibility is controlled via v-if), it works perfectly with scrolling. However, when I navigate away from that route and then back again, the affix is broken: it is stuck at the top of the page and doesn't scroll.
I have found online that, were I using jquery, I could call $('#affix').affix('checkPosition') to force the affix to reposition (but I don't have access to jquery).
I suspect the issue is that Vue is creating the affix on the first load, and then caches the same DOM object to be used later. But when it is re-inserted into the page, bootstrap is no longer aware of it and the affixing behavior breaks.
At this point, I think I have a few options, any of which would solve this problem:
- Is there a smart way to call Jquery from within a Vue component? I'm not using Jquery anywhere else, so would rather not.
- Is there a way to force Bootstrap affixes to refresh?
- Is there a way to force Vue to not cache this component, creating a new one every load?
- Is there a better way of creating an affix with Vue?
Thanks!
Here is the Vue component of concern:
<template> <div id="funclist-affix" class="panel panel-default" data-spy="affix" data-offset-top="155"> <div class="panel-body"> <h4>Functions</h4> <div class="list-group function-list"> <router-link v-for="(func,line) in functions" :key="line" :to="'#' + func.name" :class="['list-group-item', 'code', {uncovered: func.uncovered}]" :title="func.name">{{ func.name }}</router-link> </div> </div> </div> </template> <script> export default { name: 'functionList', data () { return { } }, props: ['functions'] } </script> <style> a { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; } #funclist-affix { max-height: calc(100% - 2 * 20px); overflow-y: auto; } </style>Editing record within list, with dynamically defining children properties with VueJS
With VueJS, I am trying to create a generic component that would work with different types of records.
For instance, let's say I have user records:
var users = [ { UserID: 1, username: "pan",email:"peter.pan@neverland.com" }, { UserID: 2, username: "john",email:"john.doe@somewhere.com" } ];And group records
var groups = [ { GroupId: 1, groupName: "Users", description: "Lorem ipsum ..." }, { GroupId: 2, groupName: "Admins", description: "Some people with super powers" } ];I want to create a Vue component to edit those records, so it can be defined as such:
<record-editor v-bind:record="user[0]" title="Edit user"> <text-editor label="User name" property="username"></text-editor> <text-editor label="Email" property="email"></text-editor> </record-editor> <!-- For the binding syntax, I am not sure what should I use to bind to a record in the lists shown before --> <record-editor v-bind:record="groups[0]" title="Edit group"> <text-editor label="groupName" property="groupName"></text-editor> <text-editor label="Description" property="description"></text-editor> </record-editor>Right now, what I have is:
(function() { var textEditor = Vue.component('text-editor', { template: "#text-editor", props: ['label', 'property'] }); var recordEditor= Vue.component('record-editor', { template: '#model-editor', props: ['title', 'record'] }); var vue = new Vue({ el:"#someContainer", data: { users : users, groups: groups } }) }()) <template id="text-editor"> <div> <label v-bind:for="property">{{label}}</label> <!-- need help figuring what to put in v-bind:value --> <input type="text" v-bind:name="property" v-bind:id="property" v-bind:value=""> </div> </template> <template id="record-editor"> <div> <h2>{{title}}</h2> <form> <slot></slot> </form> </div> </template>So basically, what I am missing is how to bin to the elements in the list to edit them.
And how can I dynamically define properties for the sub components (text-editor).
Passing props with programmatic navigation Vue.js
I have a Vue component that has a prop named 'title' e.g:
<script> export default { props: ['title'], data() { return { } } } </script>I navigate to the component programmatically after a certain action is complete. Is there a way to programmatically route a user while also setting the prop value? I know you can create a link like this:
<router-link to="/foo" title="example title">link</router-link>However, is there a way to do something like the following?
this.$router.push({ path: '/foo', title: 'test title' })EDIT:
As suggested I've changed my route to the following:
{ path: '/i/:imageID', component: Image, props: true }And the navigation to the following:
this.$router.push({ path: '/i/15', params: {title: 'test title' }})However, my Image component (template - see below) still doesn't show any title.
<h1>{{ title}}</h1>Is there anything that could be causing issues?
Pass value from a component to the parent instance
I have a component named cartComponent with a data property cartCount that gets incremented whenever a new item is added to the cart.
I need to use that value to update the value in the template which is not a part of the component. Is this possible?
Here's is the script for my parent Vue instance:
new Vue({ el: "#cart-app", components: { cart: cartComponent }, data: { searchQuery: '', appliedFilters: ['Day 1'], purchaseData: json, cCount: 0 // CARTCOUNT; NEEDS TO BE UPDATED FROM COMPONENT } });Defending Net Neutrality: Millions Rally to Save the Internet, Again
We’re fighting for net neutrality, again, because it is crucial to the future of the internet. Net neutrality serves to enable free speech, competition, innovation and user choice online.
On July 12, it was great to see such a diversity of voices speak up and join together to support a neutral internet. We need to protect the internet as a shared global public resource for us all. This Day of Action makes it clear, yet again, that net neutrality it a mainstream issue, which the majority of Americans (76% from our recent survey) care about and support.
We were happy to see a lot of engagement with our Day of Action activities:
- Mozilla collected more than 30,000 public comments on July 12 alone — bringing our total number of public comments to more than 75,000. We’ll be sharing these with the FCC
- Our nine hour Soothing Sounds of Activism: Net Neutrality video, along with interviews from Senators Al Franken and Ron Wyden, received tens of thousands of views
- The net neutrality public comments displayed on the U.S. Firefox snippet made 6.8 million impressions
- 30,000 listeners tuned in for the net neutrality episode of our IRL podcast
The Day of Action was timed a few days before the first deadline for comments to the FCC on the proposed rollback of existing net neutrality protections. This is just the first step though. Mozilla takes action to protect net neutrality every day, because it’s obviously not a one day battle.
Net neutrality is not the sole responsibility any one company, individual or political party. We need to join together because the fight for net neutrality impacts the future of the internet and everyone who uses it.
What’s Next?
Right now, we’re finishing our FCC comments to submit on July 17. Next, we’ll continue to advocate for enforceable net neutrality through all FCC deadlines and we’ll defend the open internet, just like we did with our comments and efforts to protect net neutrality in 2010 and 2014.
The post Defending Net Neutrality: Millions Rally to Save the Internet, Again appeared first on The Mozilla Blog.
Defending Net Neutrality: A Day of Action
As always, Mozilla is standing up for net neutrality.
And today, we’re not alone. Hundreds of organizations — from the ACLU and GitHub to Amazon and Fight for the Future — are participating in a Day of Action, voicing loud support for net neutrality and a healthy internet.
“Mozilla is supporting the majority of Americans who believe the web belongs to individual users, without interference from ISP gatekeepers,” says Ashley Boyd, Mozilla’s VP of Advocacy. “On this Day of Action, we’re amplifying what millions of Americans have been saying for years: Net neutrality is crucial to a free, open internet.”
“We are fighting to protect net neutrality, again, because it’s crucial to the future of the internet,” says Denelle Dixon, Mozilla Chief Legal and Business Officer. “Net neutrality prohibits ISPs from engaging in prioritization, blocking or throttling of content and services online. As a result, net neutrality serves to enable free speech, competition, innovation and user choice online.”
The Day of Action is a response to FCC Commissioner Ajit Pai’s proposal to repeal net neutrality protections enacted in 2015. The FCC voted to move forward with Pai’s proposal in May; we’re currently in the public comment phase. You can read more about the process here.
Here’s how Mozilla is participating in the Day of Action — and how you can get involved, too:
Nine hours of public comments. Over the past few months, Mozilla has collected more than 42,000 comments from Americans in defense of net neutrality.
“The internet should be open for all and not given over to big business,” wrote one commenter. “Net neutrality protects small businesses and innovators who are just getting started,” penned another.
We’ll share all 42,000 comments with the FCC. But first, we’re reading a portion of them aloud in a nine-hour, net neutrality-themed spoken-word marathon.
And we’re showcasing the comments on Firefox, to inspire more Americans to stand up for net neutrality. When Firefox users open a new window today, a different message in support of net neutrality will appear in the “snippet,” the bulletin above and beneath the search bar.
It’s not too late to submit your own comment. Visit mzl.la/savetheinternet to add your voice.
A word from Senators Franken and Wyden. Senator Al Franken (D-Minnesota) and Senator Ron Wyden (D-Oregon) are two of the Senate’s leading voices for net neutrality. Mozilla spoke with both about net neutrality’s connection to free speech, competition, and innovation. Here’s what they had to say:
Stay tuned for more interviews with Congress members about the importance of net neutrality.
Comments for the FCC. Mozilla’s Public Policy team is finishing up comments to the FCC on the importance of enforceable net neutrality to ensure that voices are free to be heard. They will speak to how net neutrality fundamentally enables free speech, online competition and innovation, and user choice. Like our comments from 2010 and 2014, we will defend all users’ ability to create and consume online, and will defend the vitality of the internet. User rights should not be used in a political play.
Net neutrality podcast. We just released the second episode of Mozilla’s original podcast, IRL, which focuses on who wins — and who loses — if net neutrality is repealed. Listen to host Veronica Belmont explore the issue in depth with a roster of guests holding different viewpoints, from Patrick Pittaluga of Grubbly Farms (a maggot farming business in Georgia), to Jessica González of Free Press, to Dr. Roslyn Layton of the American Enterprise Institute.
Subscribe wherever you get your podcasts, or listen on our website.
Today, we’re amplifying the voices of millions of Americans. And we need your help: Visit mzl.la/savetheinternet to join the movement. The future of net neutrality — and the very health of the internet — depends on it.
The post Defending Net Neutrality: A Day of Action appeared first on The Mozilla Blog.
Mozilla Fully Paid Parental Leave Program Officially Rolls Out Worldwide
For most countries around the world, school is out, and parents are reconnecting with their kids to enjoy road trips and long days. Many of our Mozilla employees have benefited from the expanded parental leave program we introduced last year to spend quality time with their families. The program offers childbearing parents up to 26 weeks of fully paid leave and non-childbearing (foster and adoptive parents, partners of childbearing) parents up to 12 weeks of fully paid leave.
This July, we completed the global roll out of the program making Mozilla a leader in the tech industry and among organizations with a worldwide employee base.
What makes Mozilla’s parental leave program uniqueAnd sets us apart from other tech companies and other organizations:
- 2016 Lookback: A benefit for employees who welcomed a child in the calendar year prior to the expanded benefit being rolled out.
- Global Benefit: As a US-based company with employees all over the world, we chose to offer it to employees around the world — US, Canada, Belgium, Finland, France, Germany, the Netherlands, Spain, Sweden, UK, Australia, New Zealand, Taiwan.
- Fully Paid Leave: For all parents, they’ll receive their full salary during that time.
“Our second son was born in January 2017. When I heard about the new policy that Mozilla will launch globally one month before, I first was not sure how that will work out with the statutory parental leave rules in Germany. But I have to say that I first enjoyed working with Rachel to work out all the details — and now I get enjoy a summer with my family. The second child has changed my life completely, it was hard to match work and family needs. I am grateful that I will have time to give back to my son and my family and grow even more closer together.” Domnick Strohmeier, based in Berlin, Germany. Two children, with second child born in 2017.
“Our daughter was born in 2016,” says Chelsea Novak, Firefox Editorial Lead. “When Mozilla announced this new parental leave policy we were excited for parents that were expecting in 2017, but a little sad that we missed out. Having Mozilla extend these new parental leave benefits to us was very generous and gave us some precious time with our family that we weren’t expecting.” Chelsea and Matej Novak, both longtime Canadian Mozilla employees, based in Toronto. Two children, ages 1 and 3.
“I started with Mozilla in the beginning of 2016, and delivered my child that same year. When I first heard of the policy, I didn’t think the new parental leave would apply to me. Then, Rachel told me the good news. I was amazed that they would extend the parental leave policy to me so that I can take additional time off in 2017. Mozilla is so generous to parents like myself to enjoy special moments like watching my daughter take her first steps or saying her first words.” Jen Boscacci, based in Mountain View, California. Two children, with second child born in 2016.
“Being able to take advantage of the 26 weeks of leave — and have the flexibility of when to take it — was an incredible gift for our family. Knowing that the company was so supportive made the experience as stress free as having a newborn can be! I’m so grateful to work for such a progressive and kind company — not just in policies but in culture and practice.” Maura Tuohy, based in San Francisco. Her first child was born in 2017.
This program helps us embrace and celebrate families of all kinds, whether its adoption and foster care, we expanded our support for both childbearing and non-childbearing parents, independent of gender or situation. We value our Mozilla employees, because juggling between work and family responsibilities is no easy feat.
The post Mozilla Fully Paid Parental Leave Program Officially Rolls Out Worldwide appeared first on The Mozilla Blog.
Talking to Technical People
New Research: Is an Ad-Supported Internet Feasible in Emerging Markets?
Since the Internet’s earliest days, advertising has been the linchpin of the digital economy, supporting businesses from online journalism to social networking. Indeed, two of the five largest companies in the world — Facebook and Google — earn almost all of their revenue through digital advertising.
As the Internet reaches new users in India, Kenya, and elsewhere across the Global South, this model is following close behind. But is the digital advertising model that has evolved in developed economies sustainable in emerging economies? And if it’s not: What does it mean for the billions of users who are counting on the Internet to unlock new pathways to education, economic growth, and innovation?
Publishers see drastically less revenue per user in these regions, partly because low-income populations are less valuable to advertisers, and partly because constraints on the user experience — low-quality hardware, unreliable network coverage, and a dearth of local content — fundamentally limit how people engage with digital content and services.
As a result, users in emerging markets will have fewer choices, as local content providers and digital businesses will struggle to earn enough from their home markets to compete with the global platforms.
Today, we’re publishing “Paying Attention to the Poor: Digital Advertising in Emerging Markets.”
It’s fresh research conducted by Caribou Digital and funded by Mozilla that explores the barriers traditional digital advertising models face in emerging economies; the consequent impact on users, businesses, and the health of the Internet; and what new models are emerging.
In summary:
Ad revenue-wise, there is an order-of-magnitude difference between users in developed economies and users in the Global South.Facebook earns a quarterly ARPU (average revenue per user) of $1.41 in Africa and Latin America, and $2.07 in Asia-Pacific — an order of magnitude less than the $19.81 it earns in the U.S. and Canada
As a result, just over half of Facebook’s total global revenue comes from only 12% of its users
The high cost of data in emerging markets is one driver of ad blockingDue to prohibitive data costs and slower network speeds, many Internet users in emerging markets use proxy browsers, such as UC Browser or Opera Mini, which reduce data consumption and also block ads
One report by PageFair claims over 309 million users around the world used mobile ad blockers in 2016 — with 89 million hailing from India and 28 million hailing from Indonesia
A dearth of user data — or, the “personal data gap” — presents another challenge to advertisers.In developed economies, data profiling and ad targeting has been a boon to advertisers. But in the Global South, people have much smaller digital footprints
Limited online shopping, a glut of open-source Android devices, and a tendency toward multiple, fragmented social media accounts dilutes the value of personal data to advertisers
Limited advertising revenue in emerging markets challenges local innovation and competition.Publishers and developers follow the money. As a result, content is targeted to, and localized for, developed markets like the U.S. or Japan — even producers in emerging markets will ignore their domestic market in favor of more lucrative ones
Large companies like Facebook have the resources to subsidize forays into unprofitable markets; smaller companies do not. As a result, the reigning giants become further entrenched
A lack of local content can have deeply negative implications.Availability of local content is a key demand-side driver for increasing Internet access for marginalized populations, and localized media can foster inclusion and support democratic institutions
But without viable economic models for supporting this content, opportunity is squandered. Presently, the majority of digital content — including user-generated content such as Wikipedia — is in English
The outlook for digital advertising-supported businesses in emerging markets is bleak.Low monetization rates will continue to limit the types of Internet businesses that can flourish in the Global South
To succeed, businesses in the Global South have to build more strategically, working toward profitability (and not user growth) from the very beginning
These constraints demand new business model innovations for an Internet ecosystem that is evolving differently in the Global South“Sponsored data” or “incentivized action” models which offer free data in return for engagement with an advertiser’s content are one approach to mitigating the access and affordability constraint
Transactional revenue models, such as those seen in digital financial services, will play an increasingly important role as payments infrastructure matures
You can read the full report here.
In the coming weeks and months, Mozilla and Caribou Digital will share our findings with allies across the Internet health space — the network of NGOs, institutions, and individuals who are working toward a more healthy web. We hope our learnings will help unlock innovative solutions that balance commercial success with openness and freedom online.
The post New Research: Is an Ad-Supported Internet Feasible in Emerging Markets? appeared first on The Mozilla Blog.