Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redefine, rewrite and refactor any renderer stuff #1229

Open
phorward opened this issue Aug 8, 2024 · 0 comments
Open

Redefine, rewrite and refactor any renderer stuff #1229

phorward opened this issue Aug 8, 2024 · 0 comments
Assignees
Labels
breaking-changes This PR causes breaking changes refactoring Pull requests that refactor code but do not change its behavior. usability

Comments

@phorward
Copy link
Member

phorward commented Aug 8, 2024

The current renderer stuff is a buggy mess of ugly, old code.
It should be entirely redesigned with a clear and straight concept.

Some issues with the current implementation:

  • Optional function _postProcessAppObj used by json and xml should be converted into a standardized Index-module
  • The renderers are currently constructed from the renders folder. This brings in several disadvantages, as the declared symbols are bad to distinguish.
  • It is possible to register a module called html or json, with messes up with the specific renderer without any hint or error message
  • A render refers to a module and a module to a renderer. This makes it impossible to instantiate each module and each renderer only once
  • The concept of defining a module specific renderer, like with user, is nowhere else used in any ViUR project. By the concept of ActionSkels, module-specific renders become obsolete and therefore the possibility should entirely be removed.
  • Enabling a renderer with Module.json = True is absolutely ugly
  • jinjaGlobalFunction/jinjaGlobalFilter should be defined differently

Issue relates to #1071.

@phorward phorward added refactoring Pull requests that refactor code but do not change its behavior. breaking-changes This PR causes breaking changes usability labels Aug 8, 2024
@phorward phorward added this to the ViUR-core v4.0 milestone Aug 8, 2024
@phorward phorward self-assigned this Aug 8, 2024
phorward added a commit that referenced this issue Aug 21, 2024
…ible (#1240)

This is both a refactor and a fix for the `Modulename.html = True`
default that was removed with viur-core 3.6.

The error `AttributeError: 'Index' object has no attribute
'<modulename>'` is fixed with this improvement, and the workaround of
`conf.main_app.vi.modulename` is not neccessary anymore.

Belongs to #1229, replaces #1232.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-changes This PR causes breaking changes refactoring Pull requests that refactor code but do not change its behavior. usability
Projects
None yet
Development

No branches or pull requests

1 participant