Skip to content

Conversation

@geigerzaehler
Copy link
Contributor

@geigerzaehler geigerzaehler commented Feb 5, 2025

A very basic implementation of Fragment as discussed in #82.

@pelme
Copy link
Owner

pelme commented Feb 5, 2025

With the introduction of fragment, I would like to deprecate render_node / iter_node (but keep them around for a long time). That can be done in a separate PR though!

@geigerzaehler
Copy link
Contributor Author

Thanks for the quick feedback. I’ve updated the PR accordingly

@pelme
Copy link
Owner

pelme commented Feb 5, 2025

the comment function should return a Fragment instead of Markup too. that makes it possible to render it directly

@geigerzaehler
Copy link
Contributor Author

I’ve addressed your comments and rebased the branch

@pelme pelme merged commit f7486d4 into pelme:main Mar 8, 2025
14 checks passed
pelme added a commit that referenced this pull request Mar 8, 2025
This change provides a consistent API to render a htpy object as HTML or
iterate over it.

This commit introduces stream_chunks() which is identical with
__iter__() but with a better name.


With the introduction of Fragment, this commit makes render_node and
iter_node redundant and they will be deprecated in another commit.

More info: #86 (comment)
pelme added a commit that referenced this pull request Mar 8, 2025
This change provides a consistent API to render a htpy object as HTML or
iterate over it.

This commit introduces stream_chunks() which is identical with
__iter__() but with a better name.


With the introduction of Fragment, this commit makes render_node and
iter_node redundant and they will be deprecated in another commit.

More info: #86 (comment)
pelme added a commit that referenced this pull request Mar 8, 2025
This change provides a consistent API to render a htpy object as HTML or
iterate over it.

This commit introduces stream_chunks() which is identical with
__iter__() but with a better name.


With the introduction of Fragment, this commit makes render_node and
iter_node redundant and they will be deprecated in another commit.

More info: #86 (comment)
pelme added a commit that referenced this pull request Mar 8, 2025
This change provides a consistent API to render a htpy object as HTML or
iterate over it.

This commit introduces stream_chunks() which is identical with
__iter__() but with a better name.


With the introduction of Fragment, this commit makes render_node and
iter_node redundant and they will be deprecated in another commit.

More info: #86 (comment)
@geigerzaehler geigerzaehler deleted the fragment branch March 8, 2025 16:36
pelme added a commit that referenced this pull request Mar 9, 2025
This change provides a consistent API to render a htpy object as HTML or
iterate over it.

This commit introduces stream_chunks() which is identical with
__iter__() but with a better name.

With the introduction of Fragment, this commit makes render_node and
iter_node redundant and they will be deprecated in another commit.

This commit removes all internal usages of render_node and iter_node so
they can be deprecated.

More info: #86 (comment)
pelme added a commit that referenced this pull request Mar 14, 2025
This change provides a consistent API to render a htpy object as HTML or
iterate over it.

This commit introduces stream_chunks() which is identical with
__iter__() but with a better name.

With the introduction of Fragment, this commit makes render_node and
iter_node redundant and they will be deprecated in another commit.

This commit removes all internal usages of render_node and iter_node so
they can be deprecated.

More info: #86 (comment)
pelme added a commit that referenced this pull request Mar 14, 2025
This change provides a consistent API to render a htpy object as HTML or
iterate over it.

This commit introduces stream_chunks() which is identical with
__iter__() but with a better name.

With the introduction of Fragment, this commit makes render_node and
iter_node redundant and they will be deprecated in another commit.

This commit removes all internal usages of render_node and iter_node so
they can be deprecated.

More info: #86 (comment)
pelme added a commit that referenced this pull request Mar 14, 2025
This change provides a consistent API to render a htpy object as HTML or
iterate over it.

This commit introduces stream_chunks() which is identical with
__iter__() but with a better name.

With the introduction of Fragment, this commit makes render_node and
iter_node redundant and they will be deprecated in another commit.

This commit removes all internal usages of render_node and iter_node so
they can be deprecated.

More info: #86 (comment)
pelme added a commit that referenced this pull request Mar 14, 2025
This change provides a consistent API to render a htpy object as HTML or
iterate over it.

This commit introduces stream_chunks() which is identical with
__iter__() but with a better name.

With the introduction of Fragment, this commit makes render_node and
iter_node redundant and they will be deprecated in another commit.

This commit removes all internal usages of render_node and iter_node so
they can be deprecated.

More info: #86 (comment)
pelme added a commit that referenced this pull request Mar 15, 2025
This change provides a consistent API to render a htpy object as HTML or
iterate over it.

This commit introduces stream_chunks() which is identical with
__iter__() but with a better name.

With the introduction of Fragment, this commit makes render_node and
iter_node redundant and they will be deprecated in another commit.

This commit removes all internal usages of render_node and iter_node so
they can be deprecated.

More info: #86 (comment)
pelme added a commit that referenced this pull request Mar 15, 2025
This change provides a consistent API to render a htpy object as HTML or
iterate over it.

This commit introduces stream_chunks() which is identical with
__iter__() but with a better name.

With the introduction of Fragment, this commit makes render_node and
iter_node redundant and they will be deprecated in another commit.

This commit removes all internal usages of render_node and iter_node so
they can be deprecated.

More info: #86 (comment)
pelme added a commit that referenced this pull request Mar 15, 2025
This change provides a consistent API to render a htpy object as HTML or
iterate over it.

This commit introduces stream_chunks() which is identical with
__iter__() but with a better name.

With the introduction of Fragment, this commit makes render_node and
iter_node redundant and they will be deprecated in another commit.

This commit removes all internal usages of render_node and iter_node so
they can be deprecated.

More info: #86 (comment)
pelme added a commit that referenced this pull request Mar 15, 2025
This change provides a consistent API to render a htpy object as HTML or
iterate over it.

This commit introduces stream_chunks() which is identical with
__iter__() but with a better name.

With the introduction of Fragment, this commit makes render_node and
iter_node redundant and they will be deprecated in another commit.

This commit removes all internal usages of render_node and iter_node so
they can be deprecated.

More info: #86 (comment)
pelme added a commit that referenced this pull request Mar 16, 2025
This change provides a consistent API to render a htpy object as HTML or
iterate over it.

This commit introduces stream_chunks() which is identical with
__iter__() but with a better name.

With the introduction of Fragment, this commit makes render_node and
iter_node redundant and they will be deprecated in another commit.

This commit removes all internal usages of render_node and iter_node so
they can be deprecated.

More info: #86 (comment)
pelme added a commit that referenced this pull request Mar 16, 2025
This change provides a consistent API to render a htpy object as HTML or
iterate over it.

This commit introduces stream_chunks() which is identical with
__iter__() but with a better name.

With the introduction of Fragment, this commit makes render_node and
iter_node redundant and they will be deprecated in another commit.

This commit removes all internal usages of render_node and iter_node so
they can be deprecated.

More info: #86 (comment)
pelme added a commit that referenced this pull request Mar 16, 2025
This change provides a consistent API to render a htpy object as HTML or
iterate over it.

This commit introduces stream_chunks() which is identical with
__iter__() but with a better name.

With the introduction of Fragment, this commit makes render_node and
iter_node redundant and they will be deprecated in another commit.

This commit removes all internal usages of render_node and iter_node so
they can be deprecated.

More info: #86 (comment)
pelme added a commit that referenced this pull request Mar 20, 2025
This change provides a consistent API to render a htpy object as HTML or
iterate over it.

This commit introduces stream_chunks() which is identical with
__iter__() but with a better name.

With the introduction of Fragment, this commit makes render_node and
iter_node redundant and they will be deprecated in another commit.

This commit removes all internal usages of render_node and iter_node so
they can be deprecated.

More info: #86 (comment)
pelme added a commit that referenced this pull request Mar 20, 2025
This change provides a consistent API to render a htpy object as HTML or
iterate over it.

This commit introduces stream_chunks() which is identical with
__iter__() but with a better name.

With the introduction of Fragment, this commit makes render_node and
iter_node redundant and they will be deprecated in another commit.

This commit removes all internal usages of render_node and iter_node so
they can be deprecated.

More info: #86 (comment)
pelme added a commit that referenced this pull request Apr 10, 2025
This change provides a consistent API to render a htpy object as HTML or
iterate over it.

This commit introduces the iter_chunks() method which is identical with
__iter__() but with a better name.

With the introduction of Fragment, this commit makes render_node and
iter_node redundant.

This commit deprecates render_node, iter_node and direct iteration of elements.

More info: #86 (comment)
pelme added a commit that referenced this pull request Apr 10, 2025
This change provides a consistent API to render a htpy object as HTML or
iterate over it.

This commit introduces the iter_chunks() method which is identical with
__iter__() but with a better name.

With the introduction of Fragment, this commit makes render_node and
iter_node redundant.

This commit deprecates render_node, iter_node and direct iteration of elements.

More info: #86 (comment)
pelme added a commit that referenced this pull request Apr 10, 2025
This change provides a consistent API to render a htpy object as HTML or
iterate over it.

This commit introduces the iter_chunks() method which is identical with
`__iter__()`` but with a better name.

With the introduction of Fragment, this commit makes render_node and
iter_node redundant.

This commit deprecates render_node, iter_node and direct iteration of elements.

More info: #86 (comment)
pelme added a commit that referenced this pull request Apr 10, 2025
This change provides a consistent API to render a htpy object as HTML or
iterate over it.

This commit introduces the iter_chunks() method which is identical with
`__iter__()` but with a better name.

With the introduction of Fragment, this commit makes render_node and
iter_node redundant.

This commit deprecates render_node, iter_node and direct iteration of elements.

More info: #86 (comment)
pelme added a commit that referenced this pull request Apr 11, 2025
This change provides a consistent API to render a htpy object as HTML or
iterate over it.

This commit introduces the iter_chunks() method which is identical with
`__iter__()` but with a better name.

With the introduction of Fragment, this commit makes render_node and
iter_node redundant.

This commit deprecates render_node, iter_node and direct iteration of elements.

More info: #86 (comment)
pelme added a commit that referenced this pull request Apr 11, 2025
This change provides a consistent API to render a htpy object as HTML or
iterate over it.

This commit introduces the iter_chunks() method which is identical with
`__iter__()` but with a better name.

With the introduction of Fragment, this commit makes render_node and
iter_node redundant.

This commit deprecates render_node, iter_node and direct iteration of elements.

More info: #86 (comment)
pelme added a commit that referenced this pull request Apr 11, 2025
This change provides a consistent API to render a htpy object as HTML or
iterate over it.

This commit introduces the iter_chunks() method which is identical with
`__iter__()` but with a better name.

With the introduction of Fragment, this commit makes render_node and
iter_node redundant.

This commit deprecates render_node, iter_node and direct iteration of elements.

More info: #86 (comment)
pelme added a commit that referenced this pull request Apr 11, 2025
This change provides a consistent API to render a htpy object as HTML or
iterate over it.

This commit introduces the iter_chunks() method which is identical with
`__iter__()` but with a better name.

With the introduction of Fragment, this commit makes render_node and
iter_node redundant.

This commit deprecates render_node, iter_node and direct iteration of elements.

More info: #86 (comment)
pelme added a commit that referenced this pull request Apr 11, 2025
This change provides a consistent API to render a htpy object as HTML or
iterate over it.

This commit introduces the iter_chunks() method which is identical with
`__iter__()` but with a better name.

With the introduction of Fragment, this commit makes render_node and
iter_node redundant.

This commit deprecates render_node, iter_node and direct iteration of elements.

More info: #86 (comment)
pelme added a commit that referenced this pull request Apr 11, 2025
This change provides a consistent API to render a htpy object as HTML or
iterate over it.

This commit introduces the iter_chunks() method which is identical with
`__iter__()` but with a better name.

With the introduction of Fragment, this commit makes render_node and
iter_node redundant.

This commit deprecates render_node, iter_node and direct iteration of elements.

More info: #86 (comment)
pelme added a commit that referenced this pull request Apr 11, 2025
This change provides a consistent API to render a htpy object as HTML or
iterate over it.

This commit introduces the iter_chunks() method which is identical with
`__iter__()` but with a better name.

With the introduction of Fragment, this commit makes render_node and
iter_node redundant.

This commit deprecates render_node, iter_node and direct iteration of elements.

More info: #86 (comment)
pelme added a commit that referenced this pull request Apr 11, 2025
This change provides a consistent API to render a htpy object as HTML or
iterate over it.

This commit introduces the iter_chunks() method which is identical with
`__iter__()` but with a better name.

With the introduction of Fragment, this commit makes render_node and
iter_node redundant.

This commit deprecates render_node, iter_node and direct iteration of elements.

More info: #86 (comment)
pelme added a commit that referenced this pull request Apr 12, 2025
This change provides a consistent API to render a htpy object as HTML or
iterate over it.

This commit introduces the iter_chunks() method which is identical with
`__iter__()` but with a better name.

With the introduction of Fragment, this commit makes render_node and
iter_node redundant.

This commit deprecates render_node, iter_node and direct iteration of elements.

More info: #86 (comment)
pelme added a commit that referenced this pull request Apr 12, 2025
This change provides a consistent API to render a htpy object as HTML or
iterate over it.

This commit introduces the iter_chunks() method which is identical with
`__iter__()` but with a better name.

With the introduction of Fragment, this commit makes render_node and
iter_node redundant.

This commit deprecates render_node, iter_node and direct iteration of elements.

More info: #86 (comment)
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.

3 participants