Skip to content

Fix/revert html element to html element#1122

Merged
werrolf merged 16 commits into
release/3.0.7from
fix/revert-html-element-to-html-element
Mar 17, 2019
Merged

Fix/revert html element to html element#1122
werrolf merged 16 commits into
release/3.0.7from
fix/revert-html-element-to-html-element

Conversation

@werrolf

@werrolf werrolf commented Mar 17, 2019

Copy link
Copy Markdown
Contributor

HTMLElement was used as a stomping ground for certain developments before vis-ui.js and data-source were spun off. It has accumulated a lot of logic that is only really relevant for Digitizer and certain other data-sourcey Mapbender Elements.

Data Source 0.1.11 has everything it needs to keep even quite old Digitizer versions running happily, with no more need for any supporting magic in HTMLElement. In fact, as of 0.1.11, DataSource's BaseElement doesn't inherit from HTMLElement anymore.

As such, it is now safe to restore HTMLElement to its original purpose: a thing that renders a piece of markup.

This pull removes data-sourcey configuration preprocessing magic prepareItem, prepareItems, isAssoc.

This pull removes the Ajax entry point handler (single action configuration).

This pull removes processing logic for jsSrc and css options. These have never actually been configurable. Through the entire history of the repository, the HTMLElement form type has never defined form fields with these names. We can only speculate that a child class or two may have defined them, but never HTMLElement itself. UPGRADING.md now has instructions on what to do in these cases.

This pull restores

  • Explicit getType implementation (backend form type class)
  • Explicit getFormTemplate implementation (backend form twig)

This pull changes the rendering logic for html-element-inline to emit a span instead of a div. This resolved certain CSS gotchas, and actually allowed the complete removal of the HTMLElement CSS rules.

The remaining HTMLElement only renders the markup defined in its content option, which may also use Twig functionality by the way. It doesn't have a JavaScript widget constructor, and it doesn't have any predefined CSS rules.

werrolf added 16 commits March 17, 2019 03:35
@werrolf werrolf merged commit 5d7a290 into release/3.0.7 Mar 17, 2019
@werrolf werrolf deleted the fix/revert-html-element-to-html-element branch March 17, 2019 03:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant