Skip to content

filter tasks on tags - #57

Merged
woutdenolf merged 3 commits into
mainfrom
tags_filter
Oct 23, 2026
Merged

woutdenolf merged 3 commits into
mainfrom
tags_filter

Conversation

@woutdenolf

Copy link
Copy Markdown
Member

PR summary

  • On top of display task tags #56 (display task tags)
  • ewokstasks directive: include-tags and exclude-tags options
  • HTML pages: filter bar to include/exclude tasks by clicking tags
    • state kept in the include_tags and exclude_tags URL query parameters
    • hidden tasks are also hidden from the "On this page" sidebar
    • "Additional models" sections are hidden when none of their tasks is visible

AI Disclosure

  • AI tool claude used for all

🤖 Generated with Claude Code

@woutdenolf woutdenolf mentioned this pull request Oct 21, 2026
1 task done
@woutdenolf
woutdenolf requested a review from loichuder October 21, 2026 08:22
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.77419% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/ewokssphinx/__init__.py 88.88% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@loichuder

Copy link
Copy Markdown
Member

When clicking again on the tag, the associated task disappears and there is no way of getting it back:

Screencast.from.2026-10-21.15-17-41.webm

Is this the expected behaviour?

Comment thread src/ewokssphinx/__init__.py Outdated
@woutdenolf

Copy link
Copy Markdown
Member Author

Is this the expected behaviour?

Oef no. I only tested manually with the task catalog.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@woutdenolf

Copy link
Copy Markdown
Member Author

When clicking again on the tag, the associated task disappears and there is no way of getting it back

Claude helped: the problem was where the filter bar was placed on the page.

Before

  • The page got a single filter bar, put just above the first task on the page.
  • In ewoksdoc, every task on a page sits in one list, so the bar was right above the tasks it filtered. That worked fine.
  • On the ewokssphinx examples page, tasks are spread over several examples, each inside its own tabs ("Python / reST / Sphinx"). The first task on that page is MyTask in the first example. So the single bar ended up there, far from XrfTask, inside a tab you weren't looking at.
  • Clicking a tag on a task cycles it through: show only tasks with this tag, then hide tasks with this tag, then back to no filter.
  • So when you clicked "imaging" on XrfTask twice, XrfTask itself was hidden, along with the tag you had clicked. The only control left to undo it was that distant bar, which you couldn't see. The task looked gone for good.

After

  • Each list of tasks gets its own filter bar, right above it. A list here means the tasks generated by one ewokstasks directive.
  • All bars share one filter, so clicking "imaging" in any bar or on any task does the same thing everywhere.
  • Lists with no tags get no bar and are never filtered. So filtering in the tagged example no longer hides MyTask and the other examples.
  • Because the bar sits directly above the tasks it controls, you can always click there to undo a filter.

In ewoksdoc nothing visible changes, since each page still has a single list and a single bar.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@woutdenolf
woutdenolf requested a review from loichuder October 22, 2026 08:15
Base automatically changed from add_tags to main October 22, 2026 08:16
Comment thread src/ewokssphinx/__init__.py

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Was this generated only by AI?

I think some parts could be improved a bit in terms of readability and web accessibility but I can work on this in a follow-up.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yes, I barely know JS. A follow-up PR would be great.

@woutdenolf
woutdenolf merged commit 1c1753a into main Oct 23, 2026
9 checks passed
@woutdenolf
woutdenolf deleted the tags_filter branch October 23, 2026 14:23
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