- Issue created by @Chris Matthews
- ๐ซ๐ฎFinland lauriii Finland
Nice suggestion! This could be one potential way to try to address ๐ฑ Improve/Simplify situation around Default/Full view modes/view displays Active . ๐
- ๐บ๐ธUnited States Chris Matthews
Hopefully โจ Give roles a description value Needs work can get in too :)
- Assigned to PrabuEla
- Issue was unassigned.
- First commit to issue fork.
- last update
over 1 year ago 29,279 pass, 20 fail - @_shy opened merge request.
- First commit to issue fork.
53:38 52:37 Running- First commit to issue fork.
- last update
over 1 year ago 29,433 pass, 16 fail - last update
over 1 year ago Custom Commands Failed - last update
over 1 year ago 29,495 pass, 3 fail - last update
over 1 year ago 29,503 pass, 2 fail - last update
over 1 year ago 29,503 pass, 2 fail - last update
over 1 year ago 29,506 pass, 2 fail - last update
over 1 year ago 29,548 pass, 6 fail - last update
over 1 year ago 29,551 pass - Status changed to Needs review
over 1 year ago 9:24am 23 June 2023 - Assigned to fadilraj
- ๐ฎ๐ณIndia fadilraj
The description field is added, but I was not able to edit and save the description of an existing display mode, nor was I able to save the description that I added while creating the display mode as seen in the screen recording attached below. Changing the status to 'Needs work' for now.
- Issue was unassigned.
- Status changed to Needs work
over 1 year ago 12:39pm 23 June 2023 - last update
over 1 year ago 29,551 pass - Status changed to Needs review
over 1 year ago 1:08pm 23 June 2023 - ๐ฎ๐ณIndia sakthi_dev
Updated the entity keys. Please review as it resolved the issue mentioned in #15.
- Status changed to Needs work
over 1 year ago 2:39pm 23 June 2023 - ๐บ๐ธUnited States smustgrave
With updates to existing config it'll need an upgrade path.
- ๐บ๐ธUnited States tim.plunkett Philadelphia
Because all of the new values are '' or null, it shouldn't be needed. But an empty post_update hook could be added to force a cache clear
My question is that why are half of the new values '' and the other half are null?
- last update
over 1 year ago 29,559 pass - Status changed to Needs review
over 1 year ago 7:39am 27 June 2023 - last update
over 1 year ago Custom Commands Failed - last update
over 1 year ago 29,559 pass - last update
over 1 year ago Custom Commands Failed - last update
over 1 year ago 29,559 pass - Status changed to RTBC
over 1 year ago 6:48pm 28 June 2023 - ๐บ๐ธUnited States bnjmnm Ann Arbor, MI
Code all looks good, and most of the changes are just updating schemas to have an empty string for
description:
. I also tested locally and added some descriptionless view modes that weren't part of the default install, and running update.php after switching to this branch added description support gracefully. - Status changed to Needs work
over 1 year ago 8:54pm 28 June 2023 - ๐ฌ๐งUnited Kingdom longwave UK
If this feature is actually useful should we provide some useful defaults, at least for new installs? Umami is also supposed to showcase best practices so we should add some descriptions there too I think.
- Status changed to RTBC
over 1 year ago 10:58am 29 June 2023 - ๐บ๐ธUnited States bnjmnm Ann Arbor, MI
Re #22 I'd like to make sure the description language gets the attention it deserves while not obstructing the addition of this functionality, so I created a followup to this for writing the actual descriptions ๐ Compose view mode descriptions Active . There are also funded contributors able to work on it as part of Field UX efforts, so this wouldn't be a throwaway.
I'm setting it back to RTBC since that work is part of the queue, but if there's disagreement with this take I'm amenable.
- ๐ซ๐ฎFinland lauriii Finland
+1 that it should be fine to add the view mode descriptions in a follow-up.
Haven't looked at the code in detail but I'm wondering if we should show the description in the Manage form display and Manage display pages too?
- ๐บ๐ธUnited States bnjmnm Ann Arbor, MI
I'm wondering if we should show the description in the Manage form display and Manage display pages too
Yeah that crossed my mind too. Since we know there's contributors tacking Field UX issues I'd be fine with that as another followup especially since it's a clean way to break the work down and keep the MRs smaller.
- ๐ช๐ธSpain ckrina Barcelona
+1 to this.
Agree with you that we'd need to show this on:
- The view mode list, same way as we have descriptions on node lists
- The view mode form on the entity Manage Display/Manage Form Display
Something similar to what Display Mode Guidelines โ is doing, but it'll need some work to create the mocks/come up with a visual solution to know where to place it and how it needs to look like, so a follow-up to discuss it would be great.
- Status changed to Needs work
over 1 year ago 3:32pm 29 June 2023 - ๐บ๐ธUnited States bnjmnm Ann Arbor, MI
Created ๐ Display view option descriptions in the Manage form display and Manage display pages Active for adding these to manage form display and manage form. Scoping it to its own issue will ensure we don't cut corners on the design choices.
- last update
over 1 year ago 29,782 pass, 9 fail - last update
over 1 year ago 29,801 pass - last update
over 1 year ago Custom Commands Failed - last update
over 1 year ago 29,805 pass, 1 fail - last update
over 1 year ago 29,805 pass, 1 fail - last update
over 1 year ago Custom Commands Failed - last update
over 1 year ago 29,808 pass - last update
over 1 year ago 29,808 pass - last update
over 1 year ago 29,812 pass - last update
over 1 year ago 29,722 pass, 15 fail - Status changed to Needs review
over 1 year ago 7:04am 12 July 2023 - last update
over 1 year ago 29,722 pass, 15 fail - Status changed to Needs work
over 1 year ago 12:02pm 12 July 2023 - ๐ซ๐ฎFinland lauriii Finland
Hmm, tests are failing because the typehint states that the property must be a string. This is not the case when a new display mode is being created because the description isn't set yet. We could either not use
\Drupal\Core\Entity\EntityDisplayModeInterface::getDescription
there or we could allow null values:diff --git a/core/lib/Drupal/Core/Entity/EntityDisplayModeBase.php b/core/lib/Drupal/Core/Entity/EntityDisplayModeBase.php index 1aaf1687c5..ff368f258e 100644 --- a/core/lib/Drupal/Core/Entity/EntityDisplayModeBase.php +++ b/core/lib/Drupal/Core/Entity/EntityDisplayModeBase.php @@ -29,7 +29,7 @@ abstract class EntityDisplayModeBase extends ConfigEntityBase implements EntityD * * @var string */ - protected string $description; + protected ?string $description; /** * The entity type this form or view mode is used for. @@ -129,8 +129,8 @@ protected function urlRouteParameters($rel) { /** * {@inheritdoc} */ - public function getDescription(): string { - return $this->description; + public function getDescription(): ?string { + return $this->description ?? NULL; } } diff --git a/core/lib/Drupal/Core/Entity/EntityDisplayModeInterface.php b/core/lib/Drupal/Core/Entity/EntityDisplayModeInterface.php index 4c8e12639b..250bd12634 100644 --- a/core/lib/Drupal/Core/Entity/EntityDisplayModeInterface.php +++ b/core/lib/Drupal/Core/Entity/EntityDisplayModeInterface.php @@ -33,6 +33,6 @@ public function setTargetType($target_entity_type); * @return string * Returns display mode description. */ - public function getDescription(): string; + public function getDescription(): ?string; }
- Assigned to sakthi_dev
- Status changed to Needs review
over 1 year ago 12:24pm 12 July 2023 - Issue was unassigned.
- ๐บ๐ธUnited States smustgrave
Please donโt assign tickets to yourself unless a maintainer. A comment should do.
- last update
over 1 year ago Custom Commands Failed - ๐บ๐ธUnited States tim.plunkett Philadelphia
@sakthi_dev Sorry but those changes are not helpful, and are the wrong direction from what I described above.
Furthermore, @Utkarsh_33 has this issue well in-hand at this point.
Reverting the above, and applying my suggestions
- last update
over 1 year ago 29,812 pass - last update
over 1 year ago 29,812 pass - Status changed to RTBC
over 1 year ago 10:35am 14 July 2023 - ๐ซ๐ฎFinland lauriii Finland
Went through all of the recent changes and the code. The upgrade path looks solid now. I'm a bit surprised how much complexity type hints add to the upgrade paths ๐
- last update
over 1 year ago 29,815 pass - last update
over 1 year ago 29,816 pass - Open on Drupal.org โEnvironment: PHP 8.2 & MySQL 8last update
over 1 year ago Not currently mergeable. - Open on Drupal.org โEnvironment: PHP 8.2 & MySQL 8last update
over 1 year ago Not currently mergeable. - Status changed to Needs work
over 1 year ago 10:53am 19 July 2023 - ๐ฌ๐งUnited Kingdom longwave UK
Some nitpicks in the docblock of the new method, and there is a merge conflict, otherwise this looks ready to go to me.
- Open on Drupal.org โEnvironment: PHP 8.2 & MySQL 8last update
over 1 year ago Not currently mergeable. - last update
over 1 year ago Custom Commands Failed - Status changed to RTBC
over 1 year ago 10:57am 19 July 2023 - ๐ซ๐ฎFinland lauriii Finland
Applied the suggestions and rebased the MR.
- last update
over 1 year ago 29,733 pass, 15 fail - last update
over 1 year ago 29,742 pass, 9 fail - Status changed to Needs work
over 1 year ago 2:27pm 19 July 2023 - ๐ฌ๐งUnited Kingdom longwave UK
Somehow the rebase has lost most of @tim.plunkett's changes from this commit: https://git.drupalcode.org/project/drupal/-/merge_requests/4135/diffs?co...
- last update
over 1 year ago 29,823 pass - last update
over 1 year ago 29,827 pass - last update
over 1 year ago 29,828 pass - last update
over 1 year ago 29,828 pass - Status changed to RTBC
over 1 year ago 1:06pm 21 July 2023 - ๐บ๐ธUnited States bnjmnm Ann Arbor, MI
The changes lost with the rebase were successfully recovered by @lauriii
- last update
over 1 year ago CI aborted - last update
over 1 year ago CI aborted -
bnjmnm โ
committed c44d89e3 on 11.x authored by
_shY โ
Issue #3364659 by Utkarsh_33, lauriii, sakthi_dev, bnjmnm, tim.plunkett...
-
bnjmnm โ
committed c44d89e3 on 11.x authored by
_shY โ
- Status changed to Fixed
over 1 year ago 2:56pm 21 July 2023 - ๐บ๐ธUnited States bnjmnm Ann Arbor, MI
After a few un-RTBC at the final stretch, this looks all set and I've merged it to 11.x. Thanks all!
Automatically closed - issue fixed for 2 weeks with no activity.
- Status changed to Fixed
over 1 year ago 8:52am 11 August 2023