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

Qute: execute tag templates in isolation by default #35600

Merged
merged 1 commit into from Sep 8, 2023

Conversation

mkouba
Copy link
Contributor

@mkouba mkouba commented Aug 28, 2023

@github-actions
Copy link

github-actions bot commented Aug 28, 2023

🙈 The PR is closed and the preview is expired.

By default, a tag template cannot reference the data from the parent context.
Qute executes the tag as an _isolated_ template, i.e. without access to the context of the template that calls the tag.
However, sometimes it might be useful to change the default behavior and disable the isolation.
In this case, just add `_isolated=false` to the call site, for example `{#itemDetail item showImage=true _isolated=false /}`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would use the opposite word: _contextual=true (or any other better word)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, contextual is IMO too overloaded. isolated was already there but I didn't find a good antonym... In any case, we could add a "positive" alias. Maybe something like _connected or even just _unisolated (note that the =true part is optional)?

Copy link
Contributor

@ia3andy ia3andy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just one small suggestion

Quarkus Documentation automation moved this from To do to Reviewer approved Aug 29, 2023
@mkouba mkouba added the area/qute The template engine label Aug 30, 2023
@mkouba mkouba marked this pull request as ready for review September 6, 2023 14:46
@mkouba mkouba requested a review from ia3andy September 6, 2023 14:46
Copy link
Contributor

@ia3andy ia3andy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@quarkus-bot

This comment has been minimized.

@quarkus-bot
Copy link

quarkus-bot bot commented Sep 7, 2023

✔️ The latest workflow run for the pull request has completed successfully.

It should be safe to merge provided you have a look at the other checks in the summary.

@mkouba mkouba merged commit bc9e7ef into quarkusio:main Sep 8, 2023
66 of 68 checks passed
Quarkus Documentation automation moved this from Reviewer approved to Done Sep 8, 2023
@quarkus-bot quarkus-bot bot added this to the 3.5 - main milestone Sep 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

2 participants