Display content examples on entity display pages

Created on 14 December 2022, over 1 year ago
Updated 29 May 2023, about 1 year ago

Problem/Motivation

It is hard to relate the display with the real result, even been a developer.

Steps to reproduce

Display table.

Proposed resolution

Open link a default view mode per node/taxonomy/user... entity and in a modal the view modes that are do not have a own URL like paragraphs, node teaser...

Remaining tasks

User interface changes

Display an "example" link on each cell. It can use the current database and select a random element or several "example: 1, 2, 3, 4, 5"
(I guess that selecting an existing element will be easier than creating a new component on the run time, if there is no examples, show nothing or "not in use")

Feature request
Status

Fixed

Version

1.2

Component

Code

Created by

🇪🇸Spain GeduR

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇪🇸Spain tunic Madrid

    You mean adding in the below screenshot links at the points 1, 2, 3, 4 and 5 that point either to a URL where the content is displayed using the given view mode or, in case the view mode has no URL, a modal view with a content of the given type using the given display mode, right?

    I'm not sure how to detect if that display mode has URL or not.

  • 🇪🇸Spain tunic Madrid

    Mm... what about integrating with the View Mode Page module?

    If there's a module for that is because is tricky at least. If that module is installed and configured Xray could display the link.

  • 🇪🇸Spain GeduR

    That's precisely what I imagined.

    I suggest adding a link at the end of each view mode like "See example" that redirects to the canonical page or opens in a modal.
    In case it is a modal (e.g. a paragraph) it should display a link to the entity that contains the element so you can see it also in context.
    The entities displayed should be random, so I get different visualizations to help me to understand.

  • 🇪🇸Spain tunic Madrid

    The main problem is to load the content using the proper theme. I've tested View Mode Page but it doesn't seem to take the theme into account. So we'll need a way to do this, because displaying the entity with the admin theme is... well, not ideal.

    Currently:

    And we need:

    We'll need front end knowledge here!

  • 🇪🇸Spain tunic Madrid

    Well, my previous comment is if we want to preview the item in the same page. We can just add a link to a special crafted page with the entity rendered using a certain display mode. This could the first iteration.

  • 🇪🇸Spain tunic Madrid

    Something important: currently Xray Audit doesn't have any report on paragraphs. Before solving this issue for paragraphs I guess we need a paragraphs report. Time to create a new issue?

  • Assigned to frouco
  • @frouco opened merge request.
  • Issue was unassigned.
  • Status changed to Needs review about 1 year ago
  • 🇪🇸Spain frouco

    Examples display was added to all the Entities Displays lists.
    An example is displayed randomly each time the "See example" link is clicked

    MR created and ready to review https://git.drupalcode.org/project/xray_audit/-/merge_requests/13

  • First commit to issue fork.
  • Status changed to Fixed about 1 year ago
  • 🇪🇸Spain lpeidro Madrid

    Test Ok, it works as expected.
    I merged the feature and set the issue as fixed.

    Thanks @Fran for your work.

  • Status changed to Fixed about 1 year ago
Production build 0.69.0 2024