Problem/Motivation

Part of #1864980: [meta] Figure out how to integrate Views into core.

Beta phase evaluation

This is appropriate for 8.0.x.

It is a major task that has impact greater than disruption, so it can proceed in 8.0.x.

Reference: https://www.drupal.org/core/beta-changes
Issue category Task because the functionality of these listings is already in core (with custom code)
Issue priority Major because this Meta is about replacing core listings in many places, across systems, and has community consensus for being important. Not critical because we can release 8.0.0 without completing the conversion to views and do it in a later release. Keeping the custom code (not converting a listing) will not cause severe performance or usability regressions.
Prioritized changes A bit, it maybe would reduce fragility by re-using views code and getting rid of custom listing code.
Disruption It will not be disruptive for core/contributed and custom modules/themes because it will not require a BC break/deprecation/widespread changes since changes are isolated to core listing custom code.

Proposed resolution

Let's collect all pages/blocks etc. which could be replaced directly with a view, grouped by module.

Conversions of page listings

Conversions of block listings

Conversions of administrative listings

Related issues

(form the issue summary of #1864980: [meta] Figure out how to integrate Views into core)

Comments

larowlan’s picture

forum blocks

lilou’s picture

rss

larowlan’s picture

User blocks:
Newest users
Who's online

xjm’s picture

xjm’s picture

I went through all the blocks from #1535868: Convert all blocks into plugins:

Most likely Views

  1. Aggregator category block (CategoryBlock).
  2. Aggregator feed block (FeedBlock).
  3. Comment "Recent comments" block (RecentBlock)
  4. Forum "Active forum topics" block (ActiveBlock) (Would probably need forum data integration for {forum_index} to avoid potential performance regressions)
  5. Forum "New forum topics" block (NewBlock) (as above)
  6. Node "Recent content" block (RecentBlock)
  7. Statistics "Popular content" block (StatisticsPopularBlock)
  8. User "Who's new" block (UserNewBlock)
  9. User "Who's online" block (UserOnlineBlock)

Maybe Views?

  1. Language switcher block
  2. Poll "Recent poll" block (PollRecentBlock) but maybe not. (You can make this block with a view, but it's only one record.)
  3. Shortcut ShortcutsBlock? (Would require shortcut intergation)
  4. Search block (could be an exposed form block for a search view)

Not Views

  1. Book menu block
  2. Menu, system menu, and custom menu blocks
  3. System help block (conceptually view-like, but help is provided as a bunch of hook implementations rather than database content.)
  4. System main content block (though, note that all page displays end up in this block)
  5. System "Powered by Drupal" block
  6. User login block

An interesting thing about several of these is that the block derivatives in the current patch are filling the role of Views' arguments.

xjm’s picture

Issue summary:View changes

update

realityloop’s picture

andyceo’s picture

If #1874534: Introduce a dblog / watchdog views integration will be implemented, than there will be another place for views: reports/dblog.

damiankloip’s picture

#6 possible cross over with #1823608: Admin views in core and related.

YesCT’s picture

what criteria makes a listing a good candidate for converting to views?

I'm guessing admin/structure/taxonomy would need to stay custom, but it's just a guess.

Crell’s picture

YesCT: A good candidate for Views, IMO, is:

"Can it be replicated more or less as-is without loss of functionality by a View, without writing additional use-case-specific Views plugins?"

If yes, make it a View.

If no: "Can a generically-useful Views plugin be written such that the first question becomes true?"

If yes, write that plugin and make it a View.

If no, do not make it a View.

xjm’s picture

Title:List all places in which views could be used» [Meta] Identify listings to convert to views
ParisLiakos’s picture

Also. search result listings, see catch's comment here #702940-45: Make the the number of search results per page settings configurable

plach’s picture

Given #10 what about node comments? Among the rest, this would make #1807322: Filter comments taking into account the current content language not necessary.

Crell’s picture

plach: That probably would require an in-core hierarchical/nesting style plugin, and for SCOTCH to complete so that it can be "just a block" (that is, a View). If someone were to write that, it would be kinda awesome. :-) (That falls into category 2 from comment 10.)

plach’s picture

Yep, exactly :)

I guess this would be feature, or would it fall into the conversion umbrella?

klonos’s picture

The modules/extend page!

klonos’s picture

Issue summary:View changes

Updated issue summary.

klonos’s picture

Issue summary:View changes

...adding related issues from the issue summary of #1864980: [meta] Figure out how to integrate Views into core

nigelw’s picture

Permissions administration

tim.plunkett’s picture

Neither of those would be able to be listed by views. Unless you write a new query backend.

klonos’s picture

I know :/ ...

As I said in #1868444-28: Introduce tags[] in module.yml file to categorize modules by provided functionality. , we'd first need some way to convert modules to entities (parse the actual modules from the file system and auto-create corresponding entities that are listed in that page).

klonos’s picture

Also the brand new "Add block" page (/admin/structure/block/list/block_plugin_ui:[theme]/add) and the "Custom block types" page (/admin/structure/custom-blocks).

dawehner’s picture

@klonos
Please try to keep this issue on focus. Views is primarily a tool for listing entities, so yeah in theory blocks could be listed by it, and even modules, but that's more a academic project :)

dawehner’s picture

Issue summary:View changes

...removing this very issue from the list of related - doesn't make sense.

tstoeckler’s picture

peximo’s picture

klonos’s picture

@dawehner, #21:

Please try to keep this issue on focus. ...

I missed the fact that #430886: Make all blocks fieldable entities got kicked to D9 back in December. So, yeah academic I guess for D8. Or perhaps pave the way ;)

xjm’s picture

Title:[Meta] Identify listings to convert to views» [Meta] Convert core listings to Views
xjm’s picture

Issue summary:View changes

Updated issue summary.

xjm’s picture

xjm’s picture

Issue summary:View changes

Updated issue summary.

larowlan’s picture

larowlan’s picture

Issue summary:View changes

Updated issue summary.

larowlan’s picture

Issue summary:View changes

Updated issue summary.

kim.pepper’s picture

kim.pepper’s picture

Issue summary:View changes

Added link to 1986606

kim.pepper’s picture

Issue summary:View changes

Added comments admin link under administrative listings.

tim.plunkett’s picture

Issue summary:View changes

Updated issue summary.

oadaeh’s picture

This is just an FYI. I started working on the blocks in preparation for tomorrow's sprint. What I've started are:

  • Forum "Active forum topics" block (ActiveBlock) (Would probably need forum data integration for {forum_index} to avoid potential performance regressions)
  • Forum "New forum topics" block (NewBlock) (as above)
  • Node "Recent content" block (RecentBlock)
  • User "Who's new" block (UserNewBlock)
  • User "Who's online" block (UserOnlineBlock)

I didn't see any issues where blocks were being worked on, so if there is one or more, please point me to them.

xjm’s picture

oadaeh’s picture

Shouldn't the Node "Recent content" block (RecentBlock) block display be part of this view: #1895160: Convert admin/content to a View, keep a non-views fallback with no bulk operations?

The More link at the bottom of the block is a link to admin/content.

xjm’s picture

@oadaeh, sounds like a great followup issue to add the additional display. :)

xjm’s picture

Issue summary:View changes

Add aggregator conversion issue

xjm’s picture

@oadaeh, do you have issues for any of the items you list in #29?

oadaeh’s picture

After recreating the "Recent content" view (for the second time), I'm having second thoughts about whether it should be part of #1895160: Convert admin/content to a View, keep a non-views fallback with no bulk operations because I had to override every section to get all the settings correct. (Well, every section except for Header, Footer, and No results behavior.)

oadaeh’s picture

Sorry for the delay. Here they are:

I will update the summary.

oadaeh’s picture

Issue summary:View changes

Updated issue summary.

xjm’s picture

xjm’s picture

Issue summary:View changes

Add newly created block issues.

xjm’s picture

Issue summary:View changes

Updated issue summary.

klonos’s picture

Issue summary:View changes

...added #2005166 to the list of related issues.

klonos’s picture

Issue summary:View changes

...added #1874534 and rearranged issues chronologically also fixed a minor typo.

jhodgdon’s picture

jhodgdon’s picture

Issue summary:View changes

Added search module to the list

joelpittet’s picture

Would it be possible to make forums/forum_list's into table views?

larowlan’s picture

I don't think we have the views integration, but it would be worth a shot

webchick’s picture

Issue summary:View changes
dawehner’s picture

@larowlan
We do have a basic views integration for {forum_index}

larowlan’s picture

Ok, will take a look

xjm’s picture

Priority:Normal» Major
Issue tags:+beta target

These conversions are not release-blocking, but they are an important part of the win of VDC, and it would be desirable to have many of them available by beta 1. I have vague memories of discussing this with @dawehner previously and him having some concerns, but I've forgotten now how it went. :)

jhodgdon’s picture

FYI, I think we've decided to "won't fix" the idea of making search results pages into Views. With #1853536: Reintroduce Views integration for search.module (not supporting backlinks view) people will have the ability to make views with search keywords as the filter (that needs a review, hint hint!) but I think we've decided that the search results page itself is not going to be converted to a view.

I am posting this here rather than updating the issue summary in case it merits further discussion, which I suppose should perhaps happen on the issue itself? (#2083717: Convert Search Results to Views)

xjm’s picture

Issue summary:View changes
xjm’s picture

xjm’s picture

Issue summary:View changes
xjm’s picture

Issue summary:View changes
askibinski’s picture

Shouldn't the custom block library listing also be converted to a view?
/admin/structure/block/block-content

larowlan’s picture

Yes, but we need views integration for block content first, which would be a feature at this stage

effulgentsia’s picture

Yes, but we need views integration for block content first, which would be a feature at this stage

Is there a discussion where that was decided? IMO, a content entity type that has non-ephemeral storage, but cannot be queried by Views, is a bug.

jibran’s picture

dawehner’s picture

Issue summary:View changes
YesCT’s picture

Issue summary:View changes

doing https://www.drupal.org/contributor-tasks/update-allowed-beta
evaluating for https://www.drupal.org/contribute/core/beta-changes
using Drupal 8 beta phase evaluation template https://www.drupal.org/node/2373483

it is not an "unfrozen" only change. it is not on the "priority" list... although maybe "reduce fragility"... I need some help thinking about fragility.

I need some help describing its disruption:
Will it be disruptive for core/contributed and custom modules/themes because it will require a BC break/deprecation/internal refactoring/widespread changes... ?

updated the issue summary. please make any corrections there (and add a comment as to why).

I think then, we can make a similar update on open child issues saying they can proceed as part of this.