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 number of results per page 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.info.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.

jibran’s picture

Shortcut ShortcutsBlock? (Would require shortcut intergation)

Created #2502151: Convert shortcut block to view

xjm’s picture

Version: 8.0.x-dev » 8.2.x-dev
Issue tags: -beta target

This issue was marked as a beta target for the 8.0.x beta, but is not applicable as an 8.1.x beta target, so untagging.

As disruptive changes and feature additions, these would go into 8.2.x at this point.

woprrr’s picture

We should also reflect a naming standard views entities lists. For example I work on "form_mode_manager" now and I have to add a button " LocalAction " on a number of entities . My main problem is really the parameter " APPEAR ON " because I have here "guess" the name of entities listings depending on the entity or I add my local actions. When we use the listings of entities we had a common element

'appears_on' => ["entity.{$entity_type_id}.collection"];

In order to identify the list in question and with his views we have nothing in common ... eg : node = > ' system.admin_content ' media = > ' view.media.media_page_list ... Can we discuss of it here or from right thing? what are your opinions ?

I fully support this initiative ! goal we just need a naming rule I think.

dawehner’s picture

@woprrr
Please open dedicated issues for this kind of discussions and then feel free to link them from here.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.0-beta1 was released on August 3, 2016, which means new developments and disruptive changes should now be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

woprrr’s picture

Hi @dawehner,

Thank for your response, sorry for delay but I've focused all my efforts on Media last time. But i restart the developements about form mode / entities now and i 've created issue #2838944: Content entities overviews list standard.

I created too these issue #2838938: Taxonomy term overview with strong links with these issue because Taxonomy term overview need do appear in this issue to change with view overview page.

I'am okay to help my best in this efforts

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.0-alpha1 will be released the week of January 30, 2017, which means new developments and disruptive changes should now be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.0-alpha1 will be released the week of July 31, 2017, which means new developments and disruptive changes should now be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.0-alpha1 will be released the week of January 17, 2018, which means new developments and disruptive changes should now be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.7.x-dev

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

dqd’s picture

1.) Convert /admin/reports/fields to a view to change some aspects like the number of shown items per page or to filter and sort for certain things, etc. Therefore we need access to a listing type: fields.

2.) We can reach content type already in node views, but I would also vote for getting content type description. This would make it possible to show aggregated content type glossaries with count of entries and some nice description of the content type or we can even replace /node/add with a custom view.

colan’s picture

Issue summary: View changes
matsbla’s picture

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

AdamPS’s picture

What about /admin/structure/views? This could be a view and then people could customise it, for example see #2929931: Show view tags on administrative list of views. Shall I create an issue for it? It looks like we don't currently support a view of views, so it's probably a little tricky.

Berdir’s picture

We don't support views of config entities, so without https://www.drupal.org/project/efq_views in core there is no point in creating such an issue.

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.