WPWeekly Episode 360 – CBD and E-Commerce With Javier Cano

In this episode, John James Jacoby and I are joined by Javier Cano, Director of Marketing for Liquid Web. We discuss the challenges people are facing selling CBD products on e-commerce platforms such as Shopify and WooCommerce and what Liquid Web is doing to be an ally to the industry. We also talk about high-risk payment processors and the brick and mortar approach versus selling high-risk products online. Cano also shares his experiences from attending and speaking at recent CBD expos.

WPWeekly Meta:

Next Episode: Wednesday, July 24th 3:00 P.M. Eastern

Subscribe to WordPress Weekly via Itunes

Subscribe to WordPress Weekly via RSS

Subscribe to WordPress Weekly via Stitcher Radio

Subscribe to WordPress Weekly via Google Play

Listen To Episode #360:

Adobe Photoshop Elements 15 Review: Photo-Editing at the Tips of Your Fingers

Adobe Photoshop is a staple in the graphic design and photo-editing world. Made and published for Windows and macOS, it’s been around since 1988 when digital art was first on the rise. Since it’s beginning, people all over the world have used Photoshop to edit and compose images in Photoshop’s own PSD and PSB file […]

The post Adobe Photoshop Elements 15 Review: Photo-Editing at the Tips of Your Fingers appeared first on designrfix.com.

10+ Best Plugins to Organize Your WordPress Media Library

Best Plugins to Organize Your WordPress Media LibraryToday’s websites have a tendency to take up space to display more images and use less text. A great number of media files like audio, video, and other multimedia items are also included to strengthen text content. But here’s the thing. Imagine that you are gonna upload about 10 or 20 images per day. If […]

The post 10+ Best Plugins to Organize Your WordPress Media Library appeared first on WPExplorer.

YouAppi Delivers Open Measurement SDK

YouAppi has released its Open Measurement Software Development Kit (OM SDK), which is designed to make possible third-party viewability and verification measurement for ads served to mobile app environments without requiring multiple Ad Verification service providers (or measurement providers) SDKs.

Multi-Line Truncation with Pure CSS

Truncating a single line of text if is fairly straightforward. Truncating multiple lines is a bit harder. Using just CSS (no JavaScript or server-side dancing) is nice for the simplicity. It's gotten a little easier lately since Firefox (since version 68) has started supporting the ultra-bizarre -webkit-line-clamp soup method, which makes browser support for that pretty OK.

There is another way though, which is very clever and something I'd call a bonafide CSS trick. We somehow failed to cover it properly in our canonical post on line clamping, so I'll cover it here then add it to that post. I first saw this trick on the now-dead Mobify blog, and more recently covered by Natalia Onischuk on HackingUI.

The trick uses line height for measuring

Here's a big part of the trick. Imagine an element has a line-height of 1.4rem and you want to make sure it only shows a maximum of three lines of text. If you set the max-height to 1.4rem * 3, you've done it!

I'm not the worlds biggest fan of united line-height, but alas, it's necessary here to do the math. I'm also not the biggest fan of setting it over and over on elements, so let's set a variable we can use later, and then use it to set a global line-height.

html {
  --lh: 1.4rem;
  line-height: var(--lh);
}

Set that max height

The truncation happens just like this:

.truncate-overflow {
  --max-lines: 3;
  max-height: calc(var(--lh) * var(--max-lines));
  overflow: hidden;
}

You actually could leave it like this. That might be good enough if you don't care about the ellipsis.

The rest of the trick comes in when you want to display that ellipsis stuff

An ellipsis ("...") signifies that text has been truncated and continues longer than what it displayed. Using it is probably a pretty good practice when truncating text so the content doesn't come to an abrupt, awkward end. (Well, the content itself might be awkward anyway, but hey, you tried.)

If you set position: relative on the element, you can absolutely position the ellipsis in the bottom-right corner.

.truncate-overflow::before {
  content: "...";
  position: absolute;
  bottom: 0;
  right: 0;
}

I was very tempted to, instead of setting the bottom, to set the top and use top: calc(var(--lh) * (var(--max-lines) - 1)). My thinking there was that you might as well place the ellipsis at the exact point you need it. If the text is too short, the hidden overflow will cut it off. The problem with that is that it doesn't deal with the "exactly max lines lines" problem. The ellipsis will show when the text matches the max lines — not only when it exceeds that space.

We'll have to get trickier!

Note that this "setting stuff in the bottom-right" thing is pretty specific to left-to-right languages. I'm going to make the demo with CSS logical properties like inset-inline-end instead of right in hopes to make it more friendly to different languages and flow scenarios.

Another limitation is that the ellipsis doesn't attach itself to the final word since it's absolutely placed. We're not going to fix that as well.

Let's cover up the ellipsis when the text is too short

This is the second part of the trick. If we position the absolute at the bottom/end of the text all the time, that's fine. But if the text is exactly equal to the --max-lines value or less, we want to hide it.

The trick there is to make a little box that is the same background as what is behind it and set it on top of the ellipsis to cover it. We can do that with the other pseudo-element:

.truncate-overflow::after {
  content: "";
  position: absolute;
  right: 0; /* note: not using bottom */
  width: 1rem;
  height: 1rem;
  background: white;
}

Another trick we're using here is not setting a bottom (inset-block-end) property. This places the box at the bottom of the content rather than the bottom of the relative parent, which is very useful.

Let me make the boxes red so you can see them in these three different examples:

The top example has more than three lines, so we see the ellipsis. The second example only has two lines, so the red box shows that the ellipsis will be covered up (but imagine a white box instead). The last example shows that this system works even when the content is exactly the same as the value of --max-lines.

Demo

See the Pen
Pure CSS multi-line truncation
by Chris Coyier (@chriscoyier)
on CodePen.

I usedwanted to use CSS logical properties here, as the browser support has gotten pretty good. If you're supporting any version of IE, you'll have to use the bottom and right.

This browser support data is from Caniuse, which has more detail. A number indicates that browser supports the feature at that version and up.

Desktop

ChromeOperaFirefoxIEEdgeSafari
6962*41No7612.1

Mobile / Tablet

iOS SafariOpera MobileOpera MiniAndroidAndroid ChromeAndroid Firefox
12.2-12.346*No677567

The post Multi-Line Truncation with Pure CSS appeared first on CSS-Tricks.

APIs show Faster Growth Rate in 2019 than Previous Years

The ProgrammableWeb directory eclipsed the 22,000-API mark in June 2019 and this milestone gives us a chance to look at what the data can tell us about the API economy. Since 2005, we've seen APIs grow from a curiosity to a trend, and now to the point where APIs are core to many businesses. APIs have provided tremendous value to countless organizations and developers, which is reflected in their continued growth.

Build and Graduate Your App in RingCentral

A developer journey starts with building the app, testing it, maintaining it, and then moving it into production.

RingCentral deals with different kinds of APIs that offer reliable VoIP calling, web meetings, fax, and more features over cloud communication with reliability, security, and quality.

The Northwind PostgreSQL Sample Database Running on a Distributed SQL Database

The Northwind database is a sample database that was originally created by Microsoft and used as the basis for their tutorials in a variety of database products for decades. The Northwind database contains the sales data for a fictitious company called “Northwind Traders,” which imports and exports specialty foods from around the world. The Northwind database is an excellent tutorial schema for a small-business ERP, with customers, orders, inventory, purchasing, suppliers, shipping, employees, and single-entry accounting. The Northwind database has since been ported to a variety of non-Microsoft databases including PostgreSQL.

In this post, we are going to walk you through how to download and install the PostgreSQL-compatible version of Northwind on the YugaByte DB distributed SQL database.

How to Use a Vue Pivot Grid UI Component in Your Web App

In this post, we will review the PivotGrid component. Unlike a typical grid, a PivotGrid lets you change the way the data is presented. For example, you may have a data set with inventory items that include the number in stock, category, store, and quarter. You can create a PivotGrid to analyze the total inventory in stock by store and by quarter. Or, you can view the inventory in stock by category and by store. These different perspectives can be viewed in the same grid just by selecting which fields to use for the row and column of the grid. In a regular grid, you could only create one static view. 

Getting Started

We will need the PivotGrid, the PivotConfigurator, and the PivotDataSource components. The PivotGrid displays our summarized data. The PivotConfigurator helps us build the PivotGrid. And the PivotDataSource is an extension of the DataSource component used to bind our data to the PivotGrid and PivotConfigurator. First, we will initialize our project using the Vue webpack-simple template. Then, we will install Kendo UI, a theme, the PivotGrid package, and the DataSource package.

Best Practices for Using Maybes and Creating Default Values

Introduction

You’ve learned that using Maybes allows you to get rid of null pointer exceptions (i.e. “undefined is not a function”). However, now your application fails and gives no indication as to why. Errors would have left a stack trace that could have provided a hint as to where the problem originated, but, clearly here, you don't have that to rely on. What should you be doing instead?

Null Pointers in Python vs. Ruby, Lua, and JavaScript

Let’s define what we mean by null pointers and how you usually encounter them. Most null pointers you’ll run into are from either accessing a property of an object to show on the screen or calling a method on an object.

Conference Report: Esri User Conference 2019

I appreciate the opportunity to attend Esri's 2019 User Conference July 8 -12 at the San Diego Convention Center with more than 18,500 attendees. Prior to the plenary sessions on Monday, there were 18 pre-conference seminars and four summits that ran concurrently with the seminars and the conference:

  • Engineering — which explored how engineering companies today are using new GIS technology

PostgreSQL Independent Event Correlation Analysis: User-Car Fitting

Background

Independent event correlation analysis is very interesting. For example, the "Passing By" function points of some apps can indicate that you've been in a similar location with a different person at a different time. Independent event correlation analysis can also be used for public opinion analysis, sales portfolio for commodities, and user-car fitting.

User-car fitting in the safety system processes spatio-temporal data for fitting drivers, passengers, and vehicles.

Test Pens with Cypress

Cypress is an integration testing tool for websites. You use it to control the browser and then test that things are as you think they should be. Visit this URL, type this, click here, find this element, test for this text, see if the URL changed, etc. We use it here at CodePen to test CodePen itself!

You can also use it to test a Pen! Gleb Bahmutov blogged about this over on the Cypress blog a little while back.

There is a little hoop-jumping in there to get access to testing inside the iframe that CodePen uses to show a preview of your code. That should still work, but it's even easier if you Go PRO and then use the Debug Mode URL to test.

The post Test Pens with Cypress appeared first on CodePen Blog.

Jest on CodePen

Jest is a big name in JavaScript testing. We use it ourselves on CodePen to do our JavaScript unit tests. Koen Vendrik has created a way to run Jest in the browser (rather than in Node): jest-lite.

Here's a Pen from Koen that I lightly doctored up to be more in the CodePen format. It tests some React code:

See the Pen
jest-lite CDN Example
by Chris Coyier (@chriscoyier)
on CodePen.

There are other testing frameworks!

There is Mocha/Chai, Jasmine, Tape, qUnit... all of which can work on CodePen. Benjamin Gandhi-Shepard has a blog post about that. Here's Jasmine (which is also capable of testing React):

See the Pen
Unit Testing JS with Jasmine
by BROWNERD (@brownerd)
on CodePen.

The post Jest on CodePen appeared first on CodePen Blog.