mirror of
https://codeberg.org/forgejo/forgejo
synced 2024-11-25 19:26:09 +01:00
d731dc793b
- Currently if you want to update the milestone of an issue or pull request, your whole page will be reloaded to reflect the newly set milestone. This is quite unecessary, as only the milestone text is updated and a new timeline event is added. - This patch converts the milestone section in the issue/pull request sidebar to use HTMX, so it becomes a progressive element and avoids reloading the whole page to update the milestone. - The update of the milestone section itself is quite straightforward and nothing special is happening. To support adding new timeline events, a new element `#insert-timeline` is conviently placed after the last timeline event, which can be used with [`hx-swap-oob`](https://htmx.org/attributes/hx-swap-oob/) to position new timeline events before that element. - Adds E2E test.
5 lines
173 B
Go HTML Template
5 lines
173 B
Go HTML Template
<div id="insert-timeline" hx-swap-oob="beforebegin">
|
|
{{template "repo/issue/view_content/comments" .}}
|
|
</div>
|
|
{{template "repo/issue/view_content/sidebar/milestones" .}}
|