Problem/Motivation

In #2449371: Link to container raw data we introduced a raw data view alongside the structured view. In #2451161: Standardise property output and make custom build() optional we are adding a table of values. They are currently placed below each other in foldable details elements, which can be clunky to use.

Proposed resolution

Use tabs. Local tasks is a start, but ideally we would have the tab row in direct connection to the data display. There is no pattern like that in Core so I'm not sure how to do it.

Remaining tasks

User interface changes

API changes

Comments

mbovan’s picture

Issue summary: View changes
Status: Active » Needs review
StatusFileSize
new58.38 KB
new70.6 KB
new73.75 KB
new93.66 KB

Discussed with @miro_dietiker and @Berdir. Here is the current proposal (screenshots only).

Container view, in case there is no plugin applied. Raw data tab is added.

Raw data page looks like:

In case the plugin is applied, list of properties is displayed.

In case the plugin is applied and it has specialized display, the container view looks like:

mbovan’s picture

Here is the patch with the changes from screenshots. Updated tests.

Also added a message in case there is no plugin configured.

Status: Needs review » Needs work

The last submitted patch, 2: use_tabs_for_switching-2462945-2.patch, failed testing.

mbovan’s picture

Status: Needs work » Needs review
StatusFileSize
new14.29 KB
new610 bytes

No errors locally.
I guess, I need to call $container->urlInfo()->setAbsolute(TRUE) instead $container->url().

The problem is when Drupal is installed in subdirectory (like Testbot).
url() returns the base directory (in this case /checkout) which is then added twice in drupalGet().

arla’s picture

Screenshots look nice.

If the plugin has specialized display, will we want to see also the default output, i.e. the list of property values? If so, should that be another tab?

Status: Needs review » Needs work

The last submitted patch, 4: use_tabs_for_switching-2462945-4.patch, failed testing.

mbovan’s picture

Status: Needs work » Needs review
StatusFileSize
new14.45 KB

Rerolled.

@Arla: There would be a problem that default output is displayed "twice" (on the tab "Default display" page and container view page for the entities that don't have specialized display), except we deal with customAccessCheck() for local tasks or something similar...

Status: Needs review » Needs work

The last submitted patch, 8: use_tabs_for_switching-2462945-8.patch, failed testing.

mbovan’s picture

Status: Needs work » Needs review
StatusFileSize
new14.46 KB
new1.04 KB

Fixed some mistakenly rebased lines.

  • Arla committed 988ddab on 8.x-1.x authored by mbovan
    Issue #2462945 by mbovan: Use tabs for switching between modes of...
arla’s picture

Status: Needs review » Fixed
StatusFileSize
new1.57 KB

Fixed some comment cruft on commit (see interdiff). Committed and pushed!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.