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

Rename layout:decorator to layout:decorate #95

Closed
ultraq opened this issue Feb 13, 2016 · 4 comments
Closed

Rename layout:decorator to layout:decorate #95

ultraq opened this issue Feb 13, 2016 · 4 comments

Comments

@ultraq
Copy link
Owner

ultraq commented Feb 13, 2016

If we're following the decorator pattern, then what is specified in the layout:decorator attribute is the template to be decorated, not the templating doing the decorating.

So would it make more sense to rename the processor to layout:decorate?

@ultraq
Copy link
Owner Author

ultraq commented Feb 13, 2016

I'm thinking yes as then each of the processor names are verbs describing what is happening to the target: decorate this, include that, replace a template, etc.

title-pattern and fragment are still exceptions though 😛

@ultraq ultraq self-assigned this Feb 13, 2016
@ultraq ultraq changed the title Rename layout:decorator to layout:decorate? Rename layout:decorator to layout:decorate Feb 13, 2016
@ultraq ultraq removed the question label Feb 13, 2016
@ultraq
Copy link
Owner Author

ultraq commented Jun 26, 2016

So I've incorrectly repurposed the word "decorator" throughout the layout dialect, most problematically in the title-pattern processor as one of the replacement tokens, $DECORATOR_TITLE. The value that token represents is the parent/layout page, so that also needs to be renamed appropriately as $LAYOUT_TITLE, with the old value as a deprecated fallback to remove in future versions.

@ultraq
Copy link
Owner Author

ultraq commented Jun 26, 2016

Done. Also added an alias processor that just logs a deprecation warning to maintain backwards compatibility with migrating templates. Same done for the title pattern token, with a warning emitted when $DECORATOR_TITLE is used. Both logs direct developers to the updated decorator/token, with a link to this GitHub issue too.

@ultraq ultraq closed this as completed Jun 26, 2016
helloworldtang pushed a commit to helloworldtang/sns-todo that referenced this issue Sep 6, 2017
…n deprecated

Please use layout:decorate/data-layout-decorate instead to future-proof your code.  See ultraq/thymeleaf-layout-dialect#95 for more information.
ecormaksin pushed a commit to ecormaksin/hajiboot-thymeleaf that referenced this issue Mar 23, 2020
```
The layout:decorator/data-layout-decorator processor has been deprecated
and will be removed in the next major version of the layout dialect.
Please use layout:decorate/data-layout-decorate instead to future-proof
your code.  See
ultraq/thymeleaf-layout-dialect#95 for more
information.

Fragment expression "layout" is being wrapped as a Thymeleaf 3 fragment
expression (~{...}) for backwards compatibility purposes.  This wrapping
will be dropped in the next major version of the expression processor,
so please rewrite as a Thymeleaf 3 fragment expression to future-proof
your code.  See thymeleaf/thymeleaf#451 for
more information.
```
@ItaloOre
Copy link

layout:title-pattern="$CONTENT_TITLE - $DECORATOR_TITLE"

strehle added a commit to cloudfoundry/uaa that referenced this issue Jan 22, 2021
by change I found warnings in log. in total 3 warnings found

[THYMELEAF][Test worker] Template Mode 'HTML5' is deprecated. Using Template Mode 'HTML' instead.
[THYMELEAF][Test worker] Template Mode 'HTML5' is deprecated. Using Template Mode 'HTML' instead.
Initializing Spring TestDispatcherServlet ''
Initializing Servlet ''
Completed initialization in 3 ms
The layout:decorator/data-layout-decorator processor has been deprecated and will be removed in the next major version of the layout dialect.  Please use layout:decorate/data-layout-decorate instead to future-proof your code.  See ultraq/thymeleaf-layout-dialect#95 for more information.
Fragment expression "layouts/main" is being wrapped as a Thymeleaf 3 fragment expression (~{...}) for backwards compatibility purposes.  This wrapping will be dropped in the next major version of the expression processor, so please rewrite as a Thymeleaf 3 fragment expression to future-proof your code.  See thymeleaf/thymeleaf#451 for more information.

## ultraq/thymeleaf-layout-dialect#95 , changed layout:decorator to layout:decorate
## use template mode HTML instead of HTML5
## swtiched back to from th:with="isLdap which was removed with spring update
strehle added a commit to cloudfoundry/uaa that referenced this issue Mar 19, 2021
by change I found warnings in log. in total 3 warnings found

[THYMELEAF][Test worker] Template Mode 'HTML5' is deprecated. Using Template Mode 'HTML' instead.
[THYMELEAF][Test worker] Template Mode 'HTML5' is deprecated. Using Template Mode 'HTML' instead.
Initializing Spring TestDispatcherServlet ''
Initializing Servlet ''
Completed initialization in 3 ms
The layout:decorator/data-layout-decorator processor has been deprecated and will be removed in the next major version of the layout dialect.  Please use layout:decorate/data-layout-decorate instead to future-proof your code.  See ultraq/thymeleaf-layout-dialect#95 for more information.
Fragment expression "layouts/main" is being wrapped as a Thymeleaf 3 fragment expression (~{...}) for backwards compatibility purposes.  This wrapping will be dropped in the next major version of the expression processor, so please rewrite as a Thymeleaf 3 fragment expression to future-proof your code.  See thymeleaf/thymeleaf#451 for more information.

## ultraq/thymeleaf-layout-dialect#95 , changed layout:decorator to layout:decorate
## use template mode HTML instead of HTML5
## swtiched back to from th:with="isLdap which was removed with spring update
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants