Skip to content

[NFR]: Refactor TagFactory helpers #16971

@niden

Description

@niden

A bit of a long overdue refactoring.

TagFactory is very helpful in creating HTML strings depending on the needs of the developer. Several shortcomings appeared after the initial implementation:

  • Registration of new services is difficult. One has to extend the factory and register the new services or supply them on construction. The latter is not very intuitive. Also there are a few if/else statements in the newInstance to handle dependencies that each component requires
    • Replace the registration with callables to allow for a quick and easy way to add services
    • Simplify the internal store that services are kept
    • Inject the Doctype in all services that need it
  • Too many input classes only setting a type.
    • Create a Generic class that will remove replication and shrink the code base without losing functionality
  • Checkbox and Radio are problematic. They do not work as expected, making calls for them difficult
    • Refactor them and introduce a common abstract class to handle the common functionality
  • Positional series are not supported. If developers want to reorganize their assets for instance in a particular way, there is no provision for this
    • Add positional ordering to AbstractSeries
  • Escaping
    • Shared in a per context base sub objects
  • Select
    • Strict equality option
  • Scripts
    • Introduce begin/end Internal
  • Attributes - Forms
    • Wire forms with the TagFactory and thus remove duplicated code in Attributes deferred - new issue

Resolves: #16416 #15957

Metadata

Metadata

Assignees

Labels

new feature requestPlanned Feature or New Feature Request
No fields configured for Feature.

Projects

Status
Implemented

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions