Skip to content

Conversation

@haydngreatnews
Copy link
Contributor

Associated Issue(s): #

Changes in this PR

  • Rebuild the optgroup logic for the blog filtering

Notes

  • ifchanged acts on the content of the tag, unless a variable is supplied
    • this means that in the "before" state, the optgroups were being opened, but never closed, as the content of the ifchanged never changed.

Reviewer Checklist

  • Check 1
  • Check 2

Before view:
before-optgroups

Before, html:

                  <optgroup label="2025">
                     <option data-href="/blog/2025/06/" >June</option>
                    </optgroup>
                     <option data-href="/blog/2025/05/" >May</option>
                     <option data-href="/blog/2025/03/" >March</option>
                     <option data-href="/blog/2025/02/" >February</option>
                     <option data-href="/blog/2025/01/" >January</option>
                   <optgroup label="2024">
                    <option data-href="/blog/2024/11/" >November</option>

After view:
after-optgroups

After HTML:

<optgroup label="2024">
  <option data-href="/blog/2024/08/" selected>August</option>
  <option data-href="/blog/2024/07/" >July</option>
  <option data-href="/blog/2024/06/" >June</option>
  <option data-href="/blog/2024/05/" >May</option>
  <option data-href="/blog/2024/02/" >February</option>
  <option data-href="/blog/2024/01/" >January</option>
</optgroup>
<optgroup label="2023">
  <option data-href="/blog/2023/12/" >December</option>

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.

2 participants