Skip to content

Add directory hierarchy awareness to document sorting#517

Merged
davidjgoss merged 3 commits into
cucumber:mainfrom
MuhammadTalha57:enhancement/directory-first-search
Jul 2, 2026
Merged

Add directory hierarchy awareness to document sorting#517
davidjgoss merged 3 commits into
cucumber:mainfrom
MuhammadTalha57:enhancement/directory-first-search

Conversation

@MuhammadTalha57

@MuhammadTalha57 MuhammadTalha57 commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

🤔 What's changed?

This PR updates the document sorting logic so nested directories are ordered before direct child files, matching how users typically expect hierarchy-aware sorting to behave in IDEs and file explorers.

⚡️ What's your motivation?

Fixes #492.

🏷️ What kind of change is this?

  • 🏦 Refactoring/debt/DX (improvement to code design, tooling, etc. without changing behaviour)

♻️ Anything particular you want feedback on?

I’d especially appreciate feedback on the test coverage I added. I couldn’t find a more appropriate place for these tests, so I added them in the samples folder, which also appears to be how the previous implementation was covered.

📋 Checklist:

  • I agree to respect and uphold the Cucumber Community Code of Conduct
  • I've changed the behaviour of the code
    • I have added/updated tests to cover my changes.
  • My change requires a change to the documentation.
    • I have updated the documentation accordingly.
  • Users should know about my change
    • I have added an entry to the "Unreleased" section of the CHANGELOG, linking to this pull request.

This text was originally generated from a template, then edited by hand. You can modify the template here.

@mpkorstanje mpkorstanje requested a review from davidjgoss June 30, 2026 12:15

@davidjgoss davidjgoss left a comment

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.

LGTM, thanks for doing this.

@davidjgoss davidjgoss merged commit ddbcf25 into cucumber:main Jul 2, 2026
3 checks passed
@MuhammadTalha57

Copy link
Copy Markdown
Contributor Author

LGTM, thanks for doing this.

Thanks for reviewing my PR. I would love to continue contributing to the repository. Are there any specific issues you'd recommend I consider next.

@mpkorstanje

mpkorstanje commented Jul 2, 2026

Copy link
Copy Markdown
Member

@MuhammadTalha57 what do you think of implementing #126?

@MuhammadTalha57

Copy link
Copy Markdown
Contributor Author

@MuhammadTalha57 what do you think of implementing #126?

Thanks for the suggestion. I've opened a PR implementing #126 and would appreciate your feedback whenever you have a chance to review it.

PR: #524

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.

Add directory hierarchy awareness to document sorting

3 participants