postgresql – Is there anything wrong with splitting a complicated view into many small ones?

I have a view where each row is associated with a customer, and the columns are various computed values such as life_time_value and purchases_per_week, as well as more complicated statistical values such as probability_of_buying_premium_membership. I have around 20 such columns of varying complexity (both in terms of lines-of-code and also computional complexity), ranging from a single line of SQL to several dozen. Right now they are all in one monster view.

Is there a down-side to splitting them into multiple smaller views and joining them by customer_id?

Ie, break it down into views called
customer_life_time_value, customer_purchases_per_week and so on, and then recreate the monster view by joining 20 views? It seems like there shouldn’t be a performance hit because of the joining, as it’s over a indexed primary key. Many of the columns/views will perform similar calculations (purchases_per_week and purchases_per_quarter would look very similar), but it seems like the DB should be smart enough to share computation if I am selecting from the joined view.

I am using postgres, but interested for answers in general.

Creating a view which lists all taxnomy terms and the number they appear in a content type?

So i have a taxonomy called Product Warnings, and it has around 10 terms. This taxonomy is referenced in several content types (Small products, Large products, etc), and can be selected multiple times (so a user can select in the content type 1 or up to all 10 terms from the Taxonomy).

I want to create a view which lists all terms from the given taxonomy (that’s the easy part), and also count the number of times each terms is referenced in a specific content type (i.e. Small products)

So it would look like:

Eye damage: 44
Skin irritation: 13
Hair lose: 1 
.
.
.

Now, this is fairly easy to do with a db_query and custom code, but the trick is to do it in a view (if it’s possible)

8 – View only displays nodes that has comments when adding comment count field

On drupal 8 I am facing an issue with views.
I created a view listing all nodes of a certain content type.
I added basic fields, Title, Date content was created, and a read more link.
The view works fine with these fields, but when i add Comment Statistics: Comment count, all nodes that don’t have any comment don’t show up in the view.
It only lists nodes that received comments.

Any idea on how to fix this ? Am I doing something wrong ?

Thanks

8 – Table view: “Hide Empty Column” checkbox doesn’t seem to work

I’ve created a view, formatted as a table.

I’m trying to hide empty columns – so, in the table settings, I’ve checked the “Hide Empty Column” checkbox for most of the table columns.

However, this doesn’t seem to have any effect – these columns are still included in the rendered table, with empty <td>s.

I expect this checkbox to hide the column entirely when all data cells contain an empty value. Am I understanding this correctly?

This certainly seems to be how it worked in Drupal 7. (I’m converting an existing D7 site to D8 – and this is how the table columns were hidden on the D7 site.)

Is there anything I should check which might be preventing this from working as expected?

Thanks.

Present a hierarchal view (tree) containing sequential and parallel tasks

How would you present a hierarchal view (tree) containing sequential and parallel tasks?

  1. The tree can contain two levels of groups when each group can
    contain one or more tasks
  2. A specific group can contain either sequential tasks or parallel tasks
  3. The group could be collapsed and I still think we need a
    sequential/parallel indication in that case

privatemsg – Create view from custom SQL query

I have installed privatemsg module: https://www.drupal.org/project/privatemsg/

Now I would like to build a view with the last sent messages. But I can not build this from the views UI:

enter image description here

I have built the sql query to get the data I need.

How can I integrate this custom sql querty with views module? (Show my query in a html/table format with links to the each user is enough for me)

mobile web – Showing a full screen dialog to view a full list of radio button selection

I’m designing a sort of step by step process for mobile web using a stepper to get a bunch of information from a user. One of the steps requires a user to select from a list of (about 20) pre-defined locations or enter their own address (entering their own is not high priority). Since the stepper and the list of locations can get really long, I am having the user launch a modal to view all the choices in a full screen dialog so that they don’t have to scroll the stepper to select a location. The problem however is that after selecting a location (with a radio button) on the modal and closing it, how to show in the wizard what they have selected in the modal after the modal is closed. Does anybody have an idea? Is launching the modal even a good idea?
Before launching the modal
Modal with all options

magento2 – Filter and Gallery/List View Toggle Hidden in background

So I added a new custom theme based off of luma and I just made two changes to the catalog_category_view.xml

<referenceBlock name="catalog.leftnav" remove="true"/>

and

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">

Now my filter dropdown and the toggle for gallery and list is hidden behind the items. I have attached a photo below.

enter image description here

Any idea how I can fix this?

Reviewing the css, it looks like the

@media (min-width: 768px), print.page-layout-1column .toolbar-products

has position: absolute; and that seems to be culprit. Is this intended or a potential bug?