Closed (fixed)
Project:
Entity Embed
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Issue tags:
Reporter:
Created:
5 Jul 2016 at 12:33 UTC
Updated:
17 Aug 2016 at 00:04 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
slashrsm commentedComment #3
thenchev commentedSo renamed all occurrences of data-entity-embed-display added test to se if it still works with the old attribute.
Tested it manually with -
display as label that is linked. The entity is shown with both new and old attributes and the button seems to recognize the old attribute and changes it to the new on save.
Looks like it works for me but would like a second opinion.
Do we need more test coverage?
Comment #4
slashrsm commentedFix wrapping.
Comment #5
dave reidI'm going to push back on this one. Yes it contains display settings, but I also envisioned it being used to store additional things like "Override the node title or field X value when embedded here", which isn't necessarily related to display, but rather the embed itself. I think this changes the data structure unnecessarily. This change mostly seems to be about semantics, so unless there is a more compelling argument, I think this should be won't fixed in a week.
Comment #6
slashrsm commentedI thought that we agreed in the past that having data structures where we throw anything that comes to mind isn't the way to go. Having responsibilities clearly separated has been a guideline for a while and is also a general best practice.
Could a tool that allows overriding of certain fields/data use its own attribute? Is there an issue for that where we could discuss the architecture? Has any development work been done with regards to that? It is impossible to plan further development and roadmap if we do not communicate ideas through standard channels.
Semantics and clear data model are compelling enough for something like this. Specially this close to beta as we are at the moment. Clear standards improve DX and encourage people to use the tools we provided in a way they were meant to be used.
Comment #7
thenchev commentedSome updates. Still looking into tests. There will be test fails.
Comment #9
slashrsm commentedLet's check and do this only if the
data-entity-embed-display-settingsdoes not exist.Comment wrapping.
I'd also make sure non-default display settings are used (full view mode will be used by default AFAIK). Only in that case we prove that they are really respected.
Let's add full drupal-entity tag instead just one argument. For the paranoia sake...
Do we need to rely on this?
Let's check and do this only if
data-entity-embed-display-settingsdoesn't exist.Doesn't work correctly. Sets 'data-entity-embed-display-settings' to boolean instead of array of configuration in case of the old attribute name. (isset()...)
Comment #10
thenchev commentedAbout #4 when i remove it i get:
Drupal\Component\Plugin\Exception\PluginNotFoundException: The "embed_button" entity type does not exist. in Drupal\Core\Entity\EntityTypeManager->getDefinition() (line 125 of /var/www/html/d8/core/lib/Drupal/Core/Entity/EntityTypeManager.php).
The thing is, what i think, because we need Embed to be installed when i run the tests i get errors. The database is used for the test with the standard drupal installation.
Comment #12
slashrsm commentedThis should fix the failing test.
Comment #13
slashrsm commentedTested this manually and I can confirm that backward compatibility works as expected.
I will tentatively RTBC this due to questions that were raised. Let's try to resolve any difference in views but let's try to do it in a timely manner. Specially due to the beta blocker status of this issue.
Comment #14
slashrsm commentedComment #15
slashrsm commentedCommitted.
Comment #17
dave reidDue to 'data-entity-embed-settings' being removed from the CKEditor 'allowedContent' and 'requiredContent' settings, does that mean existing embeds will no longer be upcasted to widgets?